Closed milas closed 3 weeks ago
My workaround for the moment: keep the "$schema"
at the top of the file, uncomment it while editing, and then re-comment it on save.
# HACK(milas): uncomment while editing to get autocomplete in IntelliJ
# "$schema" = 'https://raw.githubusercontent.com/jdx/mise/main/schema/mise.json'
[tools]
go = '1.22'
OK, I realized after this that IntelliJ already knows the .mise.toml
filenames and enables autocomplete without the $schema
entry, it was just being weird for me before 🤦🏻
It seems to work out of the box in other editors too (I tried zed.dev), so I'm closing this.
Sorry for the noise, thanks for mise ❤️
At least in the JetBrains (IntelliJ) suite, it's possible to trigger JSON schema validation & autocomplete by associating a schema with the file by the
$schema
key.However, this is not valid within the schema itself, causing the file to fail loading when used.
Here's how Starship has handled the issue in their schema: https://github.com/starship/starship/blob/46b54ebc7d012908dc5ea7001d4d118cd14019bb/.github/config-schema.json#L6-L9
(The default is a nice self-referential touch, but not necessary.)