How to setup neovim
Links: 300 home
- Don't use apt for installing neovim since the versions are pretty old. - Best part of using app images is that you don't need dependencies everything is packaged into the app image.
Neovim configuration (lua)¶
- We can use modules in lua which this means we will not end up with large configuration files.
- We use the
requirefunction to load the different modules in lua.
- So the base directory will have a
init.luafile which will load all the modules.
- All the modules must be inside the
~/.config/nvim/luafolder. For example we can have a settings folder inside lua folder. We will need a
init.luafile in all the subfolders.
- Nvim documentation: options (neovim.io)
- We will be using packer for our plugins
- Packer is also written in lua
- Plugins are just GitHub repositories
- Plugins will live in
- If you feel there is some problem then delete the
- Put it in your
- Put it in your
- Lazy loading means it will only run if one of the specified commands is run
- Plugins will be under
~/.local/share/nvim/site/pack/packer- most of them will be in start
- For colour schemes we have to first install them in the plugins and then use them
:so %after saving the file to source it.
echo &ft- to get the file type
LspInstallInfo- a menu will pop up
- To install something search it in the menu and press
- To update
- To remove
- To which particular one you have active in the current buffer
- Any server must be installed for it to be active
- More to do
- null ls video
- live_grep -
brew install ripgrep
- Go to normal mode and mode up and down, go to insert mode to type
- For better commenting use
nvim-ts-context-commentstring(generally for webdev languages)
- When you scroll you go to visual mode, use a/i to go to insert mode
Last updated: 2022-06-01