mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-12-23 08:47:50 +00:00
feat: make tinymist.configureDefaultWordSeparator opt in (#1389)
* feat: make `tinymist.configureDefaultWordSeparator` opt in * docs: add some comment
This commit is contained in:
parent
3590774383
commit
99bc4ac03d
2 changed files with 5 additions and 3 deletions
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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]+)/;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue