| Summary: | Support workspace/configuration in the LSP client | ||
|---|---|---|---|
| Product: | [Applications] kate | Reporter: | Alex Lowe <lengau> |
| Component: | general | Assignee: | KWrite Developers <kwrite-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | 24.12.2 | ||
| Target Milestone: | --- | ||
| Platform: | Kubuntu | ||
| OS: | Linux | ||
| Latest Commit: | https://invent.kde.org/utilities/kate/-/commit/4446f148d340176aeda2ac3980f7b04a0b9ec7a8 | Version Fixed/Implemented In: | |
| Sentry Crash Report: | |||
|
Description
Alex Lowe
2025-03-05 03:18:55 UTC
Another example of this in a different LSP: Astral's `ty` LSP warns that no workspace was provided during init. If kate has a project open, that should be provided as the workspace. [12:26:49  LSP Client Log] Started server python@: /snap/bin/ty server [12:26:49  LSP Server Log] python@ 0.000022041s WARN main ty_server::server: No workspace(s) were provided during initialization. Using the current working directory as a default workspace... 0.000357893s INFO main ty_project::metadata::options: Defaulting to python-platform `linux` 0.000412876s INFO main ty_python_semantic::program: Python version: Python 3.13, platform: linux 0.001880116s WARN ty:main ty_server::server: The client does not support file system watching. 0.001900294s WARN ty:main ty_server::server::api: Received notification workspace/didChangeConfiguration which does not have a handler. [12:27:20  LSP Client Log] Started server python@/home/lengau/Work/Code/craft-platforms: /snap/bin/ty server [12:27:21  LSP Server Log] python@/home/lengau/Work/Code/craft-platforms 0.000024546s WARN main ty_server::server: No workspace(s) were provided during initialization. Using the current working directory as a default workspace... 0.000763987s INFO main ty_project::metadata::options: Defaulting to python-platform `linux` 0.000782341s INFO main ty_python_semantic::program: Python version: Python 3.8, platform: linux [12:27:21  LSP Server Log] python@/home/lengau/Work/Code/craft-platforms 0.002087536s WARN ty:main ty_server::server: The client does not support file system watching. 0.002099789s WARN ty:main ty_server::server::api: Received notification workspace/didChangeConfiguration which does not have a handler. [12:27:21  LSP Server Log] python@/home/lengau/Work/Code/craft-platforms 0.047562334s INFO ty:worker:0 ty_project: Indexed 37 file(s) Git commit 4446f148d340176aeda2ac3980f7b04a0b9ec7a8 by Christoph Cullmann, on behalf of Johnny Hsieh. Committed on 22/07/2025 at 17:03. Pushed by cullmann into branch 'master'. Add support for workspace/configuration request in LSP client Changes: - Introduced LSPConfigurationItem and LSPConfigurationParams structs to handle configuration items and parameters. - Implemented parsing functions for configuration items and parameters in `lspclientserver.cpp`. - Updated LSPClientServer to emit configuration signals and handle configuration requests. References: - vim-lsp: [1](https://github.com/prabirshrestha/vim-lsp/blob/04428c920002ac7cfacbecacb070a8af57b455d0/autoload/lsp/utils/workspace_config.vim#L18-L30), [2](https://github.com/prabirshrestha/vim-lsp/blob/04428c920002ac7cfacbecacb070a8af57b455d0/autoload/lsp.vim#L953-L956) - neovim: [3](https://github.com/neovim/neovim/blob/b0e8b0a35f3d38763c564f6d4924f7be2e2271fb/runtime/lua/vim/lsp/handlers.lua#L199-L230) - LSP specification: [4](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#workspace_configuration) M +10 -0 addons/lspclient/lspclientprotocol.h M +47 -4 addons/lspclient/lspclientserver.cpp M +2 -0 addons/lspclient/lspclientserver.h M +29 -0 addons/lspclient/lspclientservermanager.cpp https://invent.kde.org/utilities/kate/-/commit/4446f148d340176aeda2ac3980f7b04a0b9ec7a8 |