HTML pair tag highlighting #80
Replies: 1 comment 1 reply
-
Unfortunately there is not an option for this. You would have to write the feature yourself, and it wouldn't be a lexer feature. From your *~/.textadept/init.lua* you'd probably connect to `events.UPDATE_UI`, check for a `buffer.UPDATE_SELECTION` update, then check to see if `buffer:name_of_style(buffer.style_at[buffer.current_pos])` is one of the HTML tag styles you want to match. If so, you'll have to figure out whether or not it is an end tag or start tag, search for the compliment, then mark it with an indicator. https://github.com/orbitalquark/textadept/blob/cd17224d42a019dc54e33b0ec787242165fcf90e/modules/textadept/editing.lua#L187 has a similar example for highlighting instances of the current word under the caret.
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
ansel-hub
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
Does Textadept support html pair tag highlighting? If so, what should I put in the init.lua please? Or should I modify the html lexer? I couldn't find that in the manual, sorry if I overlooked it.
Thank you
Beta Was this translation helpful? Give feedback.
All reactions