diff options
| author | Stephan Seitz <stephan.seitz@fau.de> | 2020-08-16 14:50:54 +0200 |
|---|---|---|
| committer | Stephan Seitz <stephan.seitz@fau.de> | 2020-08-17 17:46:40 +0200 |
| commit | 52168114594d791a3ae6092ab2489758da7b3ae8 (patch) | |
| tree | 1a1a6a2415e6b4dee44dd322fb89655900f4ba3e /lua/nvim-treesitter/configs.lua | |
| parent | 32271b26ef64433b2d9cc41392594db614449a4c (diff) | |
chore(textobjects): split up into submodules
Diffstat (limited to 'lua/nvim-treesitter/configs.lua')
| -rw-r--r-- | lua/nvim-treesitter/configs.lua | 42 |
1 files changed, 28 insertions, 14 deletions
diff --git a/lua/nvim-treesitter/configs.lua b/lua/nvim-treesitter/configs.lua index bcaa2819..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,19 +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 = {}, - swap_next = {}, - swap_previous = {}, - goto_next_start = {}, - goto_next_end = {}, - goto_previous_start = {}, - goto_previous_end = {} + 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 = {}, + }, } } |
