feat(nvim): add autodetection of ansible files

This commit is contained in:
sankalp committed 2024-02-27 17:58:43 +05:45
1 parent 1f6ed14c6e
commit c0cec46d5f
5 files changed
+28 -9

No files matched your search

@@ -18,6 +18,10 @@ return {
return vim.fn["codeium#Accept"]()
end, opts)
vim.keymap.set("n", "<leader>ch", function()
return vim.fn["codeium#Chat"]()
end, { desc = "Chat with IA (Codeium)" })
vim.keymap.set("i", "<M-]>", function()
return vim.fn["codeium#CycleCompletions"](1)
end, opts)
@@ -9,6 +9,18 @@ return {
},
{
"neovim/nvim-lspconfig",
init = function()
vim.filetype.add({
pattern = {
[".*/playbooks/.*%.yaml"] = "yaml.ansible",
[".*/playbooks/.*%.yml"] = "yaml.ansible",
[".*/roles/.*/tasks/.*%.yaml"] = "yaml.ansible",
[".*/roles/.*/tasks/.*%.yml"] = "yaml.ansible",
[".*/roles/.*/handlers/.*%.yaml"] = "yaml.ansible",
[".*/roles/.*/handlers/.*%.yml"] = "yaml.ansible",
},
})
end,
opts = {
servers = {
ansiblels = {},
@@ -124,8 +124,9 @@ return {
{
"dmmulroy/tsc.nvim",
opts = {
auto_start_watch_mode = false,
flags = {
watch = true,
watch = false,
},
},
keys = {
@@ -136,6 +137,11 @@ return {
"typescriptreact",
},
},
{
"dmmulroy/ts-error-translator.nvim",
ft = { "typescript", "typescriptreact" },
opts = {},
},
{
"nvim-neotest/neotest",
optional = true,