Confusing completion
(If this should be reported at some other project, eg. Treesitter, please let me know.)
Here's a really curious completion:
- The cursor is not at a position where a completion makes sense in any case
- The completion itself is not useful. Why would you want to complete entire multiline strings?
Why would you want to complete entire multiline strings?
The completion isn´t a multiline string, the completion is only """x""". The other things shown are the context given for the treesitter based completion.
The cursor is not at a position where a completion makes sense in any case
I'm not familiar with the treesitter based completion, but that suggestion comes from the fact that you typed a " and the suggestion contains a "
This is a simplified example. If the strings was multiline you’d get a multiline completion.
Why would you want to complete entire multiline strings?
The completion isn´t a multiline string
this is a simplified example. In my original use case I had a multi line string and I got a multi line completion.
The cursor is not at a position where a completion makes sense in any case
I'm not familiar with the treesitter based completion, but that suggestion comes from the fact that you typed a
"and the suggestion contains a"
This doesn’t make sense anyways. The line is already syntactically correct and the cursor is in no position where this makes any sense.
I think this is just how Treesitter based completion works. That's a place on your document where a multiline string could be inserted (I'm not sure what they are called on Python, but I know that the are used to document functions, I think), so coq suggest that kind of strings. If you are in a place where a variable could be inserted, coq treesitter completion would suggest variables.
Maybe the treesitter based completion could be worked on to handle cases like this one (?). But I don't fullly understand how it works.
While you could insert that string there and still would have a syntactically correct line, I don't understand why it would make this suggestion. What is the trigger? The stuff before the cursor shouldn't trigger this completion because the " already has a matching partner. If you make this suggestion you might as well make this suggestion anywhere in the file.
Maybe that's out of scope for this plugin though