Closed luckydye closed 3 months ago
Would it work to map the JSON
language to jsonc
on the Biome extension side?
[language_servers.biome]
name = "Biome Language Server"
language = "JavaScript"
languages = ["JavaScript", "JSX", "TypeScript", "TSX", "Vue.js", "Astro", "Svelte", "JSON", "JSONC"]
# Map the "JSON" language in Zed to "jsonc" (or whatever ID Biome uses for JSONC files).
language_ids = { JSON = "jsonc" }
code_actions_kind = ["", "quickfix"]
Would it work to map the
JSON
language tojsonc
on the Biome extension side?[language_servers.biome] name = "Biome Language Server" language = "JavaScript" languages = ["JavaScript", "JSX", "TypeScript", "TSX", "Vue.js", "Astro", "Svelte", "JSON", "JSONC"] # Map the "JSON" language in Zed to "jsonc" (or whatever ID Biome uses for JSONC files). language_ids = { JSON = "jsonc" } code_actions_kind = ["", "quickfix"]
That was my first thought too, but I think being able to differentiate between linting for json or jsonc is useful too. And the output in the editor would become out of sync with what the cli outputs.
Check for existing issues
Describe the bug / provide steps to reproduce it
It seems all files in zed are interpreted to be jsonc (?) and does not have a "JSONC" language.
There are some files in the zed codebase (assets/keymaps/vim.json) for example, that use comments in .json files, but langauge-servers don't know about that. So the biome extension for example, shows diagnostics as if they are json files, which doesn't allow comments.
https://github.com/biomejs/biome-zed/issues/11
Environment
Zed: v0.132.2 (Zed Preview) OS: macOS 14.2.1 Memory: 16 GiB Architecture: aarch64
If applicable, add mockups / screenshots to help explain present your vision of the feature
No response
If applicable, attach your
~/Library/Logs/Zed/Zed.log
file to this issue.No response