Closed keynmol closed 1 year ago
I wasn't aware this syntax is correct, it should be an easy fix. It looks like complete
from coursier returns empty completions, so maybe we can just remove last :
for completion, and then add it back. Are all versions allowed after ::
?
If we can show the same completions in both cases (after :
and ::
), then I have a fix ready, but I would wait for merging https://github.com/scalameta/metals/pull/5206 first
The way I see it, there are two ways of doing it:
using platform
directive, then we can limit coursier completions to only those with _sjs1
/_native0.4
suffix - meaning you only get completions for versions that are published for your target.::
, don't take platform into account. This should limit the number of times my website needs to be mentioned :D :: will work on jvm,js,native : only works on jvm
SBT out of the box doesn't have %%%
operator, so the docs cannot recommend to always use %%%
for all dependencies.
Scala CLI understands :
and ::
out of the box, and there is no harm to using ::
even if your project is purely JVM.
@jkciesluk you were looking into this last time we spoke, right?
Describe the bug
If you use double colon (in the last position) in the dependency spec, it disables the completions
Expected behavior
Dependency is completed regardless.
Discussion point: should Metals always complete using
::
to always work with cross-platform scripts? Is there any risk in defaulting to::
?Operating system
macOS
Editor/Extension
Nvim (nvim-metals)
Version of Metals
v0.11.12+89-6dc03ef0-SNAPSHOT
Extra context or search terms
completions, scala-cli, dependency, colon