diff options
| author | Steven Sojka <steelsojka@users.noreply.github.com> | 2020-08-17 11:39:22 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-17 11:39:22 -0500 |
| commit | b796f0725d913cba0a292bb7b750f0403b07c94a (patch) | |
| tree | 6645909fcf422b0d77f513514ece4a539135aba4 /lua/nvim-treesitter/configs.lua | |
| parent | 0b3cd6c131a5ee9e3377c6b348c2b8995a848967 (diff) | |
| parent | 52168114594d791a3ae6092ab2489758da7b3ae8 (diff) | |
Merge pull request #305 from theHamsta/textobjects-submodules
Textobjects submodules
Diffstat (limited to 'lua/nvim-treesitter/configs.lua')
| -rw-r--r-- | lua/nvim-treesitter/configs.lua | 36 |
1 files changed, 28 insertions, 8 deletions
diff --git a/lua/nvim-treesitter/configs.lua b/lua/nvim-treesitter/configs.lua index 02a636df..ba4ae3f8 100644 --- a/lua/nvim-treesitter/configs.lua +++ b/lua/nvim-treesitter/configs.lua @@ -7,7 +7,7 @@ local utils = require'nvim-treesitter.utils' local M = {} local function has_some_textobject_mapping(lang) - for _, v in pairs(M.get_module('textobjects').keymaps) do + for _, v in pairs(M.get_module('textobjects.select').keymaps) do if type(v) == 'table' then if v[lang] then return true @@ -79,13 +79,33 @@ local builtin_modules = { } }, textobjects = { - module_path = 'nvim-treesitter.textobjects', - enable = false, - disable = {}, - is_supported = function(lang) - return has_some_textobject_mapping(lang) or queries.has_textobjects(lang) - end, - keymaps = {} + select = { + module_path = 'nvim-treesitter.textobjects.select', + enable = false, + disable = {}, + is_supported = function(lang) + return has_some_textobject_mapping(lang) or queries.has_textobjects(lang) + end, + keymaps = {}, + }, + move = { + module_path = 'nvim-treesitter.textobjects.move', + enable = false, + disable = {}, + is_supported = queries.has_textobjects, + goto_next_start = {}, + goto_next_end = {}, + goto_previous_start = {}, + goto_previous_end = {}, + }, + swap = { + module_path = 'nvim-treesitter.textobjects.swap', + enable = false, + disable = {}, + is_supported = queries.has_textobjects, + swap_next = {}, + swap_previous = {}, + }, } } |
