retab
This commit is contained in:
@@ -35,13 +35,14 @@ local is_initialized = false
|
||||
---@class TSModule
|
||||
---@field module_path string
|
||||
---@field enable boolean|string[]|function(string): boolean
|
||||
---@field disable boolean|string[]|function(string): boolean
|
||||
---@field keymaps table<string, string>
|
||||
---@field disable? boolean|string[]|function(string): boolean
|
||||
---@field keymaps? table<string, string>
|
||||
---@field is_supported function(string): boolean
|
||||
---@field attach function(string)
|
||||
---@field detach function(string)
|
||||
---@field enabled_buffers table<integer, boolean>
|
||||
---@field additional_vim_regex_highlighting boolean|string[]
|
||||
---@field attach? function(string)
|
||||
---@field detach? function(string)
|
||||
---@field enabled_buffers? table<integer, boolean>
|
||||
---@field additional_vim_regex_highlighting? boolean|string[]
|
||||
---@field loaded? boolean
|
||||
|
||||
---@type {[string]: TSModule}
|
||||
local builtin_modules = {
|
||||
@@ -412,6 +413,7 @@ function M.setup(user_data)
|
||||
config.ignore_install = user_data.ignore_install or {}
|
||||
config.parser_install_dir = user_data.parser_install_dir or nil
|
||||
if config.parser_install_dir then
|
||||
---@diagnostic disable-next-line: param-type-mismatch
|
||||
config.parser_install_dir = vim.fn.expand(config.parser_install_dir, ":p")
|
||||
end
|
||||
|
||||
@@ -434,6 +436,7 @@ function M.setup(user_data)
|
||||
|
||||
recurse_modules(function(_, _, new_path)
|
||||
local data = utils.get_at_path(config.modules, new_path)
|
||||
assert(data ~= nil)
|
||||
if data.enable then
|
||||
enable_all(new_path)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user