mirror of
https://github.com/akr2002/nv.git
synced 2024-11-09 10:39:44 +00:00
add treesitter
This commit is contained in:
parent
76c7468f5a
commit
ac2cfabf1e
4 changed files with 68 additions and 0 deletions
|
@ -14,6 +14,10 @@
|
|||
./git/lazygit.nix
|
||||
./git/neogit.nix
|
||||
|
||||
./languages/treesitter/treesitter-context.nix
|
||||
./languages/treesitter/treesitter-textobjects.nix
|
||||
./languages/treesitter/treesitter.nix
|
||||
|
||||
./dap/dap.nix
|
||||
|
||||
./filetrees/neo-tree.nix
|
||||
|
|
5
config/languages/treesitter/treesitter-context.nix
Normal file
5
config/languages/treesitter/treesitter-context.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
plugins.treesitter-context = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
51
config/languages/treesitter/treesitter-textobjects.nix
Normal file
51
config/languages/treesitter/treesitter-textobjects.nix
Normal file
|
@ -0,0 +1,51 @@
|
|||
{
|
||||
plugins.treesitter-textobjects = {
|
||||
enable = false;
|
||||
select = {
|
||||
enable = true;
|
||||
lookahead = true;
|
||||
keymaps = {
|
||||
"aa" = "@parameter.outer";
|
||||
"ia" = "@parameter.inner";
|
||||
"af" = "@function.outer";
|
||||
"if" = "@function.inner";
|
||||
"ac" = "@class.outer";
|
||||
"ic" = "@class.inner";
|
||||
"ii" = "@conditional.inner";
|
||||
"ai" = "@conditional.outer";
|
||||
"il" = "@loop.inner";
|
||||
"al" = "@loop.outer";
|
||||
"at" = "@comment.outer";
|
||||
};
|
||||
};
|
||||
move = {
|
||||
enable = true;
|
||||
gotoNextStart = {
|
||||
"]m" = "@function.outer";
|
||||
"]]" = "@class.outer";
|
||||
};
|
||||
gotoNextEnd = {
|
||||
"]M" = "@function.outer";
|
||||
"][" = "@class.outer";
|
||||
};
|
||||
gotoPreviousStart = {
|
||||
"[m" = "@function.outer";
|
||||
"[[" = "@class.outer";
|
||||
};
|
||||
gotoPreviousEnd = {
|
||||
"[M" = "@function.outer";
|
||||
"[]" = "@class.outer";
|
||||
};
|
||||
};
|
||||
swap = {
|
||||
enable = true;
|
||||
swapNext = {
|
||||
"<leader>a" = "@parameters.inner";
|
||||
};
|
||||
swapPrevious = {
|
||||
"<leader>A" = "@parameter.outer";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
8
config/languages/treesitter/treesitter.nix
Normal file
8
config/languages/treesitter/treesitter.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
plugins.treesitter = {
|
||||
enable = true;
|
||||
indent = true;
|
||||
folding = true;
|
||||
nixvimInjections = true;
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue