SublimeText / NSIS

Sublime Text plugin for the Nullsoft Scriptable Install System
Apache License 2.0
40 stars 15 forks source link

Improve block highlighting #37

Open idleberg opened 5 years ago

idleberg commented 5 years ago

In my opinion, the highlighting of blocks (Section/SectionEnd, Function/FunctionEnd, PageEx/PageExEnd) should be adjusted to match that other languages. Specifically, the mentioned commands to open/close a block should be highlighted as other.keyword.nsis, while their names should be entity.name.function.nsis.

Adjusting Section is fairly complex, since there many cases to consider, e.g. optional quotes around the name, optional parameters, special prefixes and section indices.

Section NameOfSection
SectionEnd

Section "Name of Section with Spaces"
SectionEnd

Section -hiddenSection
SectionEnd

Section "-hidden section"
SectionEnd

Section # hidden section
SectionEnd

Section !boldSection
SectionEnd

Section "!bold section"
SectionEnd

Section /o "optional section"
SectionEnd

Section "section with named index" SECTION_INDEX
SectionEnd

All PRs to improve block highlighting are appreciated.