nixos/home/editor/neovim/default.nix

44 lines
942 B
Nix
Raw Normal View History

2024-02-27 21:20:00 +00:00
{ pkgs, ... }: {
2024-02-27 11:12:40 +00:00
programs = {
neovim = {
enable = true;
defaultEditor = true;
2024-02-27 21:16:39 +00:00
vimAlias = true;
plugins = with pkgs.vimPlugins; [
vim-fugitive
2024-02-27 21:20:00 +00:00
undotree
telescope-nvim
2024-02-28 01:46:28 +00:00
nvim-cmp
nvim-lspconfig
2024-02-28 01:50:10 +00:00
lsp-zero-nvim
2024-02-27 21:20:00 +00:00
(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
]))
2024-02-27 21:16:39 +00:00
];
extraLuaConfig = ''
${builtins.readFile ./options.lua}
2024-02-28 01:46:28 +00:00
${builtins.readFile ./plugins.lua}
${builtins.readFile ./keybinds.lua}
2024-02-27 21:16:39 +00:00
'';
2024-02-27 11:12:40 +00:00
};
};
2024-02-27 21:16:39 +00:00
home.packages = with pkgs; [
# nix stuff
2024-02-27 21:48:45 +00:00
nixpkgs-fmt
2024-02-27 21:16:39 +00:00
statix
2024-02-28 01:46:28 +00:00
# LSPs
gopls
nodePackages.pyright
nodePackages.typescript-language-server
nil
yaml-language-server
2024-02-27 21:16:39 +00:00
];
2024-02-27 11:12:40 +00:00
home.sessionVariables.EDITOR = "nvim";
}