blob: 0a49dc744e96f151b1c2777e0afd7dce7f5159e8 [file] [log] [blame]
Skyler Greya7feb6e2022-08-26 06:51:55 +01001{
2 pkgs,
Skyler Grey2f9904e2022-09-05 03:18:02 +01003 system,
Skyler Greya7feb6e2022-08-26 06:51:55 +01004 lib,
Skyler Grey2f9904e2022-09-05 03:18:02 +01005 nixpkgs-minion,
Skyler Grey55f84552022-09-05 11:04:39 +01006 home,
Skyler Greya7feb6e2022-08-26 06:51:55 +01007 ...
8}: {
9 programs.neovim = {
10 coc = {
11 enable = true;
12 settings = {
13 "suggest.noselect" = false;
14 "cSpell.checkOnlyEnabledfileTypes" = false;
Skyler Grey55f84552022-09-05 11:04:39 +010015 "cSpell.dictionaryDefinitions" = [
16 {
17 name = "imperative";
18 path = "${home.home.homeDirectory}/.local/share/cspell/dictionary.txt";
19 }
20 ];
21 "cSpell.dictionaries" = ["imperative"];
22 "git.enableGutters" = false; # We're using another plugin to do this
Skyler Greya7feb6e2022-08-26 06:51:55 +010023 "rust-analyzer.serverPath" = "${pkgs.rust-analyzer}/bin/rust-analyzer";
24 languageserver = {
25 nix = {
26 command = "${pkgs.rnix-lsp}/bin/rnix-lsp";
27 filetypes = ["nix"];
28 };
29 };
30 };
31 };
32 plugins = with pkgs.vimPlugins; [
33 # Language servers
34 coc-tsserver
35 coc-eslint
36 coc-rust-analyzer
37 coc-json
38 coc-jest
39 coc-css
Skyler Greyb8300e72022-09-04 23:06:24 +010040 coc-markdownlint
Skyler Greya7feb6e2022-08-26 06:51:55 +010041
42 # Spellchecker
Skyler Grey2f9904e2022-09-05 03:18:02 +010043 nixpkgs-minion.legacyPackages.${system}.vimPlugins.coc-spell-checker
Skyler Greya7feb6e2022-08-26 06:51:55 +010044
45 # File explorer
46 coc-explorer
47 coc-git # TODO: Check if coc-git is still needed
48
49 # Snippet completion
50 coc-snippets
51 vim-snippets
52 ];
53 extraConfig = lib.pipe [./keybinds.vim ./theme.vim] [
54 (map builtins.readFile)
55 (builtins.concatStringsSep "\n")
56 ];
57 extraPackages = [pkgs.nodejs pkgs.rustc];
58 };
59}