diff options
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/nvim-treesitter/configs.lua | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lua/nvim-treesitter/configs.lua b/lua/nvim-treesitter/configs.lua index 6e1923768..b0d38244e 100644 --- a/lua/nvim-treesitter/configs.lua +++ b/lua/nvim-treesitter/configs.lua @@ -154,6 +154,18 @@ local function recurse_modules(accumulator, root, path) end end +-- Shows current configuration of all nvim-treesitter modules +-- @param process_function function used as the `process` parameter +-- for vim.inspect (https://github.com/kikito/inspect.lua#optionsprocess) +local function config_info(process_function) + process_function = process_function or function(item, path) + if path[#path] == vim.inspect.METATABLE then return end + if path[#path] == "is_supported" then return end + return item + end + print(vim.inspect(config, {process = process_function})) +end + M.commands = { TSBufEnable = { run = enable_module, @@ -183,6 +195,12 @@ M.commands = { "-complete=custom,nvim_treesitter#available_modules", }, }, + TSConfigInfo = { + run = config_info, + args = { + "-nargs=0", + }, + }, } -- @param mod: module (string) |
