coq_nvim
coq_nvim copied to clipboard
Yaml snippets not showing up
Coq comes with default snippets if coq.arifacts is installed, this is working out of the box for files like go, python, typescript and javascript and many more.
Execept for yamls, i cant access any snippets in yaml files.
I like to have all the kubernetes snippets available in every *.yaml file.
I tried to configure the yamlls language server to map all yamls to the filetype kubernetes, but it dosent work.
My lsp config looks like this:
local lspconfig = require('lspconfig')
-- coq autocompletion
-- set xdg dir for coqDeps since nix is readonly
vim.g.coq_settings = {
xdg = true,
auto_start = 'shut-up',
}
local coq = require "coq"
local servers = {
gopls = {},
rnix = {},
terraformls = {},
rust_analyzer = {},
yamlls = {
filetypes = {"yaml", "kubernetes"},
},
}
for server, config in pairs(servers) do
lspconfig[server].setup(coq.lsp_ensure_capabilities(
vim.tbl_deep_extend("force", {
on_attach = on_attach,
capabilities = capabilities,
flags = {debounce_text_changes = 150},
filetypes = config.filetypes,
}, {}))
)
local cfg = lspconfig[server]
if not (cfg and cfg.cmd and vim.fn.executable(cfg.cmd[1]) == 1) then
print(server .. ": cmd not found: " .. vim.inspect(cfg.cmd))
end
end