feat(neovim): migrate to nixvim with minimal plugins (#260)

Replace bare programs.neovim with programs.nixvim. Only 3 plugins:
neo-tree (file explorer), catppuccin (colorscheme), treesitter.

Add core editor opts matching helix defaults: clipboard, cursorline,
scrolloff, wrap, mouse, undofile, smart search, split direction.
Enable 5 LSP servers: nixd, rust-analyzer, gopls, pyright, bashls.

Signed-off-by: Ryan Yin <xiaoyin_c@qq.com>
This commit is contained in:
Ryan Yin
2026-05-09 18:12:17 +08:00
committed by GitHub
parent 3d4a2d4879
commit ce49423247
3 changed files with 154 additions and 8 deletions
+89 -7
View File
@@ -1,14 +1,96 @@
{ pkgs, ... }:
{ config, nixvim, ... }:
{
programs = {
neovim = {
imports = [ nixvim.homeModules.nixvim ];
home.shellAliases = {
vi = "nvim";
vim = "nvim";
};
programs.nixvim = {
enable = true;
clipboard.providers.wl-copy.enable = true;
opts = {
number = true;
relativenumber = true;
cursorline = true;
signcolumn = "auto";
clipboard = "unnamedplus";
scrolloff = 8;
swapfile = false;
title = true;
titlelen = 20;
smartindent = false;
mouse = "a";
undofile = true;
ignorecase = true;
smartcase = true;
splitbelow = true;
splitright = true;
updatetime = 300;
wrap = true;
linebreak = true;
};
colorschemes.catppuccin = {
enable = true;
settings = {
transparent_background = true;
};
};
viAlias = true;
vimAlias = true;
plugins.lsp.servers = {
nixd.enable = true;
"rust_analyzer" = {
enable = true;
installCargo = false;
installRustc = false;
};
gopls.enable = true;
pyright.enable = true;
bashls.enable = true;
};
withRuby = false;
withPython3 = false;
plugins.treesitter = {
enable = true;
grammarPackages = with config.programs.nixvim.plugins.treesitter.package.builtGrammars; [
bash
json
lua
make
markdown
nix
regex
rust
go
python
toml
vim
vimdoc
xml
yaml
nu
];
};
plugins.neo-tree = {
enable = true;
settings = {
filesystem = {
filtered_items = {
visible = true;
hide_dotfiles = false;
hide_gitignored = false;
};
follow_current_file = {
enabled = true;
leave_dirs_open = false;
};
};
};
};
};
}