This is my personal neovim config inspired by LazyVim, with KISS in mind.
-
KISS: simple and stupid, less is better
-
Easy: either to understand or to extend
-
Fast: modern neovim config with pure lua
-
Ready: comfortable and convenient out of the box
-
Neovim >= 0.10.0 (needs to be built with LuaJIT)
-
Git >= 2.19.0 (for partial clones support)
-
a Nerd Font (optional)
-
a C compiler for
nvim-treesitter
. See here -
external tools (configured in
lua/init/options.lua:M.plugins
)-
treesitter parser: used by
nvim-treesitter
, install/update with:TSUpdate
-
lsp server, linter, formatter: managed by
mason
, install/update with:MasonUpdate
-
dap: external debug tools, install:
mason
or manually
-
# backup your neovim config
mkdir -p nvim
mv ~/.config/nvim/ nvim/nv.config
mv ~/.local/share/nvim/ nvim/nv.share
mv ~/.local/state/nvim/ nvim/nv.state
mv ~/.cache/nvim/ nvim/nv.cache
# clone the repo
git clone https://github.com/rtgiskard/lazyNvim.git ~/.config/nvim
# launch
nvim
# enter `Y` to install lazy.nvim and the plugins
lua/init/options.lua
-
most of neovim’s options and some of the plugins' specs are configured here
lua/init/keymaps.lua
-
except for nvim and plugins' defaults, all manually configured keymaps are maintained here
lua/plugins/
-
define all the plugins managed by
lazy.nvim
with the spec settings
As this is not meant to be an all-in-one config for all dev languages, the initial setup includes
only a limited set that I personally use, you may want to adjust it as you need, like lsp servers
and formatters list in lua/init/options.lua::plugins
, which should be enough.
Some of the settings are switchable via keymaps (like mouse, linenumber, listchars and etc.),
of course you can define more with the handlers held in lua/init/utils.lua
.
And you may also find some references from lazyVim’s doc.
-
treesitter
: syntax parser, provide better highlighting -
lsp
: language server, provide: completion, linting, formatting, diagnostics, hover/jump .. -
linter
: common checks and provide hints, run with or withoutlsp
-
formatter
: format code, takes priority overlsp
format -
dap
: debug adapter -
related utils:
-
mason
: help to install lsp/dap/linter/formatter tools -
lspconfig
: configurations for lsp servers
-
-
ui enhancement:
-
telescope: the extendable fuzzy finder
-
notify: popup notification
-
themes and misc
-
-
other tools: complete, indent, trim, pairs, and etc.