diff --git a/code/package.json b/code/package.json index 5a02fe11..bc559896 100644 --- a/code/package.json +++ b/code/package.json @@ -63,7 +63,7 @@ }, "icon": "icon.png", "activationEvents": [ - "onLanguage:rst", + "onLanguage:restructuredtext", "workspaceContains:**/conf.py" ], "contributes": { @@ -258,7 +258,7 @@ ], "grammars": [ { - "language": "rst", + "language": "restructuredtext", "scopeName": "source.rst", "path": "./syntaxes/rst.tmLanguage.json", "embeddedLanguages": { @@ -270,32 +270,39 @@ { "command": "esbonio.insert.inlineLink", "key": "alt+l", - "when": "editorTextFocus && editorLangId == rst" + "when": "editorTextFocus && editorLangId == restructuredtext" }, { "command": "esbonio.insert.link", "key": "alt+shift+l", - "when": "editorTextFocus && editorLangId == rst" + "when": "editorTextFocus && editorLangId == restructuredtext" }, { "command": "esbonio.preview.open", "key": "ctrl+shift+v", - "when": "editorTextFocus && editorLangId == rst" + "when": "editorTextFocus && editorLangId == restructuredtext" }, { "command": "esbonio.preview.openSide", "key": "ctrl+k v", - "when": "editorTextFocus && editorLangId == rst" + "when": "editorTextFocus && editorLangId == restructuredtext" } ], "languages": [ { - "id": "rst", + "id": "restructuredtext", "extensions": [ - ".rst" + ".rst", + ".rest" ], "aliases": [ - "reStructuredText" + "reStructuredText", + "restructuredtext", + "ReStructured Text", + "reStructured Text", + "RST", + "ReST", + "reST" ], "configuration": "./rst-language-configuration.json" } @@ -306,7 +313,7 @@ "command": "esbonio.preview.openSide", "alt": "esbonio.preview.open", "group": "navigation", - "when": "resourceLangId == rst" + "when": "resourceLangId == restructuredtext" } ] } diff --git a/code/src/lsp/client.ts b/code/src/lsp/client.ts index d488c19f..e106cc16 100644 --- a/code/src/lsp/client.ts +++ b/code/src/lsp/client.ts @@ -306,7 +306,7 @@ export class EsbonioClient { } let documentSelector = [ - { scheme: 'file', language: 'rst' }, + { scheme: 'file', language: 'restructuredtext' }, ] if (config.get('server.enabledInPyFiles')) { diff --git a/code/src/test/suite/editor.test.ts b/code/src/test/suite/editor.test.ts index 2bc02b9a..6d058b93 100644 --- a/code/src/test/suite/editor.test.ts +++ b/code/src/test/suite/editor.test.ts @@ -24,7 +24,7 @@ suite('EditorCommands', () => { let editor: vscode.TextEditor before(async () => { - const document = await vscode.workspace.openTextDocument({ language: 'rst' }) + const document = await vscode.workspace.openTextDocument({ language: 'restructuredtext' }) editor = await vscode.window.showTextDocument(document) })