I’m trying to use LazyVim https://www.lazyvim.org/ to create and edit ansible playbooks and roles, but for the live of my I don’t understand how to enable ansible-language-server.

The installation of lazyvim went flawless and after starting nvim I used the command :Mason to install:

  • ansible-language-server
  • ansible-lint
  • yaml-language-server
  • yamllint

but still, when opening a task or playbook file in nvim, i don’t get any of that cool features like snippets and automatic syntax checking like I hoped.

Can anyone give me a hint how to enable those? Mason says the plugins are installed, is it only a problem of nvim not recognizing the filetype as ansible? Do I need to enable some plugins via .config/nvim/lua/plugins? I’m out of my element here, help would be much appreciated.

  • this_is_router@feddit.deOP
    link
    fedilink
    arrow-up
    1
    ·
    10 months ago

    it’s working now but ill try that. looks like a better solution then my current .config/nvim/ftdetect/ansible.vim hack. your snipped goes into .config/nvim/init.lua i guess?