chore(neovim): add keybinding to open yaml-companion select ui
This commit is contained in:
parent
afb3f83b1e
commit
9f16f36b8b
1 changed files with 5 additions and 1 deletions
|
@ -171,7 +171,7 @@ lspconfig.yamlls.setup{cfg}
|
|||
|
||||
vim.api.nvim_create_autocmd('LspAttach', {
|
||||
desc = 'LSP actions',
|
||||
callback = function()
|
||||
callback = function(ev)
|
||||
local bufmap = function(mode, lhs, rhs)
|
||||
local opts = {buffer = true}
|
||||
vim.keymap.set(mode, lhs, rhs, opts)
|
||||
|
@ -213,5 +213,9 @@ vim.api.nvim_create_autocmd('LspAttach', {
|
|||
|
||||
-- Move to the next diagnostic
|
||||
bufmap('n', ']d', '<cmd>lua vim.diagnostic.goto_next()<cr>')
|
||||
local client = vim.lsp.get_client_by_id(ev.data.client_id)
|
||||
if client.name == "yamlls" then
|
||||
bufmap ('n', '<F3>', '<cmd>lua require("yaml-companion").open_ui_select()<cr>')
|
||||
end
|
||||
end
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue