From f77c1d90aa6614bf7ce0b9e58ac2bf149919d7d7 Mon Sep 17 00:00:00 2001 From: Danielle McLean Date: Tue, 10 Oct 2023 12:01:24 +1100 Subject: [PATCH] Add LSP config for YAML and TOML --- config/vim/lsp.vim | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/config/vim/lsp.vim b/config/vim/lsp.vim index 4af017c..6193ac5 100644 --- a/config/vim/lsp.vim +++ b/config/vim/lsp.vim @@ -17,6 +17,14 @@ const lspServers = [ install: 'brew install lua-language-server', }, + { + name: 'taplo', + filetype: 'toml', + path: '/usr/local/bin/taplo', + args: ['lsp', 'stdio'], + install: 'brew install taplo', + }, + { name: 'tilt-lsp', filetype: 'bzl', @@ -67,10 +75,23 @@ const lspServers = [ args: ['--stdio'], install: 'npm install -g vim-language-server', }, + + { + name: 'yaml-language-server', + filetype: 'yaml', + path: expand('~/.local/bin/yaml-language-server'), + args: ['--stdio'], + workspaceConfig: {yaml: { + format: {enable: true, singleQuote: true}, + schemaStore: {enable: true, url: 'https://www.schemastore.org/api/json/catalog.json'}, + }}, + install: 'npm install -g yaml-language-server', + }, ] const lspOptions = { aleSupport: true, + ignoreMissingServer: true, } command! -nargs=0 -bar LspInstall Install()