Add ansible filetype so that LSP works correctly

This commit is contained in:
Ducky SSH User
2025-12-07 22:59:28 +00:00
parent 73bb97ed1d
commit 736a2699b9
3 changed files with 34 additions and 7 deletions

View File

@@ -643,6 +643,9 @@ require('lazy').setup({
},
},
},
ansiblels = {
filetypes = { 'yaml.ansible', 'ansible' },
},
}
-- Ensure the servers and tools above are installed
@@ -653,12 +656,13 @@ require('lazy').setup({
-- You can press `g?` for help in this menu.
require('mason').setup()
-- You can add other tools here that you want Mason to install
-- for you, so that they are available from within Neovim.
local ensure_installed = vim.tbl_keys(servers or {})
vim.list_extend(ensure_installed, {
'stylua', -- Used to format Lua code
})
-- You can add other tools here that you want Mason to install
-- for you, so that they are available from within Neovim.
local ensure_installed = vim.tbl_keys(servers or {})
vim.list_extend(ensure_installed, {
'stylua', -- Used to format Lua code
'ansible-language-server', -- Ansible LSP for YAML Ansible files
})
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
require('mason-lspconfig').setup {