Open efroemling opened 11 months ago
Dots are trigger characters for completions in Python, as declared here:
And in this case completions are requested because you have a dot right next to a #
(I guess if it's separated by a space, then you shouldn't see that).
However, I think you need to report this error to the eglot maintainers so that completions are not requested in comments.
Counter-point: when triggerKind
is TriggerCharacter
server should ideally only return completions if the context makes sense (i.e. not after a dot occurring just after a comment).
Sure, that's a good point. But my guess is that that is not the only scenario that triggers completions in eglot. I guess this should return them too:
foo = 1
# foo.
@efroemling, could you check that?
@ccordoba12 Here you go: (apologies for the slow response; was out on vacation)
The 'foo' test above does give me the same global completion popup.
Perhaps interestingly, I'm also getting the same for simply a dot preceded by a space.
Though I'm not getting completions for a dot (with or without spaces) without the comment.
Does this seem like it would fall under the python-lsp-server umbrella or should I ping the eglot folks?
Just shaking the tree here, as this is still happening for me as of Emacs 29.3 with python-lsp-server 1.11.0 running through eglot.
TLDR: If I type # This is a comment.
or even just #.
I always get a completion pop-up for the period. That doesn't seem right.
Typing This is not a comment.
does not give me a completion pop-up for the period unless 'comment' has been defined as a variable. That seems right.
Any other Emacs folks out there experiencing the same behavior? And is this something that should be fixed here or on the eglot end?
I recently upgraded to Emacs 29 and got eglot wired up with python-lsp-server within python-ts-mode for my project. Everything is mostly super awesome compared to my old pure-flycheck setup. There's just one bit of odd behavior I'm seeing that I wanted to ask about:
Whenever I type a dot within a comment, I get a completion pop-up. Outside of comments a lone dot won't trigger a completion, and I get correct type based completions after other stuff.
Is this expected behavior? I tend to use complete sentences in my comments and this is leading to lots of comments accidentally ending in '.ArithmeticError' instead of '.' 😬