Skip to content

Commit

Permalink
Merge commit 'c81daaed2' into byte-compilation-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yyoncho committed Nov 11, 2023
2 parents a892513 + c81daae commit 8cc035e
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.org
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
* Changelog
** Unreleased 8.0.1
* Fix tramp support issues (see [[https://github.com/emacs-lsp/lsp-mode/pull/4204][#4204]])
* Add Cypher support.
* Add Mojo 🔥 support
* Add lsp-solidity, using the implementation from NomicFoundation
* Change rust-analyzer base URL to be github.com/rust-lang/rust-analyzer, rather than rust-analyzer/rust-analyzer.
Expand Down
53 changes: 53 additions & 0 deletions clients/lsp-cypher.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
;;; lsp-cypher.el --- Cypher Client -*- lexical-binding: t; -*-

;; Copyright (C) 2023 Gustav Hedengran

;; Author: Gustav Hedengran <[email protected]>
;; Keywords: languages lsp cypher

;; 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:

;;; Code:

(require 'lsp-mode)

(defgroup lsp-cypher nil
"LSP support for Cypher."
:group 'lsp-mode
:link '(url-link "https://github.com/neo4j/cypher-language-support/blob/main/packages/language-server"))

(lsp-dependency 'cypher-language-server
'(:system "cypher-language-server")
'(:npm :package "@neo4j-cypher/language-server"
:path "cypher-language-server"))

(defun lsp-client--cypher-ls-server-command ()
"Startup command for Cypher language server."
(list (lsp-package-path 'cypher-language-server) "--stdio"))

(lsp-register-client
(make-lsp-client :new-connection (lsp-stdio-connection #'lsp-client--cypher-ls-server-command)
:activation-fn (lsp-activate-on "cypher")
:language-id "cypher"
:server-id 'cypher-ls
:priority 0
:download-server-fn (lambda (_client callback error-callback _update?)
(lsp-package-ensure 'cypher-language-server callback error-callback))))

(lsp-consistency-check lsp-cypher)

(provide 'lsp-cypher)
;;; lsp-cypher.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 @@ -160,6 +160,15 @@
"lsp-install-server": "css-ls",
"debugger": "Not available"
},
{
"name": "cypher",
"full-name": "Cypher",
"server-name": "cypher-language-server",
"server-url": "https://github.com/neo4j/cypher-language-support/tree/main/packages/language-server",
"installation": "npm install -g @neo4j-cypher/language-server",
"installation-url": "https://github.com/neo4j/cypher-language-support/tree/main/packages/language-server#installation",
"debugger": "Not available"
},
{
"name": "d",
"full-name": "D",
Expand Down
4 changes: 3 additions & 1 deletion lsp-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ As defined by the Language Server Protocol 3.16."
(defcustom lsp-client-packages
'( 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-cypher 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
lsp-glsl lsp-graphql lsp-hack lsp-grammarly lsp-groovy lsp-haskell lsp-haxe
lsp-idris lsp-java lsp-javascript lsp-json lsp-kotlin lsp-latex lsp-ltex
Expand Down Expand Up @@ -776,6 +776,7 @@ Changes take effect only when a new session is started."
("\\.php$" . "php")
("\\.rs\\'" . "rust")
("\\.sql$" . "sql")
("\\.cypher$" . "cypher")
("\\.svelte$" . "svelte")
("\\.toml\\'" . "toml")
("\\.ts$" . "typescript")
Expand Down Expand Up @@ -887,6 +888,7 @@ Changes take effect only when a new session is started."
(csharp-ts-mode . "csharp")
(plain-tex-mode . "plaintex")
(context-mode . "context")
(cypher-mode . "cypher")
(latex-mode . "latex")
(v-mode . "v")
(vhdl-mode . "vhdl")
Expand Down
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ nav:
- CMake: page/lsp-cmake.md
- Crystal: page/lsp-crystal.md
- CSS/LessCSS/SASS/SCSS: page/lsp-css.md
- Cypher: page/lsp-cypher.md
- D: page/lsp-d.md
- Dart: https://emacs-lsp.github.io/lsp-dart
- Dhall: page/lsp-dhall.md
Expand Down

0 comments on commit 8cc035e

Please sign in to comment.