qtqmlneovim

Is there any way to install qml language server for neovim in Linux?


I want to edit qml file in neovim, but can't find a way to install language server (qmlls) for it. Any body can help me resolve this problem? Thank you very much.

I serched qt website, nevom lsp config repo, etc. Can't find any clue.


Solution

  • It's a bit weird but you can't install only qmlls and need the whole QtDeclarative install. (i.e installing Qt >= 6.3.0 if you don't build from source)

    Once you have it in PATH you just need to register to nvim-lsp, if you use nvim-lspconfig it's just:

    require'lspconfig'.qmlls.setup{}
    

    If you don't use lspconfig then check the server configuration on lspconfig and mimic what it does: qmlls server config