a bit of background information
atm i am running sourcekit-lsp from a privileged docker container on a linux host. i can see the process from outside but lldb fails with
said error "attach failed, lost connection".
i wasnt sure where the culprit was so i just opened an issue on lsp-mode, until i get debug information from sourcekit-lsp directly.
but at its core it seems this log from sourcekit-lsp prevails
2021-07-20 04:11:08.533 sourcekit-lsp[62:cacdd700] triggerFromIncompleteCompletions with incompatible completion session; expected DocumentURI(storage: <file:///work/cards/service/test/Sources/test/main.swift>)@24, but got DocumentURI(storage: <file:///work/cards/service/test/Sources/test/main.swift>)@29
This error indicates that the editor is trying to filter completions but has included a character that is not allowed. For example, if you have an existing completion like this:
foo.bar
^---
the trigger was "." and we are using "bar" to filter the completions down. If the user types ".", the editor should perform a new completion:
foo.bar.
^
with trigger kind TriggerCharacter or Invoked, but instead the error message indicates we got something more like
foo.bar.
^----
with trigger kind TriggerForIncompleteCompletions.
What code do you have on the line when this is happening, and what are the positions that it is complaining about? That should tell us which characters are causing the issue and help us understand if the issue is a bug in sourcekit-lsp or in the editor.
in the snippet i type in the function name "hello", followed by the parentheses. as first argument i intent to write out "name", but at the second char ("na") the error pops off.
in the end it looks like this:
func hello(na)
^ -->> Error pops off after typing "a"
i included a follow up request for code completion, including context, in the snippet and the empty response thereafter.
it seems after the return message "request cancelled" with the code "-32800" the process sourcekit-lsp only provides empty responses.
this is accredited with the following error message out of stderr
2021-07-21 02:46:22.001 sourcekit-lsp[47:a15a5700] triggerFromIncompleteCompletions with incompatible completion session; expected DocumentURI(storage: \url{file:///work/cards/service/test/Sources/test/main.swift})@29, but got DocumentURI(storage: \url{file:///work/cards/service/test/Sources/test/main.swift})@35