add treesitter textobjects
This commit is contained in:
parent
87e396ff15
commit
58659399ea
2 changed files with 14 additions and 3 deletions
|
@ -9,7 +9,6 @@
|
|||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
||||
"cosmic-ui": { "branch": "main", "commit": "ab7de388576eaac02ce7bc2389e55b8e207aad12" },
|
||||
"dashboard-nvim": { "branch": "master", "commit": "000448d837f6e7a47f8f342f29526c4d7e49e9ce" },
|
||||
"fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "4c40357994f386e72be92a46f41fc1664c84c87d" },
|
||||
|
@ -27,6 +26,7 @@
|
|||
"nvim-lspconfig": { "branch": "master", "commit": "84e0cd5a3c58e88ef706fdf4a1eed59ded1d3ce2" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "55c5c762fee2e813b4e43bbfaf5b91d182bd2875" },
|
||||
"nvim-treesitter-refactor": { "branch": "master", "commit": "d8b74fa87afc6a1e97b18da23e762efb032dc270" },
|
||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "143856b1cee509a190cc8c17ddb0638002171235" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" },
|
||||
"nvim-ts-context-commentstring": { "branch": "main", "commit": "1b212c2eee76d787bbea6aa5e92a2b534e7b4f8f" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
||||
|
|
|
@ -29,6 +29,16 @@ local config = {
|
|||
highlight_definitions = { enable = true },
|
||||
highlight_current_scope = { enable = false },
|
||||
},
|
||||
textobjects = {
|
||||
select = {
|
||||
enable = true,
|
||||
lookahead = true,
|
||||
keymaps = {
|
||||
['af'] = '@function.outer',
|
||||
['if'] = '@function.inner',
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
return {
|
||||
|
@ -37,13 +47,14 @@ return {
|
|||
'windwp/nvim-ts-autotag',
|
||||
'JoosepAlviste/nvim-ts-context-commentstring',
|
||||
'nvim-treesitter/nvim-treesitter-refactor',
|
||||
'nvim-treesitter/nvim-treesitter-textobjects',
|
||||
},
|
||||
event = 'BufEnter',
|
||||
build = ':TSUpdate',
|
||||
config = function()
|
||||
require('nvim-treesitter.configs').setup(config)
|
||||
require('ts_context_commentstring').setup {
|
||||
require('ts_context_commentstring').setup({
|
||||
enable_autocmd = false,
|
||||
}
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue