user/settings/neovim.nix (view raw)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | { pkgs
, ...
}: {
programs.neovim = {
enable = true;
defaultEditor = true;
viAlias = true;
vimAlias = true;
vimdiffAlias = true;
withNodeJs = true;
plugins = with pkgs.vimPlugins; [
commentary
conjure
coc-git
coc-json
coc-yaml
direnv-vim
(nvim-treesitter.withPlugins (
plugins: with plugins; [
nix
]
))
telescope-nvim
telescope-fzf-native-nvim
vim-polyglot
vim-tridactyl
vim-surround
];
extraLuaConfig = builtins.readFile ../nvim/init.lua;
coc = {
enable = true;
settings = {
"json.enable" = true;
languageserver = {
nix = {
command = "${pkgs.nil}/bin/nil";
filetypes = [ "nix" ];
rootPatterns = [ "flake.nix" ];
settings = {
coc.preferences.formatOnSaveFiletypes = [ "nix" ];
links.tooltip = true;
semanticTokens = {
filetypes = [ "nix" ];
};
nil = {
formatting.command = [ "nixpkgs-fmt" ];
nix.flake.autoArchive = true;
};
};
};
lua = {
command = "${pkgs.lua-language-server}/bin/lua-language-server";
filetypes = [ "lua" ];
};
};
};
};
};
}
|