Closed LinusU closed 6 years ago
@LinusU Thanks for your feedback. I had a deeper look on that, but it does not seem to be fixed as easy as initially thought.
Details: According to SourceKit/docs/Procol#code-completion, I just need to pass SourceKit's key.num_bytes_to_erase
to vscode-languageserver
's CompletionItem.additionalTextEdits
as TextEdit.del
, but in reality key.num_bytes_to_erase
is always 0
. Maybe I misunderstood something?
I also get multiple dots (.
) when accepting a completion. I wonder if it's the same issue?
@rudedogg Probably yes. Can you provide some example code where it happened to you? Are you a Mac or a Linux user?
@vknabel is this fixed? In which version? I would love to test it out βΊοΈ
@LinusU no sorry. I accidentially Hit the wrong Button π
Hehe, I almost guessed that π no problem!
Hey @vknabel, can you try this:
[Press Enter for the completion]
Let me know if you can reproduce, if not I'll find try and replicate it on the GitHawk iOS project or something.
@LinusU here is another build. It should fix your func
issue.
@rudedogg I still couldn't reproduce it and I guess this may be related to a different setup, because @renanyoy did have this problem a while back, too. I included a workaround that hopefully fixes your ..
issue, too.
vscode-swift-development-environment-2.3.0.vsix.zip also includes #10 and #11.
@vknabel Sorry for the really late reply. Electron apps are laggy for some reason on my Hackintosh, but new graphics drivers were released so VS Code is running a lot better.
I tried the 2.3.0 VSIX release you linked, and it fixes the double dot (..
) issue when accepting a completion candidate π !
In case it helps debug that issue, here's my setup: macOS 10.13.4, VS Code 1.21.1, project targeting macOS 10.10 (https://github.com/akhilcb/ACBTokenField)
@rudedogg great to hear! And as it solved your issues: I just released 2.3.0.
When accepting autocomplete for an override function, the
func
keyword gets added twice, resulting in broken code.e.g. with this code:
and having the cursor after
func vie
and choosingviewDidAppear(_ animated: Bool)
results in the following code: