development settings, and renaming neovim to nixvim
This commit is contained in:
40
home/modules/devtools/nixvim/plugins/treesitter.nix
Normal file
40
home/modules/devtools/nixvim/plugins/treesitter.nix
Normal file
@@ -0,0 +1,40 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
cfg = config.modules.devtools.nixvim.plugins.treesitter;
|
||||
in {
|
||||
options = {
|
||||
modules.devtools.nixvim.plugins = {
|
||||
treesitter.enable = mkEnableOption "Enables Treesitter plugin for nixvim";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.nixvim.plugins = {
|
||||
treesitter = {
|
||||
enable = true;
|
||||
nixvimInjections = true;
|
||||
settings = {
|
||||
highlight.enable = true;
|
||||
indent.enable = true;
|
||||
};
|
||||
folding = true;
|
||||
};
|
||||
|
||||
treesitter-refactor = mkIf cfg.enable {
|
||||
enable = true;
|
||||
highlightDefinitions = {
|
||||
enable = true;
|
||||
clearOnCursorMove = false;
|
||||
};
|
||||
};
|
||||
|
||||
hmts = mkIf cfg.enable {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user