Skip to content

Commit 16ffb26

Browse files
committed
update install guide for v0.2.0
1 parent d6697a6 commit 16ffb26

File tree

2 files changed

+194
-3
lines changed

2 files changed

+194
-3
lines changed

src/guide/v0_1_0/install-setup.md

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

117117
Read the [Usage Guide](@docs/guide) after configuring your editor.
118118

119-
> [!NOTE]
120-
> Qmlls versions prior to 6.8.2 do not require `-E`
121-
122119
### Emacs
123120
Install the [yuja/tree-sitter-qml](https://github.com/yuja/tree-sitter-qmljs) tree-sitter grammar,
124121
and the [xhcoding/qml-ts-mode](https://github.com/xhcoding/qml-ts-mode) mode.

src/guide/v0_2_0/install-setup.md

Lines changed: 194 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,194 @@
1+
---
2+
title: "Installation & Setup"
3+
index: 0
4+
---
5+
> [!NOTE]
6+
> Quickshell is still in a somewhat early stage of development.
7+
> There will be breaking changes before 1.0, however a migration guide will be provided.
8+
9+
## Installation
10+
11+
Since Quickshell 0.1, you can now choose whether to install by tracking the master branch,
12+
or install by latest release.
13+
14+
Note that you may want to install some additional packages (names vary by distro):
15+
- `qtsvg`: support for SVG image loading (bundled with most packages)
16+
- `qtimageformats`: support for WEBP images as well as some less common ones
17+
- `qtmultimedia`: support for playing videos, audio, etc
18+
- `qt5compat`: extra visual effects, notably gaussian blur. @@QtQuick.Effects.MultiEffect is usually preferable
19+
20+
### Nix
21+
Release versions of Quickshell are available from Nixpkgs under the `quickshell` package.
22+
23+
The Quickshell repo also has an embedded flake which can be used from either mirror:
24+
- `git+https://git.outfoxxed.me/outfoxxed/quickshell`
25+
- `github:quickshell-mirror/quickshell`
26+
27+
> [!NOTE]
28+
> You can use `?ref=` to specify a tag if you want a tagged release.
29+
30+
```nix
31+
{
32+
inputs = {
33+
nixpkgs.url = "nixpkgs/nixos-unstable";
34+
35+
quickshell = {
36+
# add ?ref=<tag> to track a tag
37+
url = "git+https://git.outfoxxed.me/outfoxxed/quickshell";
38+
39+
# THIS IS IMPORTANT
40+
# Mismatched system dependencies will lead to crashes and other issues.
41+
inputs.nixpkgs.follows = "nixpkgs";
42+
};
43+
};
44+
}
45+
```
46+
47+
The package is available as `quickshell.packages.<system>.default`, which can be added to
48+
your `environment.systemPackages`, `home.packages` if you use home-manager, or a devshell.
49+
50+
When using the flake, additional QML packages can be added to Quickshell's environment using
51+
`<package>.withModules [ <extra modules> ]`.
52+
53+
### Arch
54+
Quickshell is available from the aur under:
55+
- the [quickshell](https://aur.archlinux.org/packages/quickshell) package for the latest release
56+
- the [quickshell-git](https://aur.archlinux.org/packages/quickshell-git) package that tracks the master branch
57+
58+
> [!WARNING]
59+
> When using an AUR package, Quickshell may break whenever Qt is updated.
60+
> The AUR gives us no way to actually fix this, but Quickshell will attempt to
61+
> warn you if it detects a breakage when updating. If warned of a breakage,
62+
> please reinstall the package.
63+
64+
Install using the command below:
65+
```sh
66+
yay -S quickshell
67+
# or
68+
yay -S quickshell-git
69+
```
70+
(or your AUR helper of choice)
71+
72+
### Fedora
73+
Quickshell is available from the [errornointernet/quickshell] COPR, as either:
74+
- `quickshell` that tracks the latest release
75+
- `quickshell-git` that tracks the master branch
76+
77+
[errornointernet/quickshell]: https://copr.fedorainfracloud.org/coprs/errornointernet/quickshell
78+
79+
Install using the command below:
80+
```sh
81+
sudo dnf copr enable errornointernet/quickshell
82+
83+
sudo dnf install quickshell
84+
# or
85+
sudo dnf install quickshell-git
86+
```
87+
88+
### Guix
89+
Release versions of Quickshell are available from the standard Guix repository
90+
as `quickshell` from the `(gnu packages wm)` module.
91+
92+
Install using the command below:
93+
```sh
94+
guix install quickshell
95+
```
96+
97+
You can also add `quickshell` to your Guix system configuration or Guix Home configuration.
98+
99+
For the git version, Quickshell's source repository works as a channel.
100+
Add the following to your channel list:
101+
102+
```scheme
103+
(channel
104+
(name quickshell)
105+
(url "https://git.outfoxxed.me/outfoxxed/quickshell")
106+
(branch "master"))
107+
```
108+
109+
However, since the package definition is located in the source repository, it cannot be used
110+
as a channel out of the box. You can clone the repository and use `guix shell -f quickshell.scm`
111+
to use the git version of the package.
112+
113+
### Manual build
114+
See [BUILD.md](https://git.outfoxxed.me/quickshell/quickshell/src/branch/master/BUILD.md)
115+
for build instructions and configurations.
116+
117+
## Editor configuration
118+
If you want to write your own configuration, installing a QML grammar and the LSP is recommended.
119+
120+
Read the [Usage Guide](@docs/guide) after configuring your editor.
121+
122+
> [!NOTE]
123+
> Qmlls versions prior to 6.8.2 do not require `-E`
124+
125+
### Emacs
126+
Install the [yuja/tree-sitter-qml](https://github.com/yuja/tree-sitter-qmljs) tree-sitter grammar,
127+
and the [xhcoding/qml-ts-mode](https://github.com/xhcoding/qml-ts-mode) mode.
128+
129+
Both are packaged for nix via [outfoxxed/nix-qml-support](https://git.outfoxxed.me/outfoxxed/nix-qml-support).
130+
131+
Either `lsp-mode` or `eglot` should be usable for LSP ([caveats below](#language-server)).
132+
133+
The author's personal emacs config uses `lsp-mode` and `qml-ts-mode` as follows:
134+
```elisp
135+
(use-package qml-ts-mode
136+
:after lsp-mode
137+
:config
138+
(add-to-list 'lsp-language-id-configuration '(qml-ts-mode . "qml-ts"))
139+
(lsp-register-client
140+
(make-lsp-client :new-connection (lsp-stdio-connection '("qmlls"))
141+
:activation-fn (lsp-activate-on "qml-ts")
142+
:server-id 'qmlls))
143+
(add-hook 'qml-ts-mode-hook (lambda ()
144+
(setq-local electric-indent-chars '(?\n ?\( ?\) ?{ ?} ?\[ ?\] ?\; ?,))
145+
(lsp-deferred))))
146+
```
147+
148+
### Neovim
149+
Neovim has built-in syntax highlighting for QML, however tree-sitter highlighting
150+
may work better than the built-in highlighting. You can install the grammar
151+
using `:TSInstall qmljs`.
152+
153+
To use the language server ([caveats below](#language-server)),
154+
install [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig)
155+
and the following snippet to your configuration:
156+
157+
```lua
158+
require("lspconfig").qmlls.setup {}
159+
```
160+
161+
### Helix
162+
Helix has built-in syntax highlighting and qmlls support.
163+
164+
### Vscode
165+
1. Install the [Official QML Support extension]
166+
2. Enable the `qt-qml.qmlls.useQmlImportPathEnvVar` setting.
167+
![](/assets/images/vscode-qml-env.png)
168+
169+
[Official QML Support extension]: https://marketplace.visualstudio.com/items?itemName=TheQtCompany.qt-qml
170+
171+
## Language Server
172+
The QML language has an associated language server,
173+
[qmlls](https://doc.qt.io/qt-6/qtqml-tooling-qmlls.html).
174+
We recommend using it, as it will catch a lot of bad practice that may
175+
make your configuration harder to maintain later.
176+
177+
To enable language server support for your shell, create an empty file named `.qmlls.ini`
178+
next to the `shell.qml` file. Quickshell will replace it with a managed qmlls configuration.
179+
You should gitignore the `.qmlls.ini` file, as its content depends on information that
180+
is different on every computer.
181+
182+
We are aware of the following issues:
183+
- Qmlls does not work well when a file is not correctly structured.
184+
This means that completions and lints won't work unless braces are closed
185+
correctly and such.
186+
- The LSP cannot provide any documentation for Quickshell types.
187+
- `PanelWindow` in particular cannot be resolved.
188+
189+
Keeping in mind the above caveats, qmlls should be able to guide you towards a
190+
more correct code should you choose to use it.
191+
192+
# Next steps
193+
194+
Create your first configuration by reading the [Intro](@docs/configuration/intro).

0 commit comments

Comments
 (0)