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

Check if a language has set its own editor.rulers setting and honour that instead. #25

Closed
redactedscribe opened this issue Feb 5, 2017 · 2 comments

Comments

@redactedscribe
Copy link

Rewrap currently checks for the value defined for the editor.rulers user setting to use as the default wrapping column, however in VS Code v1.9.0, it is now possible to define that setting on a per-language basis.

Please make Rewrap honour that setting if it exists for the current editor's language.

Thanks.

@stkb stkb mentioned this issue Feb 8, 2017
stkb added a commit that referenced this issue Feb 8, 2017
@stkb
Copy link
Owner

stkb commented Feb 9, 2017

Have just published v1.2.0 which contains this feature! All settings used by rewrap (rewrap.wrappingColumn, editor.rulers, editor.wrappingColumn and rewrap.doubleSentenceSpacing) can be put in a language section and they will override the global values.

Although I found a way, it isn't really officially supported by vscode for extensions to use/access these language-specific settings yet. So if you one of rewrap's own settings in such a section you'll see a green squiggly under it in the settings.json file. But it will still work.

Another note, a global rewrap.wrappingColumn setting will still override a language-specific editor.rulers setting. So make sure you don't still have a rewrap.wrappingColumn in your settings.json if you're using rulers to determine the wrapping column instead.

@redactedscribe
Copy link
Author

The implementation seems to work as expected, thanks!

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