chore(neovim): add keybinding to open yaml-companion select ui

This commit is contained in:
Yorick Barbanneau 2025-01-02 11:35:43 +01:00
parent afb3f83b1e
commit 9f16f36b8b

View file

@ -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
})