monogon-dev / intellij-cue

IntelliJ support for the CUE language.
Apache License 2.0
37 stars 3 forks source link

Tab Indents within Multiline String Literals #55

Open kghenderson opened 2 years ago

kghenderson commented 2 years ago

I completely understand that CUE follows Go and uses tabs for indentation. My issue is that I have injected code blocks within multi-line string literals in cue where tabs are disallowed. I tried adding my own 'code style' and 'line indent provider' to my custom nested language plugin, but IntelliJ seems to always be using the file type / parent language for this setting. Also tried EditorConfig with overrides on, but this didn't work either.

I'm thinking my only hack is to use a Hidden/Private Key in the user-visible cue file that then has tabs replaced in the Public key that gets exported, but it would be nice if we had an option to use separate indentation within strings.

kghenderson commented 2 years ago

some additional documentation regarding the issue: https://github.com/cue-lang/cue/issues/1720 https://cuelang.slack.com/archives/CLT3ULF6C/p1652628916206979