diff --git a/CHANGELOG.org b/CHANGELOG.org index 7e755f92786..ba1a318b9c1 100644 --- a/CHANGELOG.org +++ b/CHANGELOG.org @@ -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 diff --git a/clients/lsp-jq.el b/clients/lsp-jq.el new file mode 100644 index 00000000000..de910ef85a6 --- /dev/null +++ b/clients/lsp-jq.el @@ -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 . + +;;; 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-lsp)) + +(provide 'lsp-jq) +;;; lsp-jq.el ends here diff --git a/docs/lsp-clients.json b/docs/lsp-clients.json index d3902f20228..10a2d55185f 100644 --- a/docs/lsp-clients.json +++ b/docs/lsp-clients.json @@ -406,6 +406,14 @@ "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-url": "https://github.com/wader/jq-lsp#install", + "debugger": "Not available" + }, { "name": "kotlin", "full-name": "Kotlin", diff --git a/lsp-mode.el b/lsp-mode.el index e4b518e8215..7a89c012cca 100644 --- a/lsp-mode.el +++ b/lsp-mode.el @@ -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