neovim: proper yamlls setup
This commit is contained in:
parent
8762792936
commit
276294bc0c
@ -5,40 +5,6 @@ local async = require('plenary.async')
|
||||
-- NOTE: Keep this near top
|
||||
lsp_installer.setup({})
|
||||
|
||||
local required_servers = {
|
||||
'sumneko_lua',
|
||||
'rust_analyzer',
|
||||
'bashls',
|
||||
'eslint',
|
||||
'dockerls',
|
||||
'ansiblels',
|
||||
'tsserver',
|
||||
'yamlls',
|
||||
'jdtls',
|
||||
'html',
|
||||
'vimls',
|
||||
'clangd',
|
||||
'omnisharp',
|
||||
'sqls',
|
||||
'yamlls',
|
||||
'terraformls',
|
||||
'tflint',
|
||||
}
|
||||
|
||||
for _, name in pairs(required_servers) do
|
||||
local server_is_found, server = lsp_installer.get_server(name)
|
||||
if server_is_found then
|
||||
if not server:is_installed() then
|
||||
async.run(function()
|
||||
vim.notify.async('Installing Language Server ' .. name, 'info', {
|
||||
title = 'Lsp Installer',
|
||||
})
|
||||
end)
|
||||
server:install()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function on_attach(client, bufnr)
|
||||
async.run(function()
|
||||
vim.notify.async('Attached server ' .. client.name, 'info', {
|
||||
@ -155,6 +121,19 @@ lspconfig.pylsp.setup({
|
||||
},
|
||||
})
|
||||
|
||||
lspconfig.yamlls.setup({
|
||||
settings = {
|
||||
yaml = {
|
||||
schemas = {
|
||||
['https://json.schemastore.org/github-workflow.json'] = '/.github/workflows/*',
|
||||
['https://raw.githubusercontent.com/microsoft/azure-pipelines-vscode/master/service-schema.json'] = '/azure-pipeline.y*l',
|
||||
['https://raw.githubusercontent.com/docker/cli/master/cli/compose/schema/data/config_schema_v3.10.json'] = '/docker-compose.y*l',
|
||||
['https://gitlab.com/gitlab-org/gitlab/-/raw/master/app/assets/javascripts/editor/schema/ci.json'] = '/.gitlab-ci.yml',
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- NOTE: GENERIC LSP SERVERS
|
||||
for _, server in ipairs({
|
||||
'clangd',
|
||||
@ -170,8 +149,6 @@ for _, server in ipairs({
|
||||
'tsserver',
|
||||
'vimls',
|
||||
'vuels',
|
||||
'yamlls',
|
||||
'yamlls',
|
||||
'tsserver',
|
||||
}) do
|
||||
lspconfig[server].setup(opts)
|
||||
|
Loading…
Reference in New Issue
Block a user