add treesitter context
This commit is contained in:
@ -3,9 +3,14 @@ return {
|
|||||||
'nvim-treesitter/nvim-treesitter',
|
'nvim-treesitter/nvim-treesitter',
|
||||||
dependencies = {
|
dependencies = {
|
||||||
'nvim-treesitter/nvim-treesitter-textobjects', -- maybe try mini.ai instead?
|
'nvim-treesitter/nvim-treesitter-textobjects', -- maybe try mini.ai instead?
|
||||||
|
'nvim-treesitter/nvim-treesitter-context',
|
||||||
},
|
},
|
||||||
build = ':TSUpdate',
|
build = ':TSUpdate',
|
||||||
main = 'nvim-treesitter.configs', -- Sets main module to use for opts
|
main = 'nvim-treesitter.configs', -- Sets main module to use for opts
|
||||||
|
config = function(_, opts)
|
||||||
|
require('nvim-treesitter.configs').setup(opts)
|
||||||
|
require('treesitter-context').setup(opts.context)
|
||||||
|
end,
|
||||||
opts = {
|
opts = {
|
||||||
auto_install = false,
|
auto_install = false,
|
||||||
highlight = { enable = true },
|
highlight = { enable = true },
|
||||||
@ -72,6 +77,9 @@ return {
|
|||||||
include_surrounding_whitespace = true,
|
include_surrounding_whitespace = true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
context = {
|
||||||
|
enable = true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user