Skip to content

Commit

Permalink
Add jq-lsp, client for Jq language
Browse files Browse the repository at this point in the history
  • Loading branch information
nverno committed Aug 17, 2023
1 parent a319b2c commit bfeea85
Show file tree
Hide file tree
Showing 3 changed files with 49 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 [[https://github.com/wader/jq-lsp][jq-lsp]]
* Add [[https://github.com/WhatsApp/erlang-language-platform][erlang-language-platform]] support in lsp-erlang client.
* Add [[https://github.com/elixir-tools/credo-language-server][credo-language-server]]
* Add support for clojure-ts-mode in clojure-lsp client
Expand Down
46 changes: 46 additions & 0 deletions clients/lsp-jq.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
;;; lsp-r.el --- lsp client for jq -*- lexical-binding: t; -*-

;; Copyright (C) 2020 emacs-lsp maintainers

;; Author: emacs-lsp maintainers
;; Keywords: lsp, jq

;; 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 jq language.
;;
;;; Code:
(require 'lsp-mode)

(defgroup lsp-jq nil
"LSP support for Jq."
:group 'lsp-mode
:link '(url-link "https://github.com/wader/jq-lsp"))

(defcustom lsp-jq-executable '("jq-lsp")
"Command to run the Jq language server."
:group 'lsp-jq
:risky t
:type '(repeat string))

(lsp-register-client
(make-lsp-client
:new-connection (lsp-stdio-connection lsp-jq-executable)
:major-modes '(jq-mode)
:server-id 'jq-ls))

(provide 'lsp-jq)
;;; lsp-jq.el ends here
3 changes: 2 additions & 1 deletion lsp-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,8 @@ Changes take effect only when a new session is started."
(bibtex-mode . "bibtex")
(rst-mode . "restructuredtext")
(glsl-mode . "glsl")
(shader-mode . "shaderlab"))
(shader-mode . "shaderlab")
(jq-mode . "jq"))
"Language id configuration.")

(defvar lsp--last-active-workspaces nil
Expand Down

0 comments on commit bfeea85

Please sign in to comment.