You are not logged in.

#1 2025-07-14 21:53:17

PowaBanga
Member
Registered: 2021-04-05
Posts: 30

[vim] ansible lsp and coc-diagnostic

Hi everybody, i am trying to set my vimrc ton use ansible with coc-ansible and coc-diagnostic.

so it just do not work in my case.

i added this in my vimrc :

let g:coc_filetype_map = {
  \ 'yaml.ansible': 'ansible',
  \ }

and i moved my file playbook.yml to playbook.yaml.ansible, but there is no change.

pacman -Qs ansible
zsh: correct 'ansible' to '.ansible' [nyae]? n
local/ansible 11.7.0-1
    Official assortment of Ansible collections
local/ansible-core 2.18.6-2
    Radically simple IT automation platform
local/ansible-language-server 1.2.3-1
    Ansible Language Server
local/ansible-lint 25.6.1-1
    Checks playbooks for practices and behaviour that could potentially be improved.
local/python-ansible-compat 25.6.0-1
    Functions that help interacting with various versions of Ansible
local/vim-ansible 3.4-1 (vim-plugins)
    A vim plugin for syntax highlighting Ansible's common filetypes

when i lauch the langage server i recieve an error, maybe it's why it don't work, i do not know :

ansible-language-server                                            ✔  23:51:34  
/usr/lib/node_modules/ansible-language-server/node_modules/vscode-languageserver/lib/node/main.js:192
        throw new Error('Connection input stream is not set. ' + commandLineMessage);
        ^

Error: Connection input stream is not set. Use arguments of createConnection or set command line parameters: '--node-ipc', '--stdio' or '--socket={number}'
    at _createConnection (/usr/lib/node_modules/ansible-language-server/node_modules/vscode-languageserver/lib/node/main.js:192:15)
    at createConnection (/usr/lib/node_modules/ansible-language-server/node_modules/vscode-languageserver/lib/node/main.js:137:12)
    at Object.<anonymous> (/usr/lib/node_modules/ansible-language-server/out/server/src/server.js:9:48)
    at Module._compile (node:internal/modules/cjs/loader:1730:14)
    at Object..js (node:internal/modules/cjs/loader:1895:10)
    at Module.load (node:internal/modules/cjs/loader:1465:32)
    at Function._load (node:internal/modules/cjs/loader:1282:12)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:235:24)
    at Module.require (node:internal/modules/cjs/loader:1487:12)

Node.js v22.17.0

Does anybody can help me ? smile

Offline

Board footer

Powered by FluxBB