aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--flake.nix3
-rw-r--r--init.lua5
2 files changed, 7 insertions, 1 deletions
diff --git a/flake.nix b/flake.nix
index 2606b32..4c818c0 100644
--- a/flake.nix
+++ b/flake.nix
@@ -122,6 +122,9 @@
languagetool
lf
terraform-ls
+ ansible-language-server
+ ansible-lint
+ ansible
]
}
makeWrapper ${myneovim}/bin/nvim $out/bin/nvim --prefix PATH : $BINPATH
diff --git a/init.lua b/init.lua
index f906d68..3a26701 100644
--- a/init.lua
+++ b/init.lua
@@ -38,6 +38,8 @@ autocmd Filetype nix setlocal ts=2 sw=2 sts=0 expandtab
autocmd Filetype terraform setlocal ts=2 sw=2 sts=0 expandtab
autocmd Filetype hcl setlocal ts=2 sw=2 sts=0 expandtab
autocmd BufNewFile,BufRead *.nomad setfiletype hcl
+autocmd BufNewFile,BufRead *.yaml setfiletype yaml.ansible
+autocmd BufNewFile,BufRead *.yml setfiletype yaml.ansible
]]
vim.o.relativenumber = true
-- Distable word wrap
@@ -223,7 +225,7 @@ end
-- Use a loop to conveniently call 'setup' on multiple servers and
-- map buffer local keybindings when the language server attaches
-- local servers = { 'pyls', 'rust_analyzer', 'tsserver' }
-local servers = { 'jedi_language_server', 'bashls', 'terraformls' }
+local servers = { 'jedi_language_server', 'bashls', 'terraformls', 'ansiblels' }
-- Add additional capabilities supported by nvim-cmp
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
@@ -355,6 +357,7 @@ vim.g.ale_linters = {
terraform = { "terraform_ls" },
markdown = { "vale" },
nix = { "nix" },
+ ansible = { "ansible-lint" },
}
vim.g.ale_fixers = {
sh = { "shfmt", },