My personal Neovim
configuration, nothing special.
- Modern: Using Lua as the config language, adopting as many fancy features as possible in the nightly version of
Neovim
. - Modular: Each plugin has its dedicated config file.
- Documented (TODO): The goal is to easily recall what this line/file does.
Neovim >= 0.10 is required
Backup your existing config with mv ~/.config/nvim{,.bak}
Run git clone https://github.com/ZWindL/VVimston.git ~/.config/nvim
.
├── init.lua # main config
├── lua
│ ├── core # core configurations don't rely on plugins
│ │ ├── autocmds.lua
│ │ ├── constants.lua # icons, colors, etc
│ │ ├── keymaps.lua # global keymaps
│ │ ├── lazy_n_hotpot.lua # package managers
│ │ ├── neovide_options.lua # neovide specific options
│ │ ├── options.lua # global options
│ │ └── utils.lua # common utils like `map`, `map_group`
│ ├── plugins # plugin configurations
│ │ ├── barbar.lua # in general, each plugin has its own config
│ │ ├── which-key.lua
│ │ ├── ...
│ │ ├── dap # configurations for debugging
│ │ │ └── ...
│ │ ├── hydra # hydra configurations
│ │ │ └── ...
│ │ ├── lang # language specific plugins
│ │ │ └── ...
│ │ ├── lsp # language server protocol
│ │ │ ├── lang_settings # language server settings for different languages
│ │ │ │ └── ...
│ │ │ ├── init.lua
│ │ │ ├── lsp.lua # language server configuration for lsp itself
│ │ │ └── ...
│ │ └── treesitter # treesitter configurations
│ │ └── ...
│ ├── theme.lua
│ └── themes
│ └── ...
└── templates # templates for templates.nvim plugin
└── lua
└── config.lua
- Theming Nvim splash screen: dashboard-nvim
- Tab bar: barbar.nvim
- Status line: lualine
- Auto remove incsearch highlight: hlsearch
- Lsp UI enhancement: lspsaga
fswatch
for better performance while watching files.
ttf-nerd-fonts-symbols
for symbols.
I want nvim not to auto-insert comment lead characters after pressing o
or O
, but does after hitting enter.
This can be configured via vim.opt.formatoptions
, however it won't set "r"
by operating directly on this
option as vim.opt.formatoptions += "r"
, because options are table type. And if modify it by using
vim.opt.formatoptions:append { "c", "q", "j", "r" }
inside autoCmd
blocks, nvim reports "illegal character"
error. The workaround is to hardcode the value of formatoptions
and remove the unwanted options by
formatoptions:remove
insideautoCmd
, although it's not recommended, see :help formatoptions
.
Some options like custom icons for diagnosis will be reset to default after invoking noice
cmdline
popup window.