From 83b2830f3a6b19cdd024e83b025d882fcdf31b40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Dudr?= Date: Fri, 31 Mar 2023 12:15:01 +0200 Subject: [PATCH] nvim: yamlls --- dot_config/nvim/lua/configs/packages/lsp.lua | 43 ++++++++++++-------- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/dot_config/nvim/lua/configs/packages/lsp.lua b/dot_config/nvim/lua/configs/packages/lsp.lua index f194859..0d33879 100644 --- a/dot_config/nvim/lua/configs/packages/lsp.lua +++ b/dot_config/nvim/lua/configs/packages/lsp.lua @@ -54,10 +54,10 @@ local function on_attach(args) -- {{{ max_height = nil, -- Maximum signature popup height -- Events that will close the signature popup window: use {"CursorMoved", "CursorMovedI", "InsertCharPre"} to hide the window when typing close_events = { 'CursorMoved', 'BufHidden', 'InsertLeave' }, - focusable = true, -- Make the popup float focusable - focus = false, -- If focusable is also true, and this is set to true, navigating through overloads will focus into the popup window (probably not what you want) - offset_x = 0, -- Horizontal offset of the floating window relative to the cursor position - offset_y = 0, -- Vertical offset of the floating window relative to the cursor position + focusable = true, -- Make the popup float focusable + focus = false, -- If focusable is also true, and this is set to true, navigating through overloads will focus into the popup window (probably not what you want) + offset_x = 0, -- Horizontal offset of the floating window relative to the cursor position + offset_y = 0, -- Vertical offset of the floating window relative to the cursor position floating_window_above_cur_line = false, -- Attempt to float the popup above the cursor position -- (note, if the height of the float would be greater than the space left above the cursor, it will default -- to placing the float below the cursor. The max_height option allows for finer tuning of this) @@ -175,7 +175,7 @@ local function on_attach(args) -- {{{ }, } end -end -- }}} +end -- }}} local function config() -- {{{ require('neodev').setup({}) @@ -189,19 +189,20 @@ local function config() -- {{{ -- Use a loop to conveniently both setup defined servers -- and map buffer local keybindings when the language server attaches local servers = { - powershell_es = {}, + -- powershell_es = {}, gopls = {}, clangd = {}, zls = {}, - hls = {}, + -- hls = {}, tsserver = {}, - perlls = {}, + -- perlls = {}, rust_analyzer = {}, cssls = {}, html = {}, lemminx = {}, -- xml rnix = {}, - omnisharp = { -- {{{ + omnisharp = { + -- {{{ handlers = { ['textDocument/definition'] = require('omnisharp_extended').handler, -- ['textDocument/publishDiagnostics'] = vim.lsp.with( @@ -212,7 +213,7 @@ local function config() -- {{{ -- } -- ), }, - cmd = { '/usr/bin/omnisharp' }, + cmd = { 'omnisharp' }, enable_editorconfig_support = true, enable_ms_build_load_projects_on_demand = false, enable_roslyn_analyzers = true, @@ -221,7 +222,8 @@ local function config() -- {{{ sdk_include_prereleases = true, analyze_open_documents_only = true, }, -- }}} - lua_ls = { -- {{{ + lua_ls = { + -- {{{ settings = { Lua = { workleader = { @@ -233,7 +235,8 @@ local function config() -- {{{ }, }, }, -- }}} - phpactor = { -- {{{ + phpactor = { + -- {{{ handlers = { ['textDocument/publishDiagnostics'] = vim.lsp.with( vim.lsp.diagnostic.on_publish_diagnostics, { @@ -254,15 +257,21 @@ local function config() -- {{{ end) end, }, -- }}} - yamlls = { -- {{{ + yamlls = { + -- {{{ settings = { - validate = { enable = true }, - json = { - schemas = require('schemastore').json.schemas {}, + yaml = { + format = { enable = true }, + validate = { enable = true }, + completion = { enable = true }, + hover = { enable = true }, + schemas = require('schemastore').yaml.schemas(), + keyOrdering = false, }, }, }, -- }}} - jsonls = { -- {{{ + jsonls = { + -- {{{ settings = { validate = { enable = true }, json = {