Skip to content

Commit ad5f3eb

Browse files
committed
Sync to latest version from geany-lsp
1 parent 55232c5 commit ad5f3eb

17 files changed

+1184
-284
lines changed

lsp/README

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,13 @@ When you click on a symbol in the document, this feature highlights all its
205205
occurrences in the document. You can customize the highlighting style to your
206206
preference by configuring it in the configuration file.
207207

208+
Smart selection expanding/shrinking
209+
-----------------------------------
210+
211+
This feature allows to expand the current text selection to contain the next
212+
upper syntactic element such as a parent block in programming languages or a
213+
parent tag in XML. Selection shrinking works in the opposite direction.
214+
208215
Document symbol renaming
209216
------------------------
210217

@@ -224,7 +231,20 @@ servers may not be completely reliable when performing the rename so be very
224231
cautious when using it. The plugin does not perform any additional
225232
checks and does not show any preview of the changes so it is best to use this
226233
feature only after committing all modified files so you can
227-
easily revert to a working state if needed.
234+
easily revert to a working state if needed. Since this is potentially a
235+
dangerous operation, to prevent accidental renames, the "Rename" button in the
236+
dialog is not selected by defalut and simply pressing enter just cancels the
237+
dialog.
238+
239+
Limitations
240+
===========
241+
242+
By design, the plugin communicates over stdin/stdout only, is responsible
243+
for launching and terminating the language server process, and supports only
244+
a single language server per file type.
245+
246+
All of these limitations are addressed by the LSP proxy project available at
247+
https://github.com/techee/lsp-proxy and related issues should be directed there.
228248

229249
License
230250
=======

lsp/data/lsp.conf

Lines changed: 60 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,11 @@ autocomplete_trigger_sequences=
133133
# 'begin' and 'end' which are typically followed by a newline where typing enter
134134
# after these words might select some unwanted word from the autocompletion list.
135135
autocomplete_hide_after_words=
136+
# Whether to perform autocompletion inside strings
137+
autocomplete_in_strings=false
138+
# Show documentation (if available) of selected item in autocompletion popup
139+
# in Geany status bar
140+
autocomplete_show_documentation=true
136141

137142
# Whether LSP should be used to display diagnostic messages. Typically these are
138143
# compiler errors or warnings
@@ -237,12 +242,16 @@ format_on_save=false
237242
# when servers do not correctly terminate progress notifications.
238243
progress_bar_enable=true
239244

245+
# Enable non-standard clangd extension allowing to swap between C/C++ headers
246+
# and sources. Only usable for clangd, it does not work with other servers.
247+
swap_header_source_enable=false
248+
240249

241250
# This is a dummy language server configuration describing the available
242251
# language-specific options. Most of the configuration options from the [all]
243252
# section can be used here as well.
244253
# For an extensive list of various servers and their configurations, check
245-
# https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
254+
# https://github.com/neovim/nvim-lspconfig/blob/master/doc/configs.md
246255
# While the configuration options names of neovim differ from Geany, the
247256
# general concepts are similar and applicable here.
248257
[DummyLanguage]
@@ -281,6 +290,8 @@ lang_id_mappings=dummylanguage;*.dummy
281290
# first). The compile_commands.json file has to be manually regenerated when
282291
# the build is modified in any way, such as a file is added/removed.
283292
cmd=clangd
293+
swap_header_source_enable=true
294+
autocomplete_in_strings=true
284295
autocomplete_use_label=false
285296
semantic_tokens_enable=true
286297
#initialization_options={"compilationDatabasePath": "/home/some_user/my_project/my_builddir"}
@@ -297,6 +308,28 @@ command_1_regex=Apply fix:.*
297308
use=C
298309

299310

311+
[CSS]
312+
cmd=vscode-css-language-server --stdio
313+
extra_identifier_characters=-
314+
send_did_change_configuration=true
315+
autocomplete_use_snippets=true
316+
use_without_project=true
317+
use_outside_project_dir=true
318+
#rpc_log=stdout
319+
#rpc_log_full=true
320+
#show_server_stderr=true
321+
322+
323+
[Dart]
324+
cmd=dart language-server --protocol=lsp
325+
# everything except ( which conflicts with signature help
326+
autocomplete_trigger_sequences=.;=;$;";';{;/;:
327+
semantic_tokens_enable=true
328+
#rpc_log=stdout
329+
#rpc_log_full=true
330+
#show_server_stderr=true
331+
332+
300333
[Go]
301334
cmd=gopls
302335
autocomplete_apply_additional_edits=true
@@ -324,6 +357,18 @@ semantic_tokens_enable=false
324357
#show_server_stderr=true
325358

326359

360+
[HTML]
361+
cmd=vscode-html-language-server --stdio
362+
extra_identifier_characters=&
363+
send_did_change_configuration=true
364+
autocomplete_use_snippets=true
365+
use_without_project=true
366+
use_outside_project_dir=true
367+
#rpc_log=stdout
368+
#rpc_log_full=true
369+
#show_server_stderr=true
370+
371+
327372
[Java]
328373
cmd=jdtls
329374
autocomplete_use_label=false
@@ -391,8 +436,11 @@ extra_identifier_characters=$
391436
[Python]
392437
# pip install pyright (or: pipx install pyright)
393438
cmd=pyright-langserver --stdio
394-
# alternatively pylsp
439+
cmd=pyright-langserver --stdio
440+
# alternatively pylsp, jedi, ruff
395441
#cmd=pylsp
442+
#cmd=jedi-language-server
443+
#cmd=ruff server
396444
use_outside_project_dir=true
397445
use_without_project=true
398446
#rpc_log=stdout
@@ -446,6 +494,7 @@ autocomplete_use_snippets=true
446494
diagnostics_statusbar_severity=4
447495
use_without_project=true
448496
use_outside_project_dir=true
497+
autocomplete_in_strings=true
449498
# see https://github.com/eclipse/lemminx/blob/main/docs/Configuration.md
450499
#initialization_options_file=/home/some_user/init_options.json
451500
#formatting_options={ "tabSize": 4, "insertSpaces": true }
@@ -465,6 +514,15 @@ use_outside_project_dir=true
465514
#show_server_stderr=true
466515

467516

517+
[Zig]
518+
cmd=zls
519+
semantic_tokens_enable=true
520+
#autocomplete_use_snippets=true
521+
#rpc_log=stdout
522+
#rpc_log_full=true
523+
#show_server_stderr=true
524+
525+
468526
# TODO: help needed! Only the above defined language servers have been tested
469527
# (lightly). If you know some other working language server or find a problem
470528
# with the settings above, please open an issue report or a pull request

lsp/src/Makefile.am

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ lsp_la_SOURCES = \
3737
lsp-rpc.h \
3838
lsp-semtokens.c \
3939
lsp-semtokens.h \
40+
lsp-selection-range.c \
41+
lsp-selection-range.h \
4042
lsp-server.c \
4143
lsp-server.h \
4244
lsp-signature.c \

0 commit comments

Comments
 (0)