nvim: yamlls
This commit is contained in:
parent
7879f54cdc
commit
83b2830f3a
1 changed files with 26 additions and 17 deletions
|
@ -54,10 +54,10 @@ local function on_attach(args) -- {{{
|
||||||
max_height = nil, -- Maximum signature popup height
|
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
|
-- Events that will close the signature popup window: use {"CursorMoved", "CursorMovedI", "InsertCharPre"} to hide the window when typing
|
||||||
close_events = { 'CursorMoved', 'BufHidden', 'InsertLeave' },
|
close_events = { 'CursorMoved', 'BufHidden', 'InsertLeave' },
|
||||||
focusable = true, -- Make the popup float focusable
|
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)
|
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_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
|
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
|
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
|
-- (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)
|
-- 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 -- }}}
|
end -- }}}
|
||||||
|
|
||||||
local function config() -- {{{
|
local function config() -- {{{
|
||||||
require('neodev').setup({})
|
require('neodev').setup({})
|
||||||
|
@ -189,19 +189,20 @@ local function config() -- {{{
|
||||||
-- Use a loop to conveniently both setup defined servers
|
-- Use a loop to conveniently both setup defined servers
|
||||||
-- and map buffer local keybindings when the language server attaches
|
-- and map buffer local keybindings when the language server attaches
|
||||||
local servers = {
|
local servers = {
|
||||||
powershell_es = {},
|
-- powershell_es = {},
|
||||||
gopls = {},
|
gopls = {},
|
||||||
clangd = {},
|
clangd = {},
|
||||||
zls = {},
|
zls = {},
|
||||||
hls = {},
|
-- hls = {},
|
||||||
tsserver = {},
|
tsserver = {},
|
||||||
perlls = {},
|
-- perlls = {},
|
||||||
rust_analyzer = {},
|
rust_analyzer = {},
|
||||||
cssls = {},
|
cssls = {},
|
||||||
html = {},
|
html = {},
|
||||||
lemminx = {}, -- xml
|
lemminx = {}, -- xml
|
||||||
rnix = {},
|
rnix = {},
|
||||||
omnisharp = { -- {{{
|
omnisharp = {
|
||||||
|
-- {{{
|
||||||
handlers = {
|
handlers = {
|
||||||
['textDocument/definition'] = require('omnisharp_extended').handler,
|
['textDocument/definition'] = require('omnisharp_extended').handler,
|
||||||
-- ['textDocument/publishDiagnostics'] = vim.lsp.with(
|
-- ['textDocument/publishDiagnostics'] = vim.lsp.with(
|
||||||
|
@ -212,7 +213,7 @@ local function config() -- {{{
|
||||||
-- }
|
-- }
|
||||||
-- ),
|
-- ),
|
||||||
},
|
},
|
||||||
cmd = { '/usr/bin/omnisharp' },
|
cmd = { 'omnisharp' },
|
||||||
enable_editorconfig_support = true,
|
enable_editorconfig_support = true,
|
||||||
enable_ms_build_load_projects_on_demand = false,
|
enable_ms_build_load_projects_on_demand = false,
|
||||||
enable_roslyn_analyzers = true,
|
enable_roslyn_analyzers = true,
|
||||||
|
@ -221,7 +222,8 @@ local function config() -- {{{
|
||||||
sdk_include_prereleases = true,
|
sdk_include_prereleases = true,
|
||||||
analyze_open_documents_only = true,
|
analyze_open_documents_only = true,
|
||||||
}, -- }}}
|
}, -- }}}
|
||||||
lua_ls = { -- {{{
|
lua_ls = {
|
||||||
|
-- {{{
|
||||||
settings = {
|
settings = {
|
||||||
Lua = {
|
Lua = {
|
||||||
workleader = {
|
workleader = {
|
||||||
|
@ -233,7 +235,8 @@ local function config() -- {{{
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}, -- }}}
|
}, -- }}}
|
||||||
phpactor = { -- {{{
|
phpactor = {
|
||||||
|
-- {{{
|
||||||
handlers = {
|
handlers = {
|
||||||
['textDocument/publishDiagnostics'] = vim.lsp.with(
|
['textDocument/publishDiagnostics'] = vim.lsp.with(
|
||||||
vim.lsp.diagnostic.on_publish_diagnostics, {
|
vim.lsp.diagnostic.on_publish_diagnostics, {
|
||||||
|
@ -254,15 +257,21 @@ local function config() -- {{{
|
||||||
end)
|
end)
|
||||||
end,
|
end,
|
||||||
}, -- }}}
|
}, -- }}}
|
||||||
yamlls = { -- {{{
|
yamlls = {
|
||||||
|
-- {{{
|
||||||
settings = {
|
settings = {
|
||||||
validate = { enable = true },
|
yaml = {
|
||||||
json = {
|
format = { enable = true },
|
||||||
schemas = require('schemastore').json.schemas {},
|
validate = { enable = true },
|
||||||
|
completion = { enable = true },
|
||||||
|
hover = { enable = true },
|
||||||
|
schemas = require('schemastore').yaml.schemas(),
|
||||||
|
keyOrdering = false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}, -- }}}
|
}, -- }}}
|
||||||
jsonls = { -- {{{
|
jsonls = {
|
||||||
|
-- {{{
|
||||||
settings = {
|
settings = {
|
||||||
validate = { enable = true },
|
validate = { enable = true },
|
||||||
json = {
|
json = {
|
||||||
|
|
Loading…
Add table
Reference in a new issue