1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-03 19:50:04 +08:00
SpaceVim/bundle/nvim-lspconfig/lua/lspconfig/ansiblels.lua

40 lines
882 B
Lua
Raw Normal View History

2021-10-05 15:13:10 +08:00
local configs = require 'lspconfig/configs'
local util = require 'lspconfig/util'
local server_name = 'ansiblels'
configs[server_name] = {
default_config = {
cmd = { 'ansible-language-server', '--stdio' },
settings = {
ansible = {
python = {
interpreterPath = 'python',
},
ansibleLint = {
path = 'ansible-lint',
enabled = true,
},
ansible = {
path = 'ansible',
},
},
},
filetypes = { 'yaml' },
root_dir = function(fname)
return util.root_pattern { '*.yml', '*.yaml' }(fname)
end,
},
docs = {
description = [[
https://github.com/ansible/ansible-language-server
Language server for the ansible configuration management tool.
`ansible-language-server` can be installed via `yarn`:
```sh
yarn global add ansible-language-server
```
]],
},
}