How to check compose.yaml file on VSCode/VSCodium #3873
|
Wanted to use Harper extension with docker compose “compose.yaml” files, but there is no identification of obvious spelling errors, etc. Tried it with a new file (not yaml) and errors were detected, and hoverable. Have I overlooked a setting for checking yaml files? Thanks! |
Replies: 2 comments 1 reply
|
You have not missed a VS Code/VSCodium setting: YAML is not currently one of the language IDs supported by The official supported-languages table includes Markdown, plain text, TOML, and comments in many programming languages, but it does not list That is why Harper works when the same content is opened as plain text but does nothing when VS Code identifies As a quick confirmation, click the language mode in the lower-right corner and temporarily change it from YAML to Plain Text. Harper should then lint it. I would not make a permanent For a proper solution while retaining Compose validation, Harper needs YAML language support/a YAML parser that extracts only suitable natural-language regions (at minimum comments, and perhaps selected scalar strings). So the practical options today are:
The VS Code extension is powered by |
|
Thank you for such a clear response. |
You have not missed a VS Code/VSCodium setting: YAML is not currently one of the language IDs supported by
harper-ls.The official supported-languages table includes Markdown, plain text, TOML, and comments in many programming languages, but it does not list
yaml:https://writewithharper.com/docs/integrations/language-server#supported-languages
That is why Harper works when the same content is opened as plain text but does nothing when VS Code identifies
compose.yamlas YAML.As a quick confirmation, click the language mode in the lower-right corner and temporarily change it from YAML to Plain Text. Harper should then lint it. I would not make a permanent
files.associationsmapping fromc…