Skip to content

Commit

Permalink
code: changed language id
Browse files Browse the repository at this point in the history
  • Loading branch information
lextm authored and alcarney committed Feb 26, 2022
1 parent 78155cb commit c51085e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 12 deletions.
27 changes: 17 additions & 10 deletions code/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
},
"icon": "icon.png",
"activationEvents": [
"onLanguage:rst",
"onLanguage:restructuredtext",
"workspaceContains:**/conf.py"
],
"contributes": {
Expand Down Expand Up @@ -258,7 +258,7 @@
],
"grammars": [
{
"language": "rst",
"language": "restructuredtext",
"scopeName": "source.rst",
"path": "./syntaxes/rst.tmLanguage.json",
"embeddedLanguages": {
Expand All @@ -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"
}
Expand All @@ -306,7 +313,7 @@
"command": "esbonio.preview.openSide",
"alt": "esbonio.preview.open",
"group": "navigation",
"when": "resourceLangId == rst"
"when": "resourceLangId == restructuredtext"
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion code/src/lsp/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ export class EsbonioClient {
}

let documentSelector = [
{ scheme: 'file', language: 'rst' },
{ scheme: 'file', language: 'restructuredtext' },
]

if (config.get<boolean>('server.enabledInPyFiles')) {
Expand Down
2 changes: 1 addition & 1 deletion code/src/test/suite/editor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})

Expand Down

0 comments on commit c51085e

Please sign in to comment.