Skip to content

Commit

Permalink
fix(vscode): enable and recognise JSONC files (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico authored Aug 29, 2023
1 parent d3b71d8 commit 9b86ed7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions crates/rome_service/src/file_handlers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ impl Language {

/// Returns the language corresponding to this language ID
///
/// See the [microsoft spec] <https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocumentItem>
/// See the [microsoft spec]
/// for a list of language identifiers
///
/// [microsoft spec]: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocumentItem
/// [microsoft spec]: https://code.visualstudio.com/docs/languages/identifiers
pub fn from_language_id(s: &str) -> Self {
match s.to_lowercase().as_str() {
"javascript" => Language::JavaScript,
Expand Down
3 changes: 2 additions & 1 deletion editors/vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
"publisher": "biomejs",
"displayName": "Biome",
"description": "Biome LSP VS Code Extension",
"version": "1.0.0",
"version": "1.0.1",
"icon": "icon.png",
"activationEvents": [
"onLanguage:javascript",
"onLanguage:javascriptreact",
"onLanguage:typescript",
"onLanguage:typescriptreact",
"onLanguage:json",
"onLanguage:jsonc",
"onCommand:biome.syntaxTree"
],
"main": "./out/main.js",
Expand Down
1 change: 1 addition & 0 deletions editors/vscode/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export async function activate(context: ExtensionContext) {
{ language: "javascriptreact", scheme: "file" },
{ language: "typescriptreact", scheme: "file" },
{ language: "json", scheme: "file" },
{ language: "jsonc", scheme: "file" },
];

const clientOptions: LanguageClientOptions = {
Expand Down

0 comments on commit 9b86ed7

Please sign in to comment.