init dotfiles
This commit is contained in:
commit
2e7ba7945f
55 changed files with 3783 additions and 0 deletions
36
.config/nvim/after/plugin/treesitter-context.lua
Normal file
36
.config/nvim/after/plugin/treesitter-context.lua
Normal file
|
@ -0,0 +1,36 @@
|
|||
function ContextSetup(show_all_context)
|
||||
require("treesitter-context").setup({
|
||||
enable = true, -- Enable this plugin (Can be enabled/disabled later via commands)
|
||||
throttle = true, -- Throttles plugin updates (may improve performance)
|
||||
max_lines = 0, -- How many lines the window should span. Values <= 0 mean no limit.
|
||||
show_all_context = show_all_context,
|
||||
patterns = { -- Match patterns for TS nodes. These get wrapped to match at word boundaries.
|
||||
-- For all filetypes
|
||||
-- Note that setting an entry here replaces all other patterns for this entry.
|
||||
-- By setting the 'default' entry below, you can control which nodes you want to
|
||||
-- appear in the context window.
|
||||
default = {
|
||||
"function",
|
||||
"method",
|
||||
"for",
|
||||
"while",
|
||||
"if",
|
||||
"switch",
|
||||
"case",
|
||||
},
|
||||
|
||||
rust = {
|
||||
"loop_expression",
|
||||
"impl_item",
|
||||
},
|
||||
|
||||
typescript = {
|
||||
"class_declaration",
|
||||
"abstract_class_declaration",
|
||||
"else_clause",
|
||||
},
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
ContextSetup(false)
|
Loading…
Add table
Add a link
Reference in a new issue