Bug 503414

Summary: "Highlight" LSP action should be ran by default and highlight occurrences
Product: [Applications] kate Reporter: Yuri Timenkov <s.kdebugs>
Component: applicationAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: christoph, john.kizer
Priority: NOR    
Version First Reported In: 25.04.0   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 25.08.0
Sentry Crash Report:

Description Yuri Timenkov 2025-04-27 05:06:04 UTC
First, thanks for amazing product!

*Current behavior*: There is a pop-up menu item LSP Client -> Highlight. When invoked it opens a panel with references which are marked with toxic green background color in the editor (tried several dark themes, all the same)

*Desired behavior*:
1. Highlight action continuously runs in the background on cursor position change (with some delay, if generally enabled)
2. Doesn't open any panes.
3. Preferably the color should be following "Search highlight" category.
4. Another great usability improvement would be shortcuts to cycle through occurrences.

After reading Akseli's blog post https://planet.kde.org/akseli-lahtinen-aks-2025-04-20-how-i-use-kate-editor/ I decided to give kate a try and was amazed by the progress it made over last 20 years!
Comment 1 Christoph Cullmann 2025-04-27 21:59:37 UTC
That sounds like an interesting improvement. Are you interested to contribute on that?
Comment 2 Yuri Timenkov 2025-04-28 03:37:45 UTC
> Are you interested to contribute on that?

Why not? :) I have very little capacity left after life and work, but will try.
Comment 3 Yuri Timenkov 2025-05-17 13:06:16 UTC
Prepared a merge request: https://invent.kde.org/utilities/kate/-/merge_requests/1780
Comment 4 John Kizer 2025-05-21 18:12:59 UTC
(In reply to Yuri Timenkov from comment #3)
> Prepared a merge request:
> https://invent.kde.org/utilities/kate/-/merge_requests/1780

Awesome! Just for reference, if you add "BUG: 503414" to the commit message and merge request descriptions, then this bug report should then get automatically updated based on the status of that merge request as well :-)
Comment 5 John Kizer 2025-05-26 06:33:58 UTC
Switching status as this has an actively-working merge request in discussion :-)
Comment 6 Christoph Cullmann 2025-07-05 08:21:17 UTC
Git commit 2650a5e6b02f9524e9c17c77fe7d7832f5acbb21 by Christoph Cullmann, on behalf of Yuri Timenkov.
Committed on 05/07/2025 at 08:21.
Pushed by cullmann into branch 'master'.

Automatically highlight symbol under cursor

Instead of explicit command to get all highlights of the symbol under
the cursor this send these requests to LSP automatically in background.

Added Next/Previous actions simplify researching the code by allowing
quickly jump around symbol usages.

M  +1    -0    addons/lspclient/CMakeLists.txt
M  +3    -0    addons/lspclient/lspclientconfigpage.cpp
M  +3    -0    addons/lspclient/lspclientplugin.cpp
M  +1    -0    addons/lspclient/lspclientplugin.h
M  +9    -1    addons/lspclient/lspclientpluginview.cpp
A  +157  -0    addons/lspclient/lspclientsymbolhighlighter.cpp     [License: MIT]
A  +60   -0    addons/lspclient/lspclientsymbolhighlighter.h     [License: MIT]
M  +30   -23   addons/lspclient/lspconfigwidget.ui

https://invent.kde.org/utilities/kate/-/commit/2650a5e6b02f9524e9c17c77fe7d7832f5acbb21
Comment 7 Christoph Cullmann 2025-07-05 20:38:10 UTC
Git commit 07766eea234a416069881034c1b98ae135a89def by Christoph Cullmann.
Committed on 05/07/2025 at 20:38.
Pushed by cullmann into branch 'release/25.08'.

Automatically highlight symbol under cursor

Instead of explicit command to get all highlights of the symbol under
the cursor this send these requests to LSP automatically in background.

Added Next/Previous actions simplify researching the code by allowing
quickly jump around symbol usages.


(cherry picked from commit 2650a5e6b02f9524e9c17c77fe7d7832f5acbb21)

a998fb6a Automatically highlight symbol under cursor
d212be0f Minor cleanup
6d62d5f7 Cleaned redundant null checks
770dfd49 Use LSP results as a current word
1f0cae23 Added configuration for enabling symbol highlighting
db79ace8 Removed unnecessary QPointer
e114d46e Remove all highlights when text is selected

Co-authored-by: Yuri Timenkov <s.kde@timenkov.pro>

M  +1    -0    addons/lspclient/CMakeLists.txt
M  +3    -0    addons/lspclient/lspclientconfigpage.cpp
M  +3    -0    addons/lspclient/lspclientplugin.cpp
M  +1    -0    addons/lspclient/lspclientplugin.h
M  +9    -1    addons/lspclient/lspclientpluginview.cpp
A  +157  -0    addons/lspclient/lspclientsymbolhighlighter.cpp     [License: MIT]
A  +60   -0    addons/lspclient/lspclientsymbolhighlighter.h     [License: MIT]
M  +30   -23   addons/lspclient/lspconfigwidget.ui

https://invent.kde.org/utilities/kate/-/commit/07766eea234a416069881034c1b98ae135a89def