lexer type high lighting in c #532
-
the default configuration for the ansi_c lexer seems to not highlight user made types does any one know a way i could achieve that behavior? only way i can think of is some how appending the word list for types and adding user made types to it any ideas/input would be much appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
The lexer does not keep track of user-defined types, unfortunately. While you could have user-defined keyword lists in Textadept, there is no documented way to do so, and you'd typically only set the list once when the lexer is loaded, and not update it as the user edits the file. Let me know if you'd like some documentation for this and I'll put it on my TODO list. |
Beta Was this translation helpful? Give feedback.
-
made a module to highlight typedefs in a project with ctags |
Beta Was this translation helpful? Give feedback.
You can put something like the following in your ~/.textadept/init.lua to add to the list of types in the C lexer:
buffer.lexer
is not documented, butlexer:set_word_list()
is (https://orbitalquark.github.io/textadept/api.html#lexer.set_word_list).