nvim: move to services we do not specify a pkgset
This commit is contained in:
parent
465a6b19d1
commit
11b98d8146
45 changed files with 38 additions and 37 deletions
|
@ -1,54 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
lib.mkIf (lib.elem "nvim::treesitter" config.machine.pkgs) {
|
||||
programs.nvim-lazy.lazyPlugins =
|
||||
let
|
||||
treesitter = pkgs.vimPlugins.nvim-treesitter.withAllGrammars;
|
||||
grammars = pkgs.symlinkJoin {
|
||||
name = "treesitter-parsers";
|
||||
paths = treesitter.dependencies;
|
||||
};
|
||||
in
|
||||
[
|
||||
{
|
||||
lazy = false;
|
||||
dir = _: treesitter;
|
||||
event = [
|
||||
"BufReadPost"
|
||||
"BufWritePost"
|
||||
"BufNewFile"
|
||||
"VeryLazy"
|
||||
];
|
||||
opts = {
|
||||
auto_install = false;
|
||||
highlight = {
|
||||
enable = true;
|
||||
};
|
||||
incremental_selection = {
|
||||
enable = true;
|
||||
keymaps = {
|
||||
init_selection = "gnn"; # set to `false` to disable one of the mappings
|
||||
node_incremental = "grn";
|
||||
scope_incremental = "grc";
|
||||
node_decremental = "grm";
|
||||
};
|
||||
};
|
||||
indent = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
config = # lua
|
||||
''
|
||||
function(_, opts)
|
||||
vim.opt.rtp:prepend("${grammars}")
|
||||
require("nvim-treesitter.configs").setup(opts)
|
||||
end
|
||||
'';
|
||||
}
|
||||
];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue