Setup Basic Qt6 Development Environment with QML LSP in Arch Linux
Jun 19, 2025 - ⧖ 2 minInstall Qt6 in Arch Linux
Note
this small tutorial assume you has install base-devel, cmake, and ninja
first you need an sudo access, to install basic development package you need install following package
$ pacman -Ss qt6- | rg -i installed
extra/qt6-base 6.9.1-1 (qt6) [installed]
extra/qt6-declarative 6.9.1-1 (qt6) [installed]
extra/qt6-languageserver 6.9.1-1 (qt6) [installed]
extra/qt6-svg 6.9.1-1 (qt6) [installed]
extra/qt6-translations 6.9.1-1 (qt6) [installed]
- run
sudo pacman -S qt6-base qt6-declarative qt6-languageserver qt6-svg qt6-translations --noconfirm - wait until complete
- next, to check if qt6 installed, we will compile basic qt example
- run
git clone https://github.com/qt/qtdoc.git - then cd to qtdoc example coffe,
cd qtdoc/examples/demos/coffee - run
cmake -S . -B build, you can changebuildto another name (its build output) - build example with
cmake --build build - next you can run the example with
./build/coffeemachine - if all working, you will see this
Setup LSP with Neovim (LazyVim config)
- next to setup lsp we need to check installed
qmllsin our/usr/bin/qmlls6(the name may difference based on version) - you need change
cmdargument fromnvim-lspconfigbased on your installedqmllsversion insideinit.lua
File: init.lua
1 │ -- bootstrap lazy.nvim, LazyVim and your plugins
2 │ require("config.lazy")
3 + │
4 + │ vim.lsp.enable("qmlls")
5 + │ vim.lsp.config("qmlls", {
6 + │ cmd = { "qmlls6" },
7 + │ })
- then hopefully lsp will work :)