Skip to content

Commit d3173ad

Browse files
authored
Base QML setup (#4412)
* Base QML lsp setup * Add changelog entry for QML * Add missing configurations for new client * Add description to top of package
1 parent 78f676f commit d3173ad

File tree

5 files changed

+55
-1
lines changed

5 files changed

+55
-1
lines changed

CHANGELOG.org

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
* Changelog
22
** Unreleased 8.0.1
3+
* Add language server config for QML (Qt Modeling Language) using qmlls.
34
* Add new configuration options for lsp-html. Now able to toggle documentation hovers. Custom data is no longer experimental, and is now a vector.
45
* Add support for RPM spec files
56
* Add support for installing lsp dependencies via Cargo.

clients/lsp-qml.el

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
;;; lsp-qml.el --- LSP Client for QML -*- lexical-binding: t; -*-
2+
3+
;; Copyright (C) 2024 emacs-lsp maintainers
4+
5+
;; Author: emacs-lsp maintainers
6+
;; Keywords: lsp, qt, qml, gui,
7+
8+
;; This program is free software; you can redistribute it and/or modify
9+
;; it under the terms of the GNU General Public License as published by
10+
;; the Free Software Foundation, either version 3 of the License, or
11+
;; (at your option) any later version.
12+
13+
;; This program is distributed in the hope that it will be useful,
14+
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
15+
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16+
;; GNU General Public License for more details.
17+
18+
;; You should have received a copy of the GNU General Public License
19+
;; along with this program. If not, see <https://www.gnu.org/licenses/>.
20+
21+
;;; Commentary:
22+
23+
;; LSP Client for QML (Qt Modeling Language).
24+
25+
;;; Code:
26+
(require 'lsp-mode)
27+
28+
(defcustom lsp-qml-server-command "qmlls"
29+
"Server executable to use."
30+
:type 'string
31+
:group 'lsp-qml
32+
:package-version '(lsp-mode . "8.0.1"))
33+
34+
(lsp-register-client
35+
(make-lsp-client :new-connection (lsp-stdio-connection
36+
(lambda ()
37+
(executable-find lsp-qml-server-command)))
38+
:activation-fn (lsp-activate-on "qml")
39+
:priority -1
40+
:server-id 'qml-ls))
41+
42+
(provide 'lsp-qml)
43+
;;; lsp-qml.el ends here

docs/lsp-clients.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -828,6 +828,15 @@
828828
"installation-url": "https://github.com/emacs-lsp/lsp-python-ms",
829829
"debugger": "Yes"
830830
},
831+
{
832+
"name": "qml-ls",
833+
"full-name": "QML (Qt Modeling Language)",
834+
"server-name": "QML Language Server",
835+
"server-url": "https://doc.qt.io/qt-6/qtquick-tool-qmlls.html",
836+
"client-name": "lsp-qml",
837+
"installation-url": "https://github.com/emacs-lsp/lsp-qml",
838+
"debugger": "Not Available"
839+
},
831840
{
832841
"name": "r",
833842
"full-name": "R",

lsp-mode.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ As defined by the Language Server Protocol 3.16."
185185
lsp-mint lsp-move lsp-nginx lsp-nim lsp-nix lsp-magik lsp-mojo lsp-metals
186186
lsp-mssql lsp-nushell lsp-ocaml lsp-openscad lsp-pascal lsp-perl lsp-perlnavigator
187187
lsp-pls lsp-php lsp-pwsh lsp-pyls lsp-pylsp lsp-pyright lsp-python-ms
188-
lsp-purescript lsp-r lsp-racket lsp-remark lsp-ruff-lsp lsp-rf lsp-rubocop
188+
lsp-purescript lsp-qml lsp-r lsp-racket lsp-remark lsp-ruff-lsp lsp-rf lsp-rubocop
189189
lsp-rust lsp-semgrep lsp-shader lsp-solargraph lsp-sorbet lsp-sourcekit
190190
lsp-sonarlint lsp-tailwindcss lsp-tex lsp-terraform lsp-toml lsp-ttcn3
191191
lsp-typeprof lsp-v lsp-vala lsp-verilog lsp-vetur lsp-volar lsp-vhdl

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ nav:
135135
- Python (Pyright): https://emacs-lsp.github.io/lsp-pyright
136136
- Python (Microsoft): https://emacs-lsp.github.io/lsp-python-ms
137137
- Python (Ruff): page/lsp-ruff-lsp.md
138+
- QML: page/lsp-qml.md
138139
- R: page/lsp-r.md
139140
- Racket (jeapostrophe): page/lsp-racket-langserver.md
140141
- Racket (Theia): page/lsp-racket-language-server.md

0 commit comments

Comments
 (0)