diff --git a/CHANGELOG.org b/CHANGELOG.org index d6f41b3e7e..8b961b5a18 100644 --- a/CHANGELOG.org +++ b/CHANGELOG.org @@ -80,6 +80,7 @@ * Remove custom variable ~lsp-inlay-hint-enum-format~ since LSP Specification 3.17 only has ~type~ and ~parameter~ hint kinds. * Add [[https://semgrep.dev][Semgrep]] support + * Add AWK language server support. ** Release 8.0.0 * Add ~lsp-clients-angular-node-get-prefix-command~ to get the Angular server from another location which is still has ~/lib/node_modules~ in it. * Set ~lsp-clients-angular-language-server-command~ after the first connection to speed up subsequent connections. diff --git a/clients/lsp-awk.el b/clients/lsp-awk.el new file mode 100644 index 0000000000..e0d8ed147a --- /dev/null +++ b/clients/lsp-awk.el @@ -0,0 +1,49 @@ +;;; lsp-awk.el --- AWK client -*- lexical-binding: t; -*- + +;; Copyright (C) 2023 emacs-lsp maintainers + +;; Author: Konstantin Kharlamov +;; Keywords: languages lsp awk + +;; 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 AWK language. +;; + +;;; Code: + +(require 'lsp-mode) + +(defgroup lsp-awk nil + "LSP support for AWK." + :group 'lsp-mode + :link '(url-link "https://github.com/Beaglefoot/awk-language-server")) + +(defcustom lsp-awk-executable '("awk-language-server") + "Command to run the AWK language server." + :group 'lsp-awk + :risky t + :type 'list) + +(lsp-register-client + (make-lsp-client + :new-connection (lsp-stdio-connection lsp-awk-executable) + :activation-fn (lsp-activate-on "awk") + :priority -1 + :server-id 'awkls)) + +(provide 'lsp-awk) +;;; lsp-awk.el ends here diff --git a/docs/lsp-clients.json b/docs/lsp-clients.json index f2f63ee094..8fa3ada7c5 100644 --- a/docs/lsp-clients.json +++ b/docs/lsp-clients.json @@ -42,6 +42,15 @@ "lsp-install-server": "astro-ls", "debugger": "Not available" }, + { + "name": "awk", + "full-name": "AWK", + "server-name": "awk-language-server", + "server-url": "https://github.com/Beaglefoot/awk-language-server", + "installation": "npm i -g awk-language-server", + "lsp-install-server": "awkls", + "debugger": "Not available" + }, { "name": "bash", "full-name": "Bash", diff --git a/lsp-mode.el b/lsp-mode.el index cd3b17b0bb..4cbd5f7467 100644 --- a/lsp-mode.el +++ b/lsp-mode.el @@ -174,7 +174,7 @@ As defined by the Language Server Protocol 3.16." :package-version '(lsp-mode . "6.1")) (defcustom lsp-client-packages - '( ccls lsp-actionscript lsp-ada lsp-angular lsp-ansible lsp-astro lsp-bash + '( ccls lsp-actionscript lsp-ada lsp-angular lsp-ansible lsp-awk lsp-astro lsp-bash lsp-beancount lsp-clangd lsp-clojure lsp-cmake lsp-credo lsp-crystal lsp-csharp lsp-css lsp-d lsp-dart lsp-dhall lsp-docker lsp-dockerfile lsp-elm lsp-elixir lsp-emmet lsp-erlang lsp-eslint lsp-fortran lsp-fsharp lsp-gdscript lsp-go lsp-gleam @@ -786,6 +786,7 @@ Changes take effect only when a new session is started." ("^go\\.mod\\'" . "go.mod") ("^settings.json$" . "jsonc") (ada-mode . "ada") + (awk-mode . "awk") (nxml-mode . "xml") (sql-mode . "sql") (vimrc-mode . "vim") diff --git a/mkdocs.yml b/mkdocs.yml index 89a281607c..c054f57ce6 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -50,6 +50,7 @@ nav: - Angular: page/lsp-angular.md - Ansible: page/lsp-ansible.md - Astro: page/lsp-astro.md + - AWK: page/lsp-awk.md - Bash: page/lsp-bash.md - Beancount: page/lsp-beancount.md - Camel: page/lsp-camel.md