NSIS icon indicating copy to clipboard operation
NSIS copied to clipboard

Improve block highlighting

Open idleberg opened this issue 6 years ago • 0 comments

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.

idleberg avatar Sep 05 '19 21:09 idleberg