Bug 495416 - Kate snippets suggestion missing in Plasma 6
Summary: Kate snippets suggestion missing in Plasma 6
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: plugin-snippets (show other bugs)
Version: 24.08.2
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-10-27 07:32 UTC by mitlaw2004
Modified: 2024-11-17 08:07 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mitlaw2004 2024-10-27 07:32:22 UTC
SUMMARY
I use the Kate editor as an IDE and I noticed that after the launch of Plasma 6, in the Kate application I no longer receive suggestions for my snippets when I edit code, in any type of file. I looked for this behavior on the net but did not find anything.

STEPS TO REPRODUCE
1. Open a source code file with Kate (ex, test.sh)
2. Enable Snippets plugin from Kate Settings
3. Create and save a proper snipped repository (let say for Bash files) and add and save a snipped code in that repository.
4. Type your snipped title in source code file.

OBSERVED RESULT
Snippet suggestion is missing.

EXPECTED RESULT
A tool tip with snippet suggestion that insert the snippet in file at Tab key pressing. 

SOFTWARE/OS VERSIONS
EndeavourOS (Archlinux)
KDE Plasma Version: 6.2.2
KDE Frameworks Version: 6.7.0
Qt Version: 6.8.0
Comment 1 Waqar Ahmed 2024-11-06 17:42:51 UTC
regressed due to https://bugs.kde.org/show_bug.cgi?id=462383
Comment 2 Bug Janitor Service 2024-11-06 18:08:38 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/kate/-/merge_requests/1644
Comment 3 Christoph Cullmann 2024-11-09 13:15:54 UTC
Git commit a8463f8761d35701803367c38b416dbb724e015e by Christoph Cullmann, on behalf of Waqar Ahmed.
Committed on 09/11/2024 at 13:11.
Pushed by cullmann into branch 'master'.

Fix snippets not working unless completion is hard invoked

They should not be completely disabled unless someone hard presses
ctrl-space as it makes the experience very annoying. Overtime one can
get used to the annoyance but I am not sure its a good idea.

The new logic honors ktexteditor minimal word length and starts the
completion if the last char is a letter. This should avoid the issue
with snippet completion starting on pressing `.`. However, this might
still be too simplistic but we can refine on it instead of hard
disabling the feature
Related: bug 462383

M  +14   -8    addons/snippets/snippetcompletionmodel.cpp

https://invent.kde.org/utilities/kate/-/commit/a8463f8761d35701803367c38b416dbb724e015e
Comment 4 Waqar Ahmed 2024-11-17 08:07:32 UTC
Git commit 3a9e858c71cbd8a5021e73cb86fc52a7e5fa2b15 by Waqar Ahmed.
Committed on 17/11/2024 at 08:02.
Pushed by waqar into branch 'release/24.12'.

Fix snippets not working unless completion is hard invoked

They should not be completely disabled unless someone hard presses
ctrl-space as it makes the experience very annoying. Overtime one can
get used to the annoyance but I am not sure its a good idea.

The new logic honors ktexteditor minimal word length and starts the
completion if the last char is a letter. This should avoid the issue
with snippet completion starting on pressing `.`. However, this might
still be too simplistic but we can refine on it instead of hard
disabling the feature
Related: bug 462383
(cherry picked from commit a8463f8761d35701803367c38b416dbb724e015e)

M  +14   -8    addons/snippets/snippetcompletionmodel.cpp

https://invent.kde.org/utilities/kate/-/commit/3a9e858c71cbd8a5021e73cb86fc52a7e5fa2b15