-1

For build systems, make it possible to use exact scope only rather than include partial matches

Alan Andersen 6 years ago • updated by Jon Skinner 6 years ago 3
For example, I have two build systems, one for JSP's and one for .java files. I have my current build system set to automatic. My Java build system has a scope of source.java, and my JSP build system has a scope of text.html.jsp. In some areas in the JSP, it selects the java build system, and in other areas it selects the JSP build system. I realized this is because inside of scriptlets it counts as "source.java.embedded.html text.html.jsp" (hit ctrl-shift-alt-p for those who dont know, shows up in status bar), and since the source.java comes first, the java build system picks on up it. Clicking outside of scriptlets and hitting build chooses the correct one.

Could you add another option such as "use_exact_scope: true" or such so that a particular build system will only use the same scope specified?
You should be able to get the same thing by changing the scope on the java build system to "source.java - source.java.embedded"
That made it much better. There's weird cases where on some lines in the JSP the scope is "source.java.embedded.html html.text.jsp" instead of just "html.text.jsp" and so it picks up the java one then, I haven't been able to reliably duplicate when it happens, but it does seem to happen most often if the code is a scriptlet all on the same line (not the expression evaluation kind <%= %>) and my cursor is inside a if statement, but not always. Thanks for the help though Jon, this is certainly livable.

If the previous selector isn't reliable for every part of the file, then you may want to be more explicit, and change it to something like "source.java - text.html.jsp"