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 scope instead of grammar name #764

Closed
timkelty opened this issue Jan 20, 2016 · 6 comments
Closed

Use scope instead of grammar name #764

timkelty opened this issue Jan 20, 2016 · 6 comments
Assignees

Comments

@timkelty
Copy link

Using editor.getGrammar().name requires there to be a specific beautifier for the current grammar. This is unfortunate because of how scope extension and nesting works.

Consider a templating language, e.g. "Smarty". Ideally I should be able to beautify as HTML in this grammar, as the scopeName is text.html.smarty. However, since you're only using the grammar name, I have to switch grammars to be able to beautify.

Related/Similar issue: emmetio/emmet-atom#376

@timkelty
Copy link
Author

@timkelty
Copy link
Author

Thanks!

@timkelty
Copy link
Author

It seems that perhaps editor.scopeDescriptorForBufferPosition().getScopesArray() is the right method here to use, actually: emmetio/emmet-atom#376 (comment)

@timkelty timkelty changed the title Use editor.getGrammar().scopeName instead of editor.getGrammar().name Use scope instead of grammar Jan 21, 2016
@timkelty timkelty changed the title Use scope instead of grammar Use scope instead of grammar name Jan 21, 2016
@Glavin001
Copy link
Owner

I'd love to see a Pull Request implementing something in this direction! Major changes are happening for #1174 and if this is the right direction then I would want this improvement to be in the next major release! Thanks in advance.

@stale
Copy link

stale bot commented Nov 4, 2017

This issue has been automatically marked as stale because it has not had recent activity. If this is still an issue, please add a comment. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Nov 4, 2017
@stale stale bot closed this as completed Nov 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants