You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
532 B
27 lines
532 B
local M = require('module'):new()
|
|
|
|
local has_command = require('lib/has_command')
|
|
|
|
function M:initialize()
|
|
self.plugins = nukevim.modules:get('plugins')
|
|
end
|
|
|
|
function M:register()
|
|
self.plugins:add('neovim/nvim-lspconfig')
|
|
end
|
|
|
|
function M:run()
|
|
local lsp = require('lspconfig')
|
|
for provider,config in pairs(self.config.providers) do
|
|
if (has_command(config.command[1])) then
|
|
lsp[provider].setup({
|
|
cmd = config.command,
|
|
filetypes = config.filetypes
|
|
})
|
|
else
|
|
print("can't find command")
|
|
end
|
|
end
|
|
end
|
|
|
|
return M
|
|
|