Added the yaml-language-server

This commit is contained in:
Marcin Woźniak 2022-10-09 20:46:39 +02:00
parent c1da970a67
commit 18fa9e7bb2
Signed by: y0rune
GPG Key ID: F204C385F57EB348
2 changed files with 7 additions and 6 deletions

View File

@ -187,7 +187,7 @@ local handlers = {
-- Use a loop to conveniently call 'setup' on multiple servers and -- Use a loop to conveniently call 'setup' on multiple servers and
-- map buffer local keybindings when the language server attaches -- map buffer local keybindings when the language server attaches
local servers = { 'pyright', 'bashls', 'ansiblels', 'gopls', 'solargraph', 'terraformls'} local servers = { 'pyright', 'bashls', 'yamlls', 'ansiblels', 'gopls', 'solargraph', 'terraformls'}
for _, lsp in pairs(servers) do for _, lsp in pairs(servers) do
require('lspconfig')[lsp].setup { require('lspconfig')[lsp].setup {
on_attach = on_attach, on_attach = on_attach,

View File

@ -36,11 +36,6 @@ function install_yaml-language-server() {
sudo npm -g i yaml-language-server --force sudo npm -g i yaml-language-server --force
} }
function install_ansible-language-server() {
# Install ansible-language-server
sudo npm -g i @ansible/ansible-language-server --force
}
function install_shfmt() { function install_shfmt() {
# Install shfmt # Install shfmt
GO111MODULE=on go install mvdan.cc/sh/v3/cmd/shfmt@latest GO111MODULE=on go install mvdan.cc/sh/v3/cmd/shfmt@latest
@ -61,6 +56,12 @@ function install_ansible() {
pip3 install --pre --user ansible ansible-lint ansible-core pip3 install --pre --user ansible ansible-lint ansible-core
} }
function install_ansible-language-server() {
# Install ansible-language-server
sudo npm -g i @ansible/ansible-language-server --force
sudo npm -g i yaml-language-server --force
}
function main() { function main() {
command_start update_pip command_start update_pip
command_start install_pyright command_start install_pyright