Releases: kakoune-lsp/kakoune-lsp
v18.0.2
18.0.2 - 2024-10-18
Breaking changes:
- The
-v
parameter is now ignored because, it pollutes the*debug*
buffer since version 18.0.0.
Use thelsp_debug
option instead. It's only meant to be set temporarily, for debugging.
For the case wherekak-lsp
is started outside the editor, an equivalent--debug
command line flag has been added.
Fixes:
- Fix startup error on HTML files.
- Fix a regression in
lsp-workspace-symbol{,-incr}
commands. - Fix crash due to a regression in
lsp-highlight-references
. - Demote a number of logs to keep the
*debug*
buffer clean. Only errors, warnings and occasional info logs should be shown. - The info box shown by
lsp-show-message-{error,warning,info}
is no longer created in the toolsclient but in the most recently used client. - Fix missing error messages when LSP commands are run from either a scratch buffer or a buffer where the server is not installed.
Additions
- Further reduce the number of shell calls caused by hooks, in addition to the work done on this in version 18.0.0.
- When crashing via a Rust panic, the process is now aborted and creates a coredump.
Also, crashes are now shown in an info box.
v18.0.1
18.0.1 - 2024-10-14
Fix error parsing a legacy kak-lsp.toml
that doesn't have a language_ids
section.
v18.0.0
18.0.0 - 2024-10-13
The kak-lsp.toml
config file has been deprecated, as have been lsp_config
, KAK_LSP_PROJECT_ROOT_*
and KAK_LSP_FORCE_PROJECT_ROOT
as well as commandline flags --config
, --log
and --timeout
.
This is in favor of new Kakoune options lsp_servers
, lsp_language_id
, lsp_semantic_tokens
, lsp_timeout
, lsp_snippet_support
and lsp_file_watch_support
.
In particular, the lsp_servers
option makes it easier to
- override servers only for specific filetypes, and
- set server config dynamically (based on project etc.) via Kakoune commands and hooks.
For backwards compatibility, the new options are ignored if a kak-lsp.toml
exists in the user's config directory (or is provided via --config
).
By default, lsp_servers
and lsp_language_id
are populated via the hooks in the lsp-filetype-.*
groups, feel free to remove them.
See the documentation of the respective options for details.
Thanks to Tobias Pisani for designing this config rework.
Breaking changes:
- The
--session
argument used to allow using a single kakoune-lsp server from multiple Kakoune sessions.
This feature has been removed to allow supportingrename-session
better;
it may be added back if we find a need for it.
The--session
argument is now ignored, except whenkak-lsp
is started outside the editor.
This means that you probably don't need to override thelsp_cmd
option anymore.
Additionally,rename-session
no longer breaks kakoune-lsp by invalidating the--session
argument. lsp-stop-on-exit-disable
andlsp-stop-on-exit-enable
no longer have an effect.
Instead, the kakoune-lsp server will always stop running as soon as its associated Kakoune session exits.- The default server timeout has been increased from 1800 seconds (30 minutes) to 18000 seconds (5 hours),
to avoid potential delays from frequent restarts.
Additions:
- Log messages are now written to the
*debug*
buffer. - New option
lsp_debug
to control log verbosity without restartingkak-lsp
. - New command
lsp-restart
. - The
--kakoune
argument is no longer needed and has been deprecated.
This simplifies the minimal configuration toeval %sh{kak-lsp}; lsp-enable
. - If the server supports LSP workspaceFolders, a single language server
instance will be reused for all projects in a Kakoune session.
The file where the language server was originally started from determines the (only) workspaceFolder we send to the language server. - In language server definitions, the
command
field is now optional and defaults to the name of the language server. - New faces
DiagnosticTagDeprecated
andDiagnosticTagUnnecessary
for the LSP's diagnostic tags.
Fixes:
- On
rename-session
, the kakoune-lsp server for the old session will be shut down.
This only works with Kakoune version >= v2024.05.09. lsp-*
commands that requirelsp-enable
/lsp-enable-window
now fail more explicitly.- Fix a crash when requesting code actions from
rust-analyzer
. - Fix a crash when running Rust unit tests via
rust-analyzer's
lsp-code-lens
. lsp-goto-document-symbol
now uses qualified names, to make sure that it shows all symbols in the current buffer.
v17.1.2
17.1.2 - 2024-08-17
Additions:
- Experimental LSP client capabilities can now be enabled via
kak-lsp.toml
.
Fixes:
- Fix crash on multiple language servers when one server doesn't support code actions.
- For consistency with our
root_path
project detection mechanism, the default config for Julia no longer supports theJULIA_PROJECT
environment variable nor falls back on the global Julia environment. - Fix build on Rust 1.80.
v17.1.1
17.1.1 - 2024-06-27
Additions:
- Default configuration for Svelte via svelte-language-server.
- The language server stderr is logged eagerly instead of only after server exit; (useful for when servers like rust-analyzer crash).
- Support dynamic for registration semantic tokens via
textDocument/semanticTokens
. lsp-code-actions
has learned to filter by code action kind.
This should obsolete thelsp-code-action
command which has been hidden and deprecated.lsp-code-actions
learned the-auto-single
switch to instantly run if there is only one matching code action.- The default config now enables inlay hints also for recent version of Scala Metals.
Fixes:
- Fixed a case where a legacy
kak-lsp.toml
specifying the same server for multiple languages would drop all but one language. - Some hover info had extra trailing whitespace, which is now trimmed properly.
- Hover info containing ASCII-art tables as popular in some flavors of Markdown is now rendered properly.
v17.0.1
17.0.1 - 2024-04-06
Small patch release to fix a regression.
Fixes:
- Fix startup error when both lsp.kak and Kakoune's jump.kak are autoloaded.
v17.0.0
17.0.0 - 2024-04-04
Breaking changes:
- New default server for Nix,
nil
, replacingrnix-lsp
. - The
gopls
usePlaceholders
setting now defaults to true in the default config, make sure to either add a mapping forlsp-snippets-select-next-placeholders
or disable snippets. gopls
default config has been changed so inlay (type) hints require no gopls-specific knobs to turn on. As with other servers, inlay hints are only requested whenlsp-inlay-hints-enabled
is used.- The default config for HTML/CSS/JSON has been updated to use
vscode-{html,css,json}-language-server
as server command instead ofvscode-{html,css,json}-languageserver
. - Support for watching files (
workspace/didChangeWatchedFiles
) is now disabled by default to avoid performance problems. - Inlay code lenses (used by OCaml and Haskell language servers) are now shown after the referenced line. This requires Kakoune version >= 2024.
lsp-auto-hover-enable
no longer takes an argument; that functionality has been moved tolsp-auto-hover-buffer-enable
, and it no longer magically spawns a client.- Removed
lsp-connect
experimental command.
Additions:
- New commands
jump-{next,previous}
(which have also been added to Kakoune) replace and deprecatelsp-{next,previous}
. lsp-document-symbol
no longer renders the same filename in every single line. Commands likejump-next
and<ret>
still work as before.- New option
lsp_hover_max_info_lines
replaces and deprecateslsp_hover_max_lines
which now defaults to-1
which meanslsp_hover_max_info_lines
is used to control lines of information in the hover box. - New option
lsp_hover_max_diagnostic_lines
to limit the lines for diagnostics in the hover box.
Fixes:
- Fix
gopls
code actions like "Extract function". - Various improvements to compatibility with old Kakoune.
v16.0.0
16.0.0 - 2024-02-20
Both the kak-lsp project and GitHub organization have been renamed to kakoune-lsp. The binary and config file paths are unchanged. Distributors are encouraged to update the package name.
Breaking changes:
- kakoune-lsp now requires Kakoune version >= v2022.10.31 for commands that use a menu, like code actions.
Additions:
- The modeline shows breadcrumbs like
somemodule > someclass > somefunction
to indicate the symbol around the main cursor. lsp-document-symbols
now renders symbols in a tree.lsp_auto_show_code_actions
(which renders a lightbulb in the modeline) now defaults to true.lsp-code-lens
can now run the test at cursor withrust-analyzer
.
Fixes:
lsp-inlay-diagnostics
no longer jump around when the cursor is moved over the diagnostics. To use this feature, use Kakoune version >= 2024 (not yet release, consider building from source).- When LSP integration is enabled, then disabled and enabled again, the
KakEnd
hook failed to ask the server to exit, which has been fixed. lsp-auto-hover-enable
now only re-renders hover info when the main selection changes. This means that:info
is no longer shadowed immediately by auto hover.- Completion snippets (accessed via
lsp-snippets-select-next-placeholders
) can now be nested, making it possible to cycle through the arguments of nested function calls. - In some cases, selecting completions provided by
rust-analyzer
would labels with extra characters (likeself.some_method(β¦)
) which has been fixed. completionItem.additionalTextEdits
are now applied also when the server does not supportcompletionItem/resolve
.- Snippet metacharacters are now properly escaped, removing spurious backslashes from inserted completions.
v15.0.1
v15.0.0
15.0.0 - 2023-11-15
Additions:
- Support multiple language servers per filetype (#17).
- The
kak-lsp.toml
format for specifying language servers has changed. The old format is still supported (#686). lsp-goto-document-symbol
learned to show a preview of the jump target.- Default configuration for PureScript and Scala.
Fixes:
- A regression broke resolving completion item documentation when cycling through completion candidates, which has been fixed (#674).
- New command
lsp-declaration
, implementingtextDocument/declaration
.