taplo icon indicating copy to clipboard operation
taplo copied to clipboard

VSCode item duplication

Open AntoineGS opened this issue 1 year ago • 2 comments

I am using the VSCode integration (v0.19.2) from marketplace and running into an issue with some items being duplicated. The same schema works fine in RustRover (JetBrains) though.

The following schema is what I am using.

Relevant lines in the schema: Definition of git-release-type Definition of ReleaseType

Here is the duplication (it creates an entry for each enum): image

To replicate, since it is on the SchemaStore, simply create a file named release-plz.toml and try the auto-complete in VSCode.

I am not a pro with schemas but seeing that JetBrains handles it well, I am leaning towards the fact that taplo does not support this type of definition or struggles with it?

Any help would be appreciated, thank you!

AntoineGS avatar Dec 11 '23 22:12 AntoineGS

I noticed another symptom of this. Properties that use oneOf will also have a duplicate entry. This can be seen with a hugo.toml file and the markup.highlight.lineNos property. https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/hugo.json#L1346

image

akbyrd avatar Dec 12 '23 09:12 akbyrd

Not sure of the root cause. It could be that other LSP servers just deduplicate suggestions. But it could also be that Taplo emits duplicate suggestions.

I don't think this will get fixed unless someone really looks into how Taplo works.

ia0 avatar Dec 12 '23 10:12 ia0