nvim: tune yaml
This commit is contained in:
parent
8dc8f57fc6
commit
1c4260c8b6
2 changed files with 12 additions and 0 deletions
|
@ -155,6 +155,12 @@ local function on_attach(args) -- {{{
|
||||||
return { noremap = true, silent = true, buffer = args.buf, desc = desc }
|
return { noremap = true, silent = true, buffer = args.buf, desc = desc }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if client.name == 'yamlls' then
|
||||||
|
vim.keymap.set('n', '<Leader>os', function()
|
||||||
|
require('yaml-companion').open_ui_select()
|
||||||
|
end, mkOpts('Select yaml schema'))
|
||||||
|
end
|
||||||
|
|
||||||
-- null-ls has mostly no hover and therefore trashes manpages for shell
|
-- null-ls has mostly no hover and therefore trashes manpages for shell
|
||||||
if client.supports_method('textDocument/hover') and client.name ~= 'null-ls' then
|
if client.supports_method('textDocument/hover') and client.name ~= 'null-ls' then
|
||||||
vim.keymap.set('n', 'K', vim.lsp.buf.hover, mkOpts('LSP hover'))
|
vim.keymap.set('n', 'K', vim.lsp.buf.hover, mkOpts('LSP hover'))
|
||||||
|
|
|
@ -30,6 +30,12 @@ function M.config()
|
||||||
local modif = kind_func(entry, vim_item)
|
local modif = kind_func(entry, vim_item)
|
||||||
-- folders don't exist on UNIX!
|
-- folders don't exist on UNIX!
|
||||||
modif.kind = string.gsub(modif.kind, 'Folder', 'Directory')
|
modif.kind = string.gsub(modif.kind, 'Folder', 'Directory')
|
||||||
|
|
||||||
|
local max_len = 30
|
||||||
|
local content = modif.abbr
|
||||||
|
if #content > max_len then
|
||||||
|
modif.abbr = vim.fn.strcharpart(content, 0, max_len) .. '...'
|
||||||
|
end
|
||||||
return modif
|
return modif
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Reference in a new issue