Skip to content

Commit

Permalink
feat(treesitter): remove treesitter textobjects select
Browse files Browse the repository at this point in the history
  • Loading branch information
BBboy01 committed Nov 24, 2023
1 parent 3d0d46b commit 31bd9d6
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 17 deletions.
10 changes: 5 additions & 5 deletions lazy-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"flash.nvim": { "branch": "main", "commit": "48817af25f51c0590653bbc290866e4890fe1cbe" },
"friendly-snippets": { "branch": "main", "commit": "43727c2ff84240e55d4069ec3e6158d74cb534b6" },
"git.nvim": { "branch": "main", "commit": "741696687486f25f8b73d9e4c76ab2ede9998f39" },
"gitsigns.nvim": { "branch": "main", "commit": "0ccd5fb2316b3f8d8b2f775bc31cae7bc6a77a55" },
"gitsigns.nvim": { "branch": "main", "commit": "5fc573f2d2a49aec74dd6dc977e8b137429d1897" },
"indentmini.nvim": { "branch": "main", "commit": "a58129ae424fd6d8e0e2e7f6ce06c0443101e370" },
"lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" },
"lspsaga.nvim": { "branch": "main", "commit": "d3dfaea0125315110ea720c337ab88aa451d75e7" },
Expand All @@ -18,13 +18,13 @@
"mini.comment": { "branch": "main", "commit": "3d9c8009615857e982f09bc5357fc95f2a2175f3" },
"mini.pairs": { "branch": "main", "commit": "71f117fd57f930da6ef4126b24f594dd398bac26" },
"mini.surround": { "branch": "main", "commit": "af8129efcabe95fc08a233e9f91569829bed031f" },
"neodev.nvim": { "branch": "main", "commit": "627b5b543f4df551fcddb99c17a8e260c453400d" },
"neodev.nvim": { "branch": "main", "commit": "f972d7e6cd21b691199565cfe3e6487e774a4e8f" },
"neogen": { "branch": "main", "commit": "70127baaff25611deaf1a29d801fc054ad9d2dc1" },
"none-ls.nvim": { "branch": "main", "commit": "ac5a9a63abeb48d6236ba71a9db4f7814e65ed82" },
"none-ls.nvim": { "branch": "main", "commit": "f1c0066bb3e9669d82040ddcf45a4d60c83ecca7" },
"nvim-cmp": { "branch": "main", "commit": "0b751f6beef40fd47375eaf53d3057e0bfa317e4" },
"nvim-lspconfig": { "branch": "master", "commit": "addad5176dbbe8bcc82ef91c51c5f1bf6629ec2d" },
"nvim-lspconfig": { "branch": "master", "commit": "553c4e0e667167640c5398573f6f3a488ff8047a" },
"nvim-tree.lua": { "branch": "master", "commit": "086bf310bd19a7103ee7d761eb59f89f3dd23e21" },
"nvim-treesitter": { "branch": "master", "commit": "7da3cb6323d1e1fbfc4d7dc05cac74946458b8a0" },
"nvim-treesitter": { "branch": "master", "commit": "71bdf97bf6dafc776ad957169533f2f669a8c562" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "dbcd9388e3b119a87c785e10a00d62876077d23d" },
"nvim-ts-autotag": { "branch": "main", "commit": "6be1192965df35f94b8ea6d323354f7dc7a557e4" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "bdd2a3293340465a516b126d10894f6d5cb5213c" },
Expand Down
40 changes: 28 additions & 12 deletions lua/plugins/treesitter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,31 @@ return {
'windwp/nvim-ts-autotag',
'p00f/nvim-ts-rainbow',
},
---@type TSConfig
---@diagnostic disable-next-line: missing-fields
opts = {
ensure_installed = {
'bash',
'diff',
'html',
'toml',
'javascript',
'jsdoc',
'json',
'jsonc',
'lua',
'luadoc',
'luap',
'markdown',
'markdown_inline',
'python',
'query',
'regex',
'tsx',
'typescript',
'vim',
'vimdoc',
'yaml',
'astro',
'cmake',
'cpp',
Expand Down Expand Up @@ -75,19 +98,12 @@ return {
-- termcolors = {} -- table of colour name strings
},
textobjects = {
select = {
move = {
enable = true,
lookahead = true,
keymaps = {
['aa'] = '@parameter.outer',
['ia'] = '@parameter.inner',
['af'] = '@function.outer',
['if'] = '@function.inner',
['ac'] = '@conditional.outer',
['ic'] = '@conditional.inner',
['al'] = '@loop.outer',
['il'] = '@loop.inner',
},
goto_next_start = { [']f'] = '@function.outer', [']c'] = '@class.outer' },
goto_next_end = { [']F'] = '@function.outer', [']C'] = '@class.outer' },
goto_previous_start = { ['[f'] = '@function.outer', ['[c'] = '@class.outer' },
goto_previous_end = { ['[F'] = '@function.outer', ['[C'] = '@class.outer' },
},
},
},
Expand Down

0 comments on commit 31bd9d6

Please sign in to comment.