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 18, 2023
1 parent a319b2c commit 07841f9
Show file tree
Hide file tree
Showing 4 changed files with 61 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
49 changes: 49 additions & 0 deletions clients/lsp-jq.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
;;; lsp-jq.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-clients-jq-server-executable '("jq-lsp")
"The jq language server executable to use."
:group 'lsp-jq
:risky t
:type '(repeat string))

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

(lsp-consistency-check lsp-jq)

(provide 'lsp-jq)
;;; lsp-jq.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 @@ -406,6 +406,15 @@
"installation-url": "https://github.com/JuliaEditorSupport/LanguageServer.jl",
"debugger": "Not available"
},
{
"name": "jq",
"full-name": "Jq (jq-lsp)",
"server-name": "jq-lsp",
"server-url": "https://github.com/wader/jq-lsp",
"installation": "go install github.com/wader/jq-lsp@master",
"installation-url": "https://github.com/wader/jq-lsp#install",
"debugger": "Not available"
},
{
"name": "kotlin",
"full-name": "Kotlin",
Expand Down
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 07841f9

Please sign in to comment.