diff --git a/editors/vscode/package.json b/editors/vscode/package.json index 799f96b74..c0702cd8f 100644 --- a/editors/vscode/package.json +++ b/editors/vscode/package.json @@ -340,7 +340,7 @@ "title": "Configure default word separators", "description": "Whether to configure default word separators on startup", "type": "string", - "default": "enable", + "default": "disable", "enum": [ "enable", "disable" @@ -688,14 +688,12 @@ "configurationDefaults": { "[typst]": { "editor.wordWrap": "on", - "editor.wordSeparators": "`~!@#$%^&*()=+[{]}\\|;:'\",.<>/?", "editor.semanticHighlighting.enabled": true, "editor.tabSize": 2, "editor.inlayHints.enabled": "off" }, "[typst-code]": { "editor.wordWrap": "on", - "editor.wordSeparators": "`~!@#$%^&*()=+[{]}\\|;:'\",.<>/?", "editor.semanticHighlighting.enabled": true, "editor.tabSize": 2, "editor.inlayHints.enabled": "off" diff --git a/editors/vscode/src/lsp.ts b/editors/vscode/src/lsp.ts index 356668f6e..cadbf7f0f 100644 --- a/editors/vscode/src/lsp.ts +++ b/editors/vscode/src/lsp.ts @@ -542,6 +542,10 @@ export class LanguageState { ]; } + // This is different from `wordSeparators`. We need to document difference here. + // todo: document difference here. + // + // https://code.visualstudio.com/api/language-extensions/language-configuration-guide#word-pattern const wordPattern = /(-?\d*.\d\w*)|([^\`\~\!\@\#\$\%\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.<\>\/\?\s]+)/;