nixos/home/editor/neovim/default.nix

47 lines
1000 B
Nix

{ pkgs, ... }: {
programs = {
neovim = {
enable = true;
defaultEditor = true;
vimAlias = true;
plugins = with pkgs.vimPlugins; [
vim-fugitive
undotree
telescope-nvim
nvim-cmp
cmp-nvim-lsp
nvim-lspconfig
lsp-zero-nvim
vim-floaterm
luasnip
(nvim-treesitter.withPlugins (p: [
p.tree-sitter-nix
p.tree-sitter-go
p.tree-sitter-vim
p.tree-sitter-bash
p.tree-sitter-json
p.tree-sitter-python
]))
];
extraLuaConfig = ''
${builtins.readFile ./options.lua}
${builtins.readFile ./plugins.lua}
${builtins.readFile ./keybinds.lua}
'';
};
};
home.packages = with pkgs; [
# nix stuff
nixpkgs-fmt
statix
# LSPs
gopls
nodePackages.pyright
nodePackages.typescript-language-server
nil
yaml-language-server
];
home.sessionVariables.EDITOR = "nvim";
}