Skip to content

Commit

Permalink
Base QML setup (#4412)
Browse files Browse the repository at this point in the history
* Base QML lsp setup

* Add changelog entry for QML

* Add missing configurations for new client

* Add description to top of package
  • Loading branch information
themkat authored Apr 1, 2024
1 parent 78f676f commit d3173ad
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.org
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
* Changelog
** Unreleased 8.0.1
* Add language server config for QML (Qt Modeling Language) using qmlls.
* Add new configuration options for lsp-html. Now able to toggle documentation hovers. Custom data is no longer experimental, and is now a vector.
* Add support for RPM spec files
* Add support for installing lsp dependencies via Cargo.
Expand Down
43 changes: 43 additions & 0 deletions clients/lsp-qml.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
;;; lsp-qml.el --- LSP Client for QML -*- lexical-binding: t; -*-

;; Copyright (C) 2024 emacs-lsp maintainers

;; Author: emacs-lsp maintainers
;; Keywords: lsp, qt, qml, gui,

;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.

;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.

;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <https://www.gnu.org/licenses/>.

;;; Commentary:

;; LSP Client for QML (Qt Modeling Language).

;;; Code:
(require 'lsp-mode)

(defcustom lsp-qml-server-command "qmlls"
"Server executable to use."
:type 'string
:group 'lsp-qml
:package-version '(lsp-mode . "8.0.1"))

(lsp-register-client
(make-lsp-client :new-connection (lsp-stdio-connection
(lambda ()
(executable-find lsp-qml-server-command)))
:activation-fn (lsp-activate-on "qml")
:priority -1
:server-id 'qml-ls))

(provide 'lsp-qml)
;;; lsp-qml.el ends here
9 changes: 9 additions & 0 deletions docs/lsp-clients.json
Original file line number Diff line number Diff line change
Expand Up @@ -828,6 +828,15 @@
"installation-url": "https://github.com/emacs-lsp/lsp-python-ms",
"debugger": "Yes"
},
{
"name": "qml-ls",
"full-name": "QML (Qt Modeling Language)",
"server-name": "QML Language Server",
"server-url": "https://doc.qt.io/qt-6/qtquick-tool-qmlls.html",
"client-name": "lsp-qml",
"installation-url": "https://github.com/emacs-lsp/lsp-qml",
"debugger": "Not Available"
},
{
"name": "r",
"full-name": "R",
Expand Down
2 changes: 1 addition & 1 deletion lsp-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ As defined by the Language Server Protocol 3.16."
lsp-mint lsp-move lsp-nginx lsp-nim lsp-nix lsp-magik lsp-mojo lsp-metals
lsp-mssql lsp-nushell lsp-ocaml lsp-openscad lsp-pascal lsp-perl lsp-perlnavigator
lsp-pls lsp-php lsp-pwsh lsp-pyls lsp-pylsp lsp-pyright lsp-python-ms
lsp-purescript lsp-r lsp-racket lsp-remark lsp-ruff-lsp lsp-rf lsp-rubocop
lsp-purescript lsp-qml lsp-r lsp-racket lsp-remark lsp-ruff-lsp lsp-rf lsp-rubocop
lsp-rust lsp-semgrep lsp-shader lsp-solargraph lsp-sorbet lsp-sourcekit
lsp-sonarlint lsp-tailwindcss lsp-tex lsp-terraform lsp-toml lsp-ttcn3
lsp-typeprof lsp-v lsp-vala lsp-verilog lsp-vetur lsp-volar lsp-vhdl
Expand Down
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ nav:
- Python (Pyright): https://emacs-lsp.github.io/lsp-pyright
- Python (Microsoft): https://emacs-lsp.github.io/lsp-python-ms
- Python (Ruff): page/lsp-ruff-lsp.md
- QML: page/lsp-qml.md
- R: page/lsp-r.md
- Racket (jeapostrophe): page/lsp-racket-langserver.md
- Racket (Theia): page/lsp-racket-language-server.md
Expand Down

0 comments on commit d3173ad

Please sign in to comment.