Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestions for wordSeparators #37202

Closed
Kurt-Shiwz opened this issue Oct 31, 2017 · 6 comments
Closed

Suggestions for wordSeparators #37202

Kurt-Shiwz opened this issue Oct 31, 2017 · 6 comments
Labels
feature-request Request for new features or functionality languages-basic Basic language support issues suggest IntelliSense, Auto Complete
Milestone

Comments

@Kurt-Shiwz
Copy link

  • VSCode Version:
    1.17.2
  • OS Version:
    10.13

Sometime I whill write some chinese work (not in a-zA-Z or digital, not a ascii character), I already set "editor.wordSeparators" to "`~!@#$%^&*()-=+[{]}\|;:'",.<>/?、:,。“”‘;", but there also have some problem.
image
vscode can't find "test" is a word, so quickSuggestions don't effect. but if i type space it will work.
image

Reproduces without extensions: Yes/No

@alexdima
Copy link
Member

alexdima commented Nov 1, 2017

@Kurt-Shiwz The word suggestions do not use editor.wordSeparators, they use whatever makes sense in the programming language you are working in. i.e. each programming language defines what constitutes a word for it, mostly based on the language syntax.

What programming language are you using ? i.e. what file extensions? .js, .c, etc ?

@alexdima alexdima added the info-needed Issue requires more information from poster label Nov 1, 2017
@Kurt-Shiwz
Copy link
Author

Kurt-Shiwz commented Nov 1, 2017

On plaintext
我在做test测试t
or .json
{"我在做test测试t":"","examp":"我在做test测试t"}
or .cpp
std::string t = "我在做test测试t";

@alexdima
Copy link
Member

alexdima commented Nov 1, 2017

Word definitions:

  • plaintext: /(-?\d*\.\d\w*)|([^\`\~\!\@\#\$\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g . Defined here

  • json: /("(?:[^\\\"]*(?:\\.)?)*"?)|[^\s{}\[\],:]+/ . Defined here

  • C++: falls back to the same as plaintext.

PR welcome. As VS Code is aimed at authoring source code, our priority is to make the default configurations for word definitions match more those of a programming language than those of a rich text editor.

@alexdima alexdima added feature-request Request for new features or functionality languages-basic Basic language support issues suggest IntelliSense, Auto Complete and removed info-needed Issue requires more information from poster labels Nov 1, 2017
@alexdima alexdima added this to the Backlog milestone Nov 1, 2017
@alexdima alexdima removed their assignment Nov 1, 2017
@jrieken jrieken removed their assignment Nov 1, 2017
@Kurt-Shiwz
Copy link
Author

plaintext can use that
(-?\d*\.\d\w*)|(\w+)

@alexdima
Copy link
Member

alexdima commented Nov 2, 2017

\w would make it significantly worse:

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp
image

e.g. of running with that change (-?\d*\.\d\w*)|(\w+) for plaintext:

image

@alexdima
Copy link
Member

This feature request will not be considered in the next 6-12 months roadmap and as such will be closed to keep the number of issues we have to maintain actionable. Thanks for understanding and happy coding!

@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality languages-basic Basic language support issues suggest IntelliSense, Auto Complete
Projects
None yet
Development

No branches or pull requests

3 participants