Skyler Grey | 252927a | 2022-10-18 22:18:15 +0100 | [diff] [blame] | 1 | { pkgs |
| 2 | , lib |
Skyler Grey | 8fd63d0 | 2022-10-31 00:26:44 +0000 | [diff] [blame] | 3 | , nixpkgs-minion |
| 4 | , system |
Skyler Grey | 252927a | 2022-10-18 22:18:15 +0100 | [diff] [blame] | 5 | , ... |
| 6 | }: |
| 7 | let |
Skyler Grey | f819460 | 2022-10-31 00:07:05 +0000 | [diff] [blame] | 8 | disabledGrammars = [ |
Skyler Grey | 48e12a4 | 2023-02-13 06:51:56 +0000 | [diff] [blame] | 9 | /* "sql" */ |
Skyler Grey | f819460 | 2022-10-31 00:07:05 +0000 | [diff] [blame] | 10 | ]; |
Skyler Grey | 252927a | 2022-10-18 22:18:15 +0100 | [diff] [blame] | 11 | in |
| 12 | { |
Skyler Grey | 5a22b1f | 2023-01-26 00:33:27 +0000 | [diff] [blame] | 13 | home.file.".config/nvim/after/queries/markdown/highlights.scm".source = ./highlights.scm; |
Skyler Grey | a7feb6e | 2022-08-26 06:51:55 +0100 | [diff] [blame] | 14 | programs.neovim = { |
| 15 | plugins = with pkgs.vimPlugins; [ |
| 16 | (nvim-treesitter.withPlugins (plugins: |
Skyler Grey | f819460 | 2022-10-31 00:07:05 +0000 | [diff] [blame] | 17 | (lib.pipe plugins [ |
Skyler Grey | f8f0653 | 2022-11-04 10:58:38 +0000 | [diff] [blame] | 18 | (lib.filterAttrs (name: value: builtins.substring 0 12 name == "tree-sitter-")) |
| 19 | (lib.filterAttrs (name: value: !builtins.elem |
| 20 | (builtins.substring 12 (builtins.stringLength name) name) |
| 21 | disabledGrammars |
| 22 | )) |
Skyler Grey | d9c7e1e | 2023-02-26 12:50:27 +0000 | [diff] [blame] | 23 | # lib.traceVal |
Skyler Grey | f819460 | 2022-10-31 00:07:05 +0000 | [diff] [blame] | 24 | builtins.attrValues |
| 25 | ]) |
Skyler Grey | a7feb6e | 2022-08-26 06:51:55 +0100 | [diff] [blame] | 26 | ++ (with pkgs.vimPlugins; [ |
| 27 | nvim-ts-rainbow |
Skyler Grey | 5a22b1f | 2023-01-26 00:33:27 +0000 | [diff] [blame] | 28 | nvim-ts-context-commentstring |
Skyler Grey | 8fd63d0 | 2022-10-31 00:26:44 +0000 | [diff] [blame] | 29 | nixpkgs-minion.legacyPackages.${system}.tree-sitter-grammars.tree-sitter-astro |
Skyler Grey | a7feb6e | 2022-08-26 06:51:55 +0100 | [diff] [blame] | 30 | ]))) |
| 31 | nvim-treesitter-context |
Skyler Grey | 5a22b1f | 2023-01-26 00:33:27 +0000 | [diff] [blame] | 32 | playground |
Skyler Grey | a7feb6e | 2022-08-26 06:51:55 +0100 | [diff] [blame] | 33 | ]; |
| 34 | extraConfig = '' |
| 35 | source ${./setup.lua} |
Skyler Grey | 5a22b1f | 2023-01-26 00:33:27 +0000 | [diff] [blame] | 36 | '' + builtins.readFile ./highlights.vim; |
Skyler Grey | a7feb6e | 2022-08-26 06:51:55 +0100 | [diff] [blame] | 37 | }; |
| 38 | } |