nvim: add ansible lsp
This commit is contained in:
parent
fc4d574616
commit
66cf987b93
1 changed files with 36 additions and 0 deletions
36
services/nvim/lsp/ansible.nix
Normal file
36
services/nvim/lsp/ansible.nix
Normal file
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
lib.optionalAttrs (lib.elem "nvim::lsp::ansible" config.machine.services) {
|
||||
ansiblels = {
|
||||
cmd = [
|
||||
"${pkgs.ansible-language-server}/bin/ansible-language-server"
|
||||
"--stdio"
|
||||
];
|
||||
filetypes = [
|
||||
"yaml"
|
||||
"yaml.ansible"
|
||||
"yml"
|
||||
"yml.ansible"
|
||||
];
|
||||
settings = {
|
||||
ansible = {
|
||||
ansible.path = "${pkgs.ansible}/bin/ansible";
|
||||
python = {
|
||||
interpreterPath = "${config.machine.pkgsets.python3.pkgwrap}/bin/python";
|
||||
};
|
||||
validation = {
|
||||
enabled = true;
|
||||
lint = {
|
||||
enabled = true;
|
||||
path = "${pkgs.ansible-lint}/bin/ansible-lint";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue