Skip to content

Commit

Permalink
treesitter-context toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
siph committed Jan 13, 2024
1 parent f33f02e commit 805037a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions config/treesitter/context.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
plugins.treesitter-context.enable = true;

keymaps = [
{
mode = "n";
key = "<leader>tc";
action = "<cmd>TSContextToggle<CR>";
options.desc = "Toggle treesitter context";
}
];
}
1 change: 1 addition & 0 deletions config/treesitter/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
imports = [
./context.nix
./treesitter.nix
];
}
1 change: 0 additions & 1 deletion config/treesitter/treesitter.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
vimPlugins.nvim-treesitter.passthru.allGrammars
++ [tree-sitter-grammars.tree-sitter-nu];
};
treesitter-context.enable = true;
};

extraFiles = with pkgs.tree-sitter-grammars; {
Expand Down

0 comments on commit 805037a

Please sign in to comment.