ZIm/crates/language/src
Tim Havlicek fb3ef0d140
Add separate JSONC language (#12655)
Resolves https://github.com/zed-industries/extensions/issues/860 and
https://github.com/zed-industries/zed/issues/10921, also
https://github.com/biomejs/biome-zed/issues/11.

### Problem:
When opening .json files, zed allows comments by default in the JSON
language, which can cause some problems.
For example, language-servers also get "json" as the language, which may
show errors for those comments.

<img width="935" alt="image"
src="https://github.com/zed-industries/zed/assets/10381895/fed3d83d-abc0-44b5-9982-eb249bb04c3b">

### Solution:

This PR adds a JSONC language. 

<img width="816" alt="image"
src="https://github.com/zed-industries/zed/assets/10381895/8b40e671-d4f0-4e8d-80cb-82ee7c0ec490">

This allows for more specific configuration for language servers. 
Also any json file can be set explicitly to be JSONC using the
file_types setting:

```jsonc
{
  "file_types": {
    // set all .json files to be seen as JSONC
    "JSONC": ["*.json"]
  }
}
```


Release Notes:

- N/A
2024-06-27 11:12:02 +02:00
..
syntax_map Add a setting for custom associations between languages and files (#9290) 2024-03-13 10:23:30 -07:00
buffer.rs Combine multiple buffer update count fields into one (#13449) 2024-06-23 22:20:10 -07:00
buffer_tests.rs Introduce multi-cursor inline transformations (#13368) 2024-06-21 17:41:43 +02:00
diagnostic_set.rs Send along diagnostics when requesting code actions (#10281) 2024-04-08 17:54:06 +02:00
highlight_map.rs Docs for indent_size_for_line and co 2024-01-09 20:50:34 +01:00
language.rs Add support for auto surround (#13217) 2024-06-20 12:48:46 +03:00
language_registry.rs Add separate JSONC language (#12655) 2024-06-27 11:12:02 +02:00
language_settings.rs Add separate JSONC language (#12655) 2024-06-27 11:12:02 +02:00
markdown.rs Fix Markdown code rendering in tooltips ignoring languages (#10607) 2024-04-16 12:49:35 +02:00
outline.rs Introduce an outline panel (#12637) 2024-06-12 23:22:52 +03:00
proto.rs Revert "Revert "language: Remove buffer fingerprinting (#9007)"" (#9671) 2024-04-12 18:40:35 +02:00
syntax_map.rs chore: Fix clippy for upcoming 1.79 Rust release (#12727) 2024-06-06 12:46:53 +02:00
task_context.rs tasks: Provide task variables from matching runnable ranges in task modal (#12237) 2024-05-24 21:00:23 +02:00