Click here for documents in zh_CN
.
This is a modern configuration for neovim only. You could find the common configuration for nvim 0.5.0+ and vim 8.2+ in this branch, which is maintained but no new features, if you have to use vim 8.2+.
The common configuration uses the coc.nvim as the bridge for cilents/servers of LSP(language server protocol), but this configuration uses the native nvim-lsp as the infrastructure for syntax-based completion, LSPs and other awesome features. The new one has better performance, better extendibility, and more readable code, it wrote by pure lua with APIs of neovim.
It configured for terminal-only and no plans to support the GUI front-end such as neovide or neovim-qt. The terminal I tested is Windows terminal. And I cannot give any promise if you want to use it on MS Windows and welcome PRs for these problem.
Programming Language supported in this configuration:
c
,cpp
,objective-c
,objective-c++
make
,cmake
bash
python3
,lua
,vimL
json
,xml
,toml
,yaml
rust
(not ready)
What you need to make this configuration work is following:
- neovim 0.6.0+ or nightly build,
- git 2.18+,
- cmake 3.18+,
- Gcc 9.2.0 or later(for compilation of nvim-treesitter parsers),
- clangd 11.0.0+ as c/cpp language server,
- Node.js 17.0+(for pyright),
- Nerd Fonts for terminal display(I prefer
FiraCode NF
).
Clone this repo and make symbolic link of nvim/
to ~/.config/nvim
, e.g.:
$ git clone https://github.com/stark-zhang/dotfiles-on-unix-like.git --depth 1
$ ln -sf /absolute/path/to/dotfiles-on-unix-like/nvim ~/.config/nvim
All extensions, includes LSP servers managed by nvim-lspinstaller
and parsers of nvim-treesitter
should be installed automatically to ~/.local/share/nvim/
.
OK, just open your neovim and enjoy it!
The statistic of startup time:
The Dashboard(powered by alpha.nvim
):
Recent Files(powered by telescope
):
LSP preview definition(powered by lspsaga
& ccls
), you could also find git information on status line and in virtual text:
Outline View:
And more features could be discovered by yourself!
use libuv for demostration.
You could find all basic options of nvim in lua/core/options.lua
and modify them.
Use <space>
as the <leader>
.
Keymaps are put in 2 lua tables, keymap.builtin
and keymap.plugins
, in lua/core/keymap.lua
, and are binded by library lua/utility/keybinding
. There also are some keymaps in configurations of plugins, they are strong-correlated with the options of plugins.
Use packer.nvim as the default plugin manager and lazy-loader generators, the generated lazy-loader configuation would be put in ~/.local/share/nvim/site/lua/_compiled.lua
. You'd better remove it before change the options of plugins.
I devided all plugins into several categories: ui
, editor
, lsp
and tools
.
This part will be completed soon.
There is a simple implementation of logger, would help debugging.
If someone used this configuration, welcome PR and issues.
- The italic font displays wired on Windows Terminal with
FiraCode NF
, - The italic font not worked in tmux, if
$TERM=xterm-256color
, - The behaviour of extension
indent-blank.nvim
is not expected, - The behaviour of
utility.logger
is not expected in some situations, acclerated-jk
andvim-eft
not worked for now.
- add support for
rust
, - format all code in lua,
- adjust the configuation of extension
indent-blank.nvim
, - improve the logger,
- lazy-loader optimization,
- write a tool to analyze the lazy-load configuration of packer.nvim.
Inspired by ayamir/nvimdots, used some code directly of it. I am very grateful to ayamir.