@neo4j-cypher/language-server 2.0.0-next.1 → 2.0.0-next.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @neo4j-cypher/language-server
2
2
 
3
+ ## 2.0.0-next.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [17909e3]
8
+ - @neo4j-cypher/language-support@2.0.0-next.2
9
+
10
+ ## 2.0.0-next.2
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies [a790700]
15
+ - Updated dependencies [08db455]
16
+ - @neo4j-cypher/language-support@2.0.0-next.1
17
+
3
18
  ## 2.0.0-next.1
4
19
 
5
20
  ### Patch Changes
package/README.md CHANGED
@@ -16,6 +16,8 @@ Once installed, you can run the language server using `cypher-language-server --
16
16
 
17
17
  Below you can find a few examples in Typescript on how to send messages to that server.
18
18
 
19
+ For integrations with other editors, see [Integrating with other editors](#integrating-with-other-editors).
20
+
19
21
  ### Using ipc
20
22
 
21
23
  ```typescript
@@ -139,3 +141,60 @@ reader.listen((data) => {
139
141
 
140
142
  initialize();
141
143
  ```
144
+
145
+ ### Integrating with other editors
146
+
147
+ #### Emacs
148
+
149
+ ##### With [lsp-mode](https://github.com/emacs-lsp/lsp-mode)
150
+
151
+ As of version 8.0.1, `lsp-mode` provides built in support for the `cypher-language-server`. `lsp-mode` will connect to a `cypher-language-server` for any file ending with `.cypher`, or if you're currently in a `cypher-mode`.
152
+
153
+ If the `cypher-language-server` is not already installed, you can install the server by running `M-x lsp-install-server RET` and then selecting `cypher-ls` from the list.
154
+
155
+ ##### With [lsp-mode](https://github.com/emacs-lsp/lsp-mode) < 8.0.1
156
+
157
+ ```elisp
158
+ (with-eval-after-load 'lsp-mode
159
+ (add-to-list 'lsp-language-id-configuration
160
+ ;; '(cypher-mode . "cypher")) ;; use this if you have a cypher-mode installed
161
+ '(".*cypher" . "cypher")) ;; otherwise, you can simply match on file ending with a regex
162
+
163
+ (lsp-register-client
164
+ (make-lsp-client :new-connection (lsp-stdio-connection '("cypher-language-server" "--stdio"))
165
+ :activation-fn (lsp-activate-on "cypher")
166
+ :server-id 'cypher)))
167
+ ```
168
+
169
+ If you want semantic highlighting, remember to set
170
+
171
+ ```elisp
172
+ (setq lsp-semantic-tokens-enable t)
173
+ ```
174
+
175
+ ##### With [eglot](https://joaotavora.github.io/eglot/)
176
+
177
+ As of Emacs 29, `eglot` is built in. In `eglot`, a language server needs to be associate with a specific major mode. Install any available `cypher-mode` in order to get the server running with `eglot`. Note also that `eglot` does not support semantic highlighting.
178
+
179
+ ```elisp
180
+ (add-to-list 'Eglot-server-programs '((cypher-mode) "cypher-language-server" "--stdio")))
181
+ ```
182
+
183
+ #### Neovim
184
+
185
+ ##### With [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig)
186
+
187
+ There is built-in support for the `cypher-language-server` in the plugin ([cypher_ls](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#cypher_ls)).
188
+
189
+ Activate the language server support in your config file.
190
+ ```lua
191
+ require('lspconfig').cypher_ls.setup{}
192
+ ```
193
+
194
+ The language server is registered for _cypher_ files.
195
+ To make neovim aware of this type, add a file to your _neovim-configuration-path/ftdetect_ (if it does not exist, create one) folder, e.g. _cypher.vim_, defining the file suffix and file type.
196
+
197
+ ```vim
198
+ au BufRead,BufNewFile *.cypher set filetype=cypher
199
+ ```
200
+