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

Use the grammar's definition of nonWordCharacters #189

Merged

Conversation

Arcanemagus
Copy link
Contributor

Unify all retrieval of the list of nonWordCharacters into a single function, and always pass a TextEditor and Point to this function, allowing it to use that point to get a ScopeDescriptor in order to get the list of nonWordCharacters specific to the language(s) at that scope.

Note:
The specs needed to be changed here as language-php doesn't include $ in the list of nonWordCharacters, so once this is implemented if you only select test from $test it will no longer be highlighted if the whole word selection option is enabled.

> atom.config.get('editor.nonWordCharacters')
"/\()"':,.;<>~!@#$%^&*|+=[]{}`?-…"
atom.config.get('editor.nonWordCharacters', {scope: ['text.html.php']})
"/\()"':,.;<>~!@#%^&*|+=[]{}`?-"

Fixes #183.

Unify all retrieval of the list of nonWordCharacters into a single 
function, and always pass a TextEditor and Point to this function, 
allowing it to use that point to get a ScopeDescriptor in order to get 
the list of nonWordCharacters specific to the language(s) at that scope.
@richrace richrace merged commit ded1f2a into Pulsar-Edit-Highlights:master Mar 17, 2019
@Arcanemagus Arcanemagus deleted the grammar-nonWordCharacters branch March 18, 2019 18:13
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

Successfully merging this pull request may close these issues.

2 participants