mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-24 09:48:42 +02:00
plugins/treesitter-textobjects: init
This commit is contained in:
parent
0b1984ed81
commit
563a42c71c
3 changed files with 352 additions and 0 deletions
|
@ -0,0 +1,84 @@
|
|||
{
|
||||
empty = {
|
||||
plugins = {
|
||||
treesitter.enable = true;
|
||||
treesitter-textobjects.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
example = {
|
||||
plugins = {
|
||||
treesitter.enable = true;
|
||||
treesitter-textobjects = {
|
||||
enable = true;
|
||||
|
||||
select = {
|
||||
enable = true;
|
||||
disable = [];
|
||||
lookahead = true;
|
||||
keymaps = {
|
||||
af = "@function.outer";
|
||||
"if" = "@function.inner";
|
||||
ac = "@class.outer";
|
||||
ic = {
|
||||
query = "@class.inner";
|
||||
desc = "Select inner part of a class region";
|
||||
};
|
||||
};
|
||||
selectionModes = {
|
||||
"@parameter.outer" = "v";
|
||||
"@function.outer" = "V";
|
||||
"@class.outer" = "<c-v>";
|
||||
};
|
||||
includeSurroundingWhitespace = true;
|
||||
};
|
||||
swap = {
|
||||
enable = true;
|
||||
disable = [];
|
||||
swapNext = {
|
||||
"<leader>a" = "@parameter.inner";
|
||||
};
|
||||
swapPrevious = {
|
||||
"<leader>A" = "@parameter.inner";
|
||||
};
|
||||
};
|
||||
move = {
|
||||
enable = true;
|
||||
disable = [];
|
||||
setJumps = 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";
|
||||
};
|
||||
gotoNext = {
|
||||
"]d" = "@conditional.outer";
|
||||
};
|
||||
gotoPrevious = {
|
||||
"[d" = "@conditional.outer";
|
||||
};
|
||||
};
|
||||
lspInterop = {
|
||||
enable = true;
|
||||
border = "none";
|
||||
peekDefinitionCode = {
|
||||
"<leader>df" = "@function.outer";
|
||||
"<leader>dF" = "@class.outer";
|
||||
};
|
||||
floatingPreviewOpts = {};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue