Add ansible LSP
This commit is contained in:
26
nvim/lsp/ansiblels.lua
Normal file
26
nvim/lsp/ansiblels.lua
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
-- https://github.com/neovim/nvim-lspconfig/blob/master/lsp/ansiblels.lua
|
||||||
|
return {
|
||||||
|
cmd = { "ansible-language-server", "--stdio" },
|
||||||
|
filetypes = { "yaml.ansible" },
|
||||||
|
root_markers = { "ansible.cfg", ".ansible-lint" },
|
||||||
|
settings = {
|
||||||
|
ansible = {
|
||||||
|
python = {
|
||||||
|
interpreterPath = "python",
|
||||||
|
},
|
||||||
|
ansible = {
|
||||||
|
path = "ansible",
|
||||||
|
},
|
||||||
|
executionEnvironment = {
|
||||||
|
enabled = false,
|
||||||
|
},
|
||||||
|
validation = {
|
||||||
|
enabled = true,
|
||||||
|
lint = {
|
||||||
|
enabled = true,
|
||||||
|
path = "ansible-lint",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
vim.lsp.enable({
|
vim.lsp.enable({
|
||||||
|
"ansiblels",
|
||||||
"dockerls",
|
"dockerls",
|
||||||
"gitlabcils",
|
"gitlabcils",
|
||||||
"helmls",
|
"helmls",
|
||||||
|
|||||||
8
nvim/lua/plugins/ansible-ls.lua
Normal file
8
nvim/lua/plugins/ansible-ls.lua
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
-- https://github.com/mfussenegger/nvim-ansible/tree/main
|
||||||
|
return {
|
||||||
|
"mfussenegger/nvim-ansible",
|
||||||
|
ft = "yaml.ansible",
|
||||||
|
opts = {
|
||||||
|
-- leave empty or see below
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -21,6 +21,7 @@ return {
|
|||||||
"WhoIsSethDaniel/mason-tool-installer.nvim",
|
"WhoIsSethDaniel/mason-tool-installer.nvim",
|
||||||
opts = {
|
opts = {
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
|
"ansible-language-server", -- https://github.com/ansible/vscode-ansible
|
||||||
"docker-language-server", -- https://github.com/docker/docker-language-server
|
"docker-language-server", -- https://github.com/docker/docker-language-server
|
||||||
"gitlab-ci-ls", -- https://github.com/alesbrelih/gitlab-ci-ls
|
"gitlab-ci-ls", -- https://github.com/alesbrelih/gitlab-ci-ls
|
||||||
"helm-ls", -- https://github.com/mrjosh/helm-ls
|
"helm-ls", -- https://github.com/mrjosh/helm-ls
|
||||||
|
|||||||
Reference in New Issue
Block a user