Skip to content

Commit 7a2c608

Browse files
committed
treesitter: disable textobjects by default
1 parent e653e42 commit 7a2c608

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

lib/ide.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ let
9494
enable = true;
9595
autotagHtml = true;
9696
context.enable = true;
97+
textobjects.enable = false;
9798
};
9899
keys = {
99100
enable = true;

modules/treesitter/config.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ with lib;
99
fold = mkDefault true;
1010
autotagHtml = mkDefault false;
1111
context.enable = mkDefault false;
12-
textobjects = mkDefault true;
12+
textobjects.enable = mkDefault false;
1313
};
1414
};
1515
}

modules/treesitter/treesitter.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ in
2323
description = "enable autoclose and rename html tag [nvim-ts-autotag]";
2424
};
2525

26-
textobjects = mkOption {
26+
textobjects.enable = mkOption {
2727
type = types.bool;
2828
description = "enable nvim-treesitter-textobjects and its default configuration";
2929
};
@@ -33,7 +33,7 @@ in
3333
vim.startPlugins = with pkgs.neovimPlugins; (
3434
[ nvim-treesitter ] ++
3535
(withPlugins cfg.autotagHtml [ nvim-ts-autotag ]) ++
36-
(withPlugins cfg.textobjects [ nvim-treesitter-textobjects ])
36+
(withPlugins cfg.textobjects.enable [ nvim-treesitter-textobjects ])
3737
);
3838

3939
vim.configRC = writeIf (cfg.fold && !config.vim.lsp.folds) ''
@@ -64,7 +64,7 @@ in
6464
enable = true,
6565
},
6666
67-
${writeIf cfg.textobjects ''
67+
${writeIf cfg.textobjects.enable ''
6868
textobjects = {
6969
enable = true,
7070
swap = {

0 commit comments

Comments
 (0)