diff --git a/README.md b/README.md index 2c4b4c15..1a6d6e03 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,90 @@ will be automatically loaded by [lazy.nvim](https://github.com/folke/lazy.nvim) └── init.toml -## 🚀 Configuring **LazyVim** +## ⚙️ Configuration + +**LazyVim** comes with the following defaults: + + + +```lua +{ + -- colorscheme can be a string like `catppuccin` or a function that will load the colorscheme + ---@type string|fun() + colorscheme = function() + require("tokyonight").load() + end, + -- icons used by other plugins + icons = { + diagnostics = { + Error = " ", + Warn = " ", + Hint = " ", + Info = " ", + }, + git = { + added = " ", + modified = " ", + removed = " ", + }, + kinds = { + Array = " ", + Boolean = " ", + Class = " ", + Color = " ", + Constant = " ", + Constructor = " ", + Enum = " ", + EnumMember = " ", + Event = " ", + Field = " ", + File = " ", + Folder = " ", + Function = " ", + Interface = " ", + Key = " ", + Keyword = " ", + Method = " ", + Module = " ", + Namespace = " ", + Null = "ﳠ ", + Number = " ", + Object = " ", + Operator = " ", + Package = " ", + Property = " ", + Reference = " ", + Snippet = " ", + String = " ", + Struct = " ", + Text = " ", + TypeParameter = " ", + Unit = " ", + Value = " ", + Variable = " ", + }, + }, +} +``` + + + +**LazyVim** can be configured in the same way as any other plugin. + +For example in `lua/plugins/core.lua` + +```lua +return { + { + "LazyVim/LazyVim", + opts = { + colorscheme = "catppuccin", + } + } +} +``` + +## 🚀 Configuring **Plugins** Configuring **LazyVim** is exactly the same as using **lazy.nvim** to build a config from scratch. @@ -301,9 +384,8 @@ possible keymaps starting with ``. | `` | Move up | **n**, **v**, **i** | | `` | Prev buffer | **n** | | `` | Next buffer | **n** | -| `[p` | Paste below | **n** | -| `]p` | Paste above | **n** | | `` | Escape and clear hlsearch | **i**, **n** | +| `r` | Redraw and clear hlsearch | **n** | | `n` | Next search result | **n**, **x**, **o** | | `N` | Prev search result | **n**, **x**, **o** | | `` | Save file | **i**, **v**, **n**, **s** | @@ -377,6 +459,8 @@ possible keymaps starting with ``. | `bD` | [mini.bufremove](https://github.com/echasnovski/mini.bufremove.git) Delete Buffer (Force) | **n** | | `ft` | [neo-tree.nvim](https://github.com/nvim-neo-tree/neo-tree.nvim.git) NeoTree (root dir) | **n** | | `fT` | [neo-tree.nvim](https://github.com/nvim-neo-tree/neo-tree.nvim.git) NeoTree (cwd) | **n** | +| `e` | [neo-tree.nvim](https://github.com/nvim-neo-tree/neo-tree.nvim.git) NeoTree (root dir) | **n** | +| `E` | [neo-tree.nvim](https://github.com/nvim-neo-tree/neo-tree.nvim.git) NeoTree (cwd) | **n** | | `` | [noice.nvim](https://github.com/folke/noice.nvim.git) Redirect Cmdline | **c** | | `nl` | [noice.nvim](https://github.com/folke/noice.nvim.git) Noice Last Message | **n** | | `nh` | [noice.nvim](https://github.com/folke/noice.nvim.git) Noice History | **n** | @@ -445,6 +529,7 @@ possible keymaps starting with ``. - [gitsigns.nvim](https://github.com/lewis6991/gitsigns.nvim) - [indent-blankline.nvim](https://github.com/lukas-reineke/indent-blankline.nvim) - [lazy.nvim](https://github.com/folke/lazy.nvim) +- [LazyVim](https://github.com/LazyVim/LazyVim) - [leap.nvim](https://github.com/ggandor/leap.nvim) - [lualine.nvim](https://github.com/nvim-lualine/lualine.nvim) - [LuaSnip](https://github.com/L3MON4D3/LuaSnip) @@ -500,7 +585,7 @@ require("lazy").setup({ - [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) - [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter) -- [schemastore.nvim](https://github.com/b0o/schemastore.nvim) +- [SchemaStore.nvim](https://github.com/b0o/SchemaStore.nvim) diff --git a/lua/lazyvim/util/build.lua b/lua/lazyvim/util/build.lua index 06caefc0..0141ac92 100644 --- a/lua/lazyvim/util/build.lua +++ b/lua/lazyvim/util/build.lua @@ -44,7 +44,8 @@ function M.keymaps() group = "Plugins" - Util.foreach(require("lazy.core.config").plugins, function(name, plugin) + local core = require("lazy.core.plugin").Spec.new({ import = "lazyvim.plugins" }) + Util.foreach(core.plugins, function(name, plugin) for _, key in ipairs(plugin.keys or {}) do if type(key) == "table" and key.desc then local desc = key.desc or "" @@ -95,6 +96,7 @@ function M.update() ---@type table local data = { keymaps = M.keymaps(), + config = Docs.extract("lua/lazyvim/config/init.lua", "\nlocal defaults = ({.-\n})"), } local core = require("lazy.core.plugin").Spec.new({ import = "lazyvim.plugins" })