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

Build System exec command - syntax key #207

Open
keith-hall opened this issue Jun 10, 2016 · 2 comments
Open

Build System exec command - syntax key #207

keith-hall opened this issue Jun 10, 2016 · 2 comments

Comments

@keith-hall
Copy link
Contributor

keith-hall commented Jun 10, 2016

Hi,

Sorry for all the issues, especially if you are tracking your "todo" list elsewhere and I'm potentially duplicating things, but I want to make sure everything is covered ;)

At http://docs.sublimetext.info/en/latest/reference/build_systems/exec.html, it mentions the syntax key, with the text Optional. If provided, it will be used to colorize the build system’s output.

I think it would be useful to mention that it accepts values like scope:source.js as well as a path to the syntax definition file Packages/JavaScript/JSON.sublime-syntax, and its default as per https://forum.sublimetext.com/t/new-build-system-syntax-option/14953/2

Thanks :)

@keith-hall keith-hall changed the title Build System exec command - settings Build System exec command - syntax key Jun 10, 2016
@FichteFoll
Copy link
Collaborator

FichteFoll commented Jun 10, 2016

Oh, that's news to me. I didn't know view.assign_syntax could do that. On the other hand, the status bar display of the currently selected syntax becomes a little ... cryptic in that it shows scope:source.

Not sure where I would mention this though. If we had a proper and linked API documentation, I'd link to the underlying API instead for the details, but we don't have that atm. For now, I think this information is negligible.

@keith-hall
Copy link
Contributor Author

keith-hall commented Jun 10, 2016

On the other hand, the status bar display of the currently selected syntax becomes a little ... cryptic in that it shows scope:source

yeah, looks like an ST3 bug to me, but it is a non-issue when dealing with output panels (i.e. build results) because only the syntax of the view shows up in the status bar, not the syntax of the panel.

Not sure where I would mention this though. If we had a proper and linked API documentation, I'd link to the underlying API instead for the details, but we don't have that atm.

That would indeed be awesome :)

For now, I think this information is negligible.

fair enough :) I do think however, that finding, from the documentation, that it is possible to assign a syntax to the build results, isn't easy enough though. but I guess that is a separate issue ;)


but yes, after further investigation, I agree - in it's current state, I don't think it's worth documenting the "scope:" ability of view.assign_syntax, because it literally sets the view's syntax setting to that exact string, so one can't tell what syntax definition file is active from view.settings().get('syntax') anymore.
I will log an issue at the ST3 core issues repo for it when I get chance.

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