home-manager/common/nvim/default.nix

55 lines
1.2 KiB
Nix

{pkgs, ...}: {
config.programs.neovim = {
enable = true;
defaultEditor = true;
viAlias = true;
vimAlias = true;
vimdiffAlias = true;
plugins = with pkgs.vimPlugins;
[
telescope-nvim # fuzzy finder
tokyonight-nvim # theme
undotree # undotree
vim-fugitive # git integration
nvim-treesitter # syntax highlighting
# Autocomplete and LSP
nvim-lspconfig
nvim-cmp
cmp-nvim-lsp
luasnip
]
++ (with pkgs.vimPlugins.nvim-treesitter-parsers; [
# Parsers for syntax highlighting
nix
zig
python
vim
vimdoc
markdown
dockerfile
yaml
json
toml
lua
c
glsl
bash
]);
extraPackages = [pkgs.nodePackages.pyright];
extraLuaConfig =
builtins.readFile ./keybinds.lua
+ builtins.readFile ./colors.lua
+ builtins.readFile ./undotree.lua
+ builtins.readFile ./fugitive.lua
+ builtins.readFile ./treesitter.lua
+ builtins.readFile ./telescope.lua
+ builtins.readFile ./cmp.lua
+ builtins.readFile ./lspconfig.lua;
extraConfig = "set number relativenumber";
};
}