aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua')
-rw-r--r--lua/lspconfig/util.lua10
1 files changed, 6 insertions, 4 deletions
diff --git a/lua/lspconfig/util.lua b/lua/lspconfig/util.lua
index a678db79..2fb5e72b 100644
--- a/lua/lspconfig/util.lua
+++ b/lua/lspconfig/util.lua
@@ -88,10 +88,12 @@ end
function M.create_module_commands(module_name, commands)
for command_name, def in pairs(commands) do
- local opts = M._parse_user_command_options(def)
- api.nvim_create_user_command(command_name, function(info)
- require('lspconfig')[module_name].commands[command_name][1](unpack(info.fargs))
- end, opts)
+ if type(def) ~= 'function' then
+ local opts = M._parse_user_command_options(def)
+ api.nvim_create_user_command(command_name, function(info)
+ require('lspconfig')[module_name].commands[command_name][1](unpack(info.fargs))
+ end, opts)
+ end
end
end