This Neovim configuration is built with a focus on a simple, elegant, and distraction-free user interface. The goal is to enhance coding usability rather than overwhelm with fancy, unnecessary UI elements. I will consistently add and test plugins with multiple coding scenario, keep only those are suitable for daily use.
This configuration is compatible with neovim 0.12+ version.
git clone --depth=1 https://github.com/Avimitin/nvim.git ~/.config/nvim
Finally, input nvim to open the editor, and all plugins will be downloaded automatically.
nvim
This configuration facilitate the vim.pack module to download plugins. But
user could also use other package manager to download plugins. To avoid
vim.pack management, set the NEOVIM_EXTERNAL_PLUGIN_MANAGEMENT environment,
or enable the corresponding config:
export NEOVIM_EXTERNAL_PLUGIN_MANAGEMENT=1
nvim
require("core").setup({use_external_plugins = true})
This repository is also a flake. You can run it directly:
nix run github:Avimitin/nvim
Or add it to your configuration inputs:
{
inputs = {
# ...
nvim-config.url = "github:Avimitin/nvim";
};
outputs = { self, nixpkgs, nvim-config, ... }: {
# ...
nixosConfigurations.machine = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
({ pkgs, ... }: {
environment.systemPackages = [
nvim-config.packages.${pkgs.system}.default
];
})
];
};
};
}
Diagnostic error/warning/hint are highlighted with undercurl, please use kitty, wezterm or anyother terminal that support undercurl.
If you are using tmux, to have a correct display, you can try my configuration below:
# (MUST) Enable 256 color for tmux
set -g default-terminal "tmux-256color"
# (Optional, choose any of them)
# Enable true color and undercurl for wezterm
set -as terminal-features ",wezterm*:RGB"
set -as terminal-features ",wezterm*:usstyle"
# Same as above, but for kitty. (kitty doesn't support Windows so I have to keep two configuration here)
set -as terminal-features ",kitty*:RGB"
set -as terminal-features ",kitty*:usstyle"
# Same as above, but for SSH. This is useful because I am using `alias ssh="TERM=xterm-256color exec ssh"`
set -as terminal-features ",xterm-256color*:RGB"
set -as terminal-features ",xterm-256color*:usstyle"
set -as terminal-overrides ",xterm*:Tc"
# (MUST) This hijack the neovim undercurl char sequence, to avoid tmux escape them.
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm'
lsp/*.lua: Built-in vim.lsp configuration
lua: the configuration core
completion/: plugins and configuration for LSP completioncore/: autocmds and vim optionsgit/: plugin and configuration for using git in Neovimlang/: UI and key mapping configuration for LSPlibs/: functions that I don't want to write twicetools/: miscellaneous plugins that can enhance editing experiencetreesitter/: plugins for text object highlight and editingui/: plugins for decorating the neovimpack.lua: script to download lazy.nvim plugin managerftdetect: List of script to help neovim identify filetype for some file, not important.
after/ftplugin/<lang>.lua: configuration for non-default filetypes
indent: List of script to help neovim properly set indentation, not important.
syntax: Additional syntax detection for some file type, not important.
This configuration since commit 912416ae9c4b55501b23a91d774b567ba8697dd1 are
licenced under the Apache 2.0 license.
另附:禁止在 CSDN,bilibili 等国内平台使用该配置文件进行任何活动。 你只保有自己修改部分的权利。