diff --git a/lua/weeheavy/plugins/lsp/lsp-zero.lua b/lua/weeheavy/plugins/lsp/lsp-zero.lua index 1ec00e4..cdb99dd 100644 --- a/lua/weeheavy/plugins/lsp/lsp-zero.lua +++ b/lua/weeheavy/plugins/lsp/lsp-zero.lua @@ -109,11 +109,6 @@ return { local lua_opts = lsp_zero.nvim_lua_ls() require("lspconfig").lua_ls.setup(lua_opts) end, - --ansiblels = function() - -- require("lspconfig").ansiblels.setup({ - -- filetypes = "yaml", - -- }) - --end, }, }) end, diff --git a/lua/weeheavy/prefs.lua b/lua/weeheavy/prefs.lua index 0afe92b..c1766c5 100644 --- a/lua/weeheavy/prefs.lua +++ b/lua/weeheavy/prefs.lua @@ -69,3 +69,15 @@ vim.opt.splitright = true -- Mode is shown in lualine, so we don't need it one line below vim.opt.showmode = false + +-- Hobo way to to force ansiblels being used for Ansible files +vim.filetype.add({ + pattern = { + [".*/.*playbook.*.ya?ml"] = "yaml.ansible", + [".*/.*tasks.*/.*ya?ml"] = "yaml.ansible", + [".*/.*group_vars.*/.*ya?ml"] = "yaml.ansible", + [".*/.*host_vars.*/.*ya?ml"] = "yaml.ansible", + [".*/local.ya?ml"] = "yaml.ansible", + [".*-ansible/.*ya?ml"] = "yaml.ansible", + }, +}) diff --git a/lua/weeheavy/remap.lua b/lua/weeheavy/remap.lua index a722952..f5a7686 100644 --- a/lua/weeheavy/remap.lua +++ b/lua/weeheavy/remap.lua @@ -13,7 +13,7 @@ vim.keymap.set("n", "fo", ":Telescope oldfiles", { noremap = true, d vim.keymap.set( "n", "ff", - ":Telescope find_files hidden=true no_ignore=true", + ":Telescope find_files hidden=true no_ignore=false", { noremap = true, desc = "File search" } )