The positive lookbehind states that the colon should be preceded by a whitespace, (, [ or a [ character. Obviously neither of those precede the colon when the keyword is at the beginning of a line. Adding the word boundary anchor (\b) to the possible characters would fix it, however the regex engine cannot handle variable-length lookbehinds.
Description
^ Title.
Steps to Reproduce
Type any keyword at the beginning of a line.
Expected behavior: [What you expect to happen]
Keyword hightlighted as a keyword (
constant.keyword.clojure
)Actual behavior: [What actually happens]
Keyword is not highlighted as a keyword.
Reproduces how often: [What percentage of the time does it reproduce?]
Always.
Versions
Any version.
Additional Information
Relevant regex:
'(?<=(\\s|\\(|\\[|\\{)):[a-zA-Z0-9\\#\\.\\-\\_\\:\\+\\=\\>\\<\\/\\!\\?\\*]+(?=(\\s|\\)|\\]|\\}|\\,))'
The positive lookbehind states that the colon should be preceded by a whitespace,
(
,[
or a[
character. Obviously neither of those precede the colon when the keyword is at the beginning of a line. Adding the word boundary anchor (\b
) to the possible characters would fix it, however the regex engine cannot handle variable-length lookbehinds.