-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
completion popup fails to display a CompletionItem until 3rd character is typed #6033
Comments
No completion shows up:
Notice, it's there in the json!! How the Completion Item is being constructed:
Completion now do show upi just typed a 3rd character, notice the same json received.. it doesn't make sense..
How the Completion Item is being constructed:
|
I found the issue!! it is due to the function definition erro :: proc(fmt: string, args: ..any, location := #caller_location) If i remove the default Then the completitonitem shows up! Is it a bug in sublime text? or in the language tm file for sublime? If it's a problem in the tm file, can someone help me debug this? |
I suppose it's a duplicate of #819. Ideally those characters (the whole function arguments part) would not be part of the trigger because ST filters on those characters. LSP has some heuristics for what to put there because ST doesn't allow to show one thing and filter on another thing like VSCode and some other editors do and what LSP really requires. I suppose the most realistic is for the server or LSP to work around it or improve the heuristic. |
After more testing, it also seems like the So when both are there, it causes the problem Language server doesn't have to work around anything, LSP is editor agnostic, it is up to the editor to workaround things if it wants to support LSP |
I submitted a PR for trick that solve this problem: sublimelsp/LSP#2293 |
Description of the bug
I have described the bug here: sublimelsp/LSP#2288 (comment)
Steps to reproduce
I can't test in safe-mode because it depends on the plugin LSP
install odin compiler https://odin-lang.org/
build ols https://github.com/DanielGavin/ols/
install sublime LSP
install sublime-odin: https://github.com/odin-lang/sublime-odin
set this config:
/home/user/Downloads/sublimebug/src/rt
src/main_game.odin
rt.te
test_message
symbol fromrt/dbg.odin
rt.tes
< notice 3rd character we type, in the LSP log, we can see the same json response, and yet now Sublime Text shows the completiton item!Expected behavior
Explained above in "Steps to reproduce"
Actual behavior
Explained above in "Steps to reproduce"
Sublime Text build number
4143
Operating system & version
Arch Linux x64
(Linux) Desktop environment and/or window manager
Openbox
Additional information
No response
OpenGL context information
No response
The text was updated successfully, but these errors were encountered: