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

Respect editor.wordSeparators setting #2

Open
focusaurus opened this issue Nov 27, 2019 · 2 comments
Open

Respect editor.wordSeparators setting #2

focusaurus opened this issue Nov 27, 2019 · 2 comments

Comments

@focusaurus
Copy link

This extension doesn't seem to consider the editor.wordSeparators setting. I see you are using an API that in theory should consider that setting, but in my usage it doesn't seem to. Specifically if my cursor is in a kebab-case-word I want all of that selected, but it stops at the dash even though dash is not included in my editor.wordSeparators setting. This may actually be a VS Code issue but figured I'd file it here to see if you had any insight.

@craig-johnston
Copy link
Owner

The built-in function I use indeed ignores editor.wordSeparators. It does however respect the text document's language settings. See microsoft/vscode#8233 for a discussion about this.

If you change the settings for the filetype you are working with, it should work as expected.

@focusaurus
Copy link
Author

I added this clojure-specific setting:

"[clojure]": {
    "editor.defaultFormatter": "pedrorgirardi.vscode-cljfmt",
    "editor.wordSeparators": "`~!@#$%^&*()=+[{]}\\|;:'\",.<>/?"
  },

But selectWord still stops at dashes, even though a mouse double-click selects a full kebab-case-symbol.

If I'm reading the issue 8233 you linked above, they are talking about the language definition itself (the definition of clojure support for example), and they talk about wordPattern which does not seem to be an end-user available setting.

Any other tips for me here? I use select word heavily in my editor flow so this is a real nuisance for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants