This neovim is configured in lua.
Type
:h rtpfor detaile about theneovimstartup configuration procedure
sudo curl -fsSL https://deno.land/install.sh | sh
LAZYGIT*VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | \grep -Po '"tag_name": *"v\K[^"]_') curl -Lo lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/download/v${LAZYGIT_VERSION}/lazygit_${LAZYGIT_VERSION}\_Linux_x86_64.tar.gz" tar xf lazygit.tar.gz lazygit sudo install lazygit -D -t /usr/local/bin/
- init.lua - root file where
neovimstarts looking for configuration (lua modue style) - lua - Everything inside of the
luadirectory will automatically sourced by neovim- psu - user defined configuration (psu in this case). It's a lua module for convinience
It's inspired by youtube video from Josean Martinez.
This configuration uses the lazy.nvim as a package manager
Use
:Lazyto spawn lazy.nvim plugin manager UIColor schemes are managed also by the package manager
Use
:checkhealth <name_of_plugin>to inspect the plugin
- Find your new plugin on github (e.g.: nvim-treesitter).
- Create a configuration file in the
./lua/psu/plugindirectory using a following scheme:
return {
"plugin-name/neovim",
config = function()
require('plugin-name').setup({
-- Add setup code here (if needed)
})
-- Add extra configuration here (like key-mapping etc.)
end
}Using
configis optional and required only of a plugin has asetupfunction that is required to be called
Nice video explaining how it works More sophisticated (but a little bit more bloated)
LSP is part of neovim, there is a plugin for getting configuration - check the lsp.lua file
Use comamnd checkhealth vim.lsp to check the configuration.
The LSP language servers are automatically configured by the nvim-lspconfig plugin.
It is possible to add additional configuration to the language server by adding it to the /lsp folder.
See
./after/lsp/lua_ls.luaas an example Note that the/afterdirectory means that the configuration in that folder will be run after the original configuration (From github)
Footnotes
-
In lua folder can also be a module if it contains the
init.luafile ↩