add neotree and move treesitter
This commit is contained in:
parent
c268b0f2a8
commit
ddd4cd924f
3 changed files with 32 additions and 2 deletions
29
config/plugins/editor/neo-tree.nix
Normal file
29
config/plugins/editor/neo-tree.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{ pkgs, ... }: {
|
||||
|
||||
plugins.neo-tree = {
|
||||
enable = true;
|
||||
sources = [ "filesystem" "buffers" "git_status" "document_symbols" ];
|
||||
addBlankLineAtTop = true;
|
||||
|
||||
fileSystem = {
|
||||
window = {
|
||||
bindToCwd = false;
|
||||
};
|
||||
};
|
||||
|
||||
window = {
|
||||
mappings = {
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
defaultComponentConfigs = {
|
||||
indent = {
|
||||
expanderCollapsed = "";
|
||||
expanderExpanded = "";
|
||||
expanderHighlight = "NeoTreeExpander";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
63
config/plugins/editor/treesitter.nix
Normal file
63
config/plugins/editor/treesitter.nix
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
{ pkgs, ... }: {
|
||||
|
||||
plugins.treesitter = {
|
||||
enable = true;
|
||||
indent = true;
|
||||
folding = false;
|
||||
nixvimInjections = true;
|
||||
grammarPackages = pkgs.vimPlugins.nvim-treesitter.allGrammars;
|
||||
};
|
||||
|
||||
plugins.treesitter-context = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue