Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J1cugeLkfFLZMpiztQ8TyN
55 lines
1.1 KiB
Nix
55 lines
1.1 KiB
Nix
# Neovim with LSP, completion, fuzzy finding and format-on-save.
|
|
# The editor config is in init.lua next to this file.
|
|
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
let
|
|
cfg = config.my.home.neovim;
|
|
in
|
|
{
|
|
options.my.home.neovim.enable = lib.mkEnableOption "Neovim editor";
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
programs.neovim = {
|
|
enable = true;
|
|
defaultEditor = true;
|
|
viAlias = true;
|
|
vimAlias = true;
|
|
|
|
plugins = with pkgs.vimPlugins; [
|
|
nvim-treesitter.withAllGrammars
|
|
nvim-lspconfig
|
|
blink-cmp
|
|
telescope-nvim
|
|
telescope-fzf-native-nvim
|
|
plenary-nvim
|
|
lualine-nvim
|
|
gitsigns-nvim
|
|
which-key-nvim
|
|
oil-nvim
|
|
conform-nvim
|
|
catppuccin-nvim
|
|
nvim-web-devicons
|
|
mini-nvim
|
|
];
|
|
|
|
# Language servers, formatters and search tools, visible to nvim only.
|
|
extraPackages = with pkgs; [
|
|
nixd
|
|
nixfmt
|
|
lua-language-server
|
|
stylua
|
|
bash-language-server
|
|
shfmt
|
|
ripgrep
|
|
fd
|
|
];
|
|
|
|
initLua = builtins.readFile ./init.lua;
|
|
};
|
|
};
|
|
}
|