#neovim # Neovim Setup Notes > Switch between neovim configs with `$NVIM_APPNAME`. Configs are loaded from `$XDG_CONF_HOME/$NVIM_APPNAME`. Source: [`https://www.youtube.com/watch?v=w7i4amO_zaE&t=2s`]() # Where to put configs - `:h rtp`: runtimepath - shows locations of config files --- # netrw - `d`: create directory - `%`: create file --- - any directory in `lua/` is `require`-able by lua - `init.lua` is run on startup --- ```lua vim.g.mapleader = " " ``` `vim.g` is a lua table which contains the global variables of the NeoVim environment sets the mapleader (used before commands) to spacebar --- ```lua vim.keymap.set("n", "<leader>pv", vim.cmd.Ex) ``` In normal mode ("n"), set the input "<leader>pv" to run "vim.cmd.Ex" (`:Ex`) See `:h keymap` `:h cmd` `:so` source current file # Plugin Manager primeagen uses packer in his video but its no longer maintained. Using [lazy.nvim](https://github.com/folke/lazy.nvim#-installation) for my config. - bootstrap lazy.nvim from snippet in readme - use a plugins folder and require the lua module <!-- commands:start --> | Command | Lua | Description | | ------------------------- | -------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | `:Lazy build {plugins}` | `require("lazy").build(opts)` | Rebuild a plugin | | `:Lazy check [plugins]` | `require("lazy").check(opts?)` | Check for updates and show the log (git fetch) | | `:Lazy clean [plugins]` | `require("lazy").clean(opts?)` | Clean plugins that are no longer needed | | `:Lazy clear` | `require("lazy").clear()` | Clear finished tasks | | `:Lazy debug` | `require("lazy").debug()` | Show debug information | | `:Lazy health` | `require("lazy").health()` | Run `:checkhealth lazy` | | `:Lazy help` | `require("lazy").help()` | Toggle this help page | | `:Lazy home` | `require("lazy").home()` | Go back to plugin list | | `:Lazy install [plugins]` | `require("lazy").install(opts?)` | Install missing plugins | | `:Lazy load {plugins}` | `require("lazy").load(opts)` | Load a plugin that has not been loaded yet. Similar to `:packadd`. Like `:Lazy load foo.nvim`. Use `:Lazy! load` to skip `cond` checks. | | `:Lazy log [plugins]` | `require("lazy").log(opts?)` | Show recent updates | | `:Lazy profile` | `require("lazy").profile()` | Show detailed profiling | | `:Lazy reload {plugins}` | `require("lazy").reload(opts)` | Reload a plugin (experimental!!) | | `:Lazy restore [plugins]` | `require("lazy").restore(opts?)` | Updates all plugins to the state in the lockfile. For a single plugin: restore it to the state in the lockfile or to a given commit under the cursor | | `:Lazy sync [plugins]` | `require("lazy").sync(opts?)` | Run install, clean and update | | `:Lazy update [plugins]` | `require("lazy").update(opts?)` | Update plugins. This will also update the lockfile | <!-- commands:end --> --- # Plugins https://github.com/rockerBOO/awesome-neovim - [x] Catppuccin coloschema https://github.com/catppuccin/nvim - [x] whichkey https://github.com/folke/which-key.nvim - neodev https://github.com/folke/neodev.nvim - nvim-cmp - fuzzy finder Telescope - [x] Mason - LSP Installer - lspconfig - mason-lspconfig.nvim - nvim-dap - nvim-dap-ui - null-ls.nvim - https://github.com/f-person/git-blame.nvim - https://github.com/iamcco/markdown-preview.nvim - https://github.com/klen/nvim-test - https://github.com/andythigpen/nvim-coverage - https://github.com/ms-jpq/coq_nvim - https://github.com/sindrets/diffview.nvim - https://github.com/nvim-tree/nvim-tree.lua - idk about nvim tree, I'm kinda ok with netrw > ok I kinda just wanna use lunarvim now # Features ## WhichKey Plugins - Marks: ` or ' shows list of buffer local and global marks - Registers: " in normal mode, `<c-r>` in insert mode shows list of buffer local and global registers - Spelling: `z=` spelling suggestions