Use // comments for .json (#3388)

Add comments to `.json` files using `//` instead of the default `#`.

Even though JSON does not support comments, JSON5 and JSONC exist, so `//` is a much more sane default. It also improves the experience of editing micro's own config files.
This commit is contained in:
Justin Su 2024-07-30 16:58:07 -04:00 committed by GitHub
parent e042bb3514
commit b8772b69c2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 0 deletions

View file

@ -28,6 +28,7 @@ ft["ini"] = "; %s"
ft["java"] = "// %s"
ft["javascript"] = "// %s"
ft["jinja2"] = "{# %s #}"
ft["json"] = "// %s"
ft["julia"] = "# %s"
ft["kotlin"] = "// %s"
ft["lua"] = "-- %s"

View file

@ -47,6 +47,7 @@ but it is only available for certain filetypes:
* java: `// %s`
* javascript: `// %s`
* jinja2: `{# %s #}`
* json: `// %s`
* julia: `# %s`
* kotlin: `// %s`
* lua: `-- %s`