nixos/home/editor/neovim/default.nix

43 lines
920 B
Nix

{ pkgs, ... }: {
programs = {
neovim = {
enable = true;
defaultEditor = true;
vimAlias = true;
plugins = with pkgs.vimPlugins; [
vim-fugitive
undotree
telescope-nvim
nvim-cmp
nvim-lspconfig
(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";
}