Skip to content

Commit 415c5f5

Browse files
committed
add setup instructions for helix and vscode
1 parent 2f8fb6a commit 415c5f5

File tree

2 files changed

+22
-6
lines changed

2 files changed

+22
-6
lines changed
16 KB
Loading

src/guide/install-setup.mdx

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ If you want to write your own configuration, installing a QML grammar and the LS
8484

8585
Read the [Usage Guide](/docs/guide) after configuring your editor.
8686

87+
> [!NOTE]
88+
> Qmlls versions prior to 6.8.2 do not require `-E`
89+
8790
### Emacs
8891
Install the [yuja/tree-sitter-qml](https://github.com/yuja/tree-sitter-qmljs) tree-sitter grammar,
8992
and the [xhcoding/qml-ts-mode](https://github.com/xhcoding/qml-ts-mode) mode.
@@ -107,26 +110,38 @@ The author's personal emacs config uses `lsp-mode` and `qml-ts-mode` as follows:
107110
(lsp-deferred))))
108111
```
109112

110-
> [!NOTE]
111-
> Qmlls versions prior to 6.8.2 do not require `-E`
112-
113113
### Neovim
114114
Neovim has built-in syntax highlighting for QML, however tree-sitter highlighting
115115
may work better than the built-in highlighting. You can install the grammar
116116
using `:TSInstall qmljs`.
117117

118118
To use the language server ([caveats below](#language-server)),
119119
install [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig)
120-
and the following snippet:
120+
and the following snippet to your configuration:
121121

122122
```lua
123123
require("lspconfig").qmlls.setup {
124124
cmd = {"qmlls", "-E"}
125125
}
126126
```
127127

128-
> [!NOTE]
129-
> Qmlls versions prior to 6.8.2 do not require `-E`
128+
### Helix
129+
Helix has built-in syntax highlighting for QML.
130+
131+
To use the language server, add the following snippet to your configuration:
132+
133+
```toml
134+
[language-server.qmlls]
135+
args = ["-E"]
136+
command = "qmlls"
137+
```
138+
139+
### Vscode
140+
1. Install the [Official QML Support extension]
141+
2. Enable the `qt-qml.qmlls.useQmlImportPathEnvVar` setting.
142+
![](/assets/images/vscode-qml-env.png)
143+
144+
[Official QML Support extension]: https://marketplace.visualstudio.com/items?itemName=TheQtCompany.qt-qml
130145

131146
## Language Server
132147
The QML language has an associated language server,
@@ -141,6 +156,7 @@ We are aware of the following issues:
141156
- Qmlls cannot handle quickshell's singletons. This means you won't see
142157
completions, and usages of singleton members may show a warning.
143158
We're still investigating this problem and how to fix it.
159+
- The LSP cannot provide any documentation for Quickshell types.
144160

145161
Keeping in mind the above caveats, qmlls should be able to guide you towards
146162
more correct code should you chose to use it.

0 commit comments

Comments
 (0)