Skip to content

lexer type high lighting in c #532

Closed Answered by orbitalquark
YahYahDev asked this question in Q&A
Discussion options

You must be logged in to vote

You can put something like the following in your ~/.textadept/init.lua to add to the list of types in the C lexer:

events.connect(events.LEXER_LOADED, function(name)
	if name == 'ansi_c' then buffer.lexer:set_word_list(lexer.TYPE, {'foo', 'bar', 'baz'}, true) end
end)

buffer.lexer is not documented, but lexer:set_word_list() is (https://orbitalquark.github.io/textadept/api.html#lexer.set_word_list).

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
4 replies
@YahYahDev
Comment options

@orbitalquark
Comment options

Answer selected by YahYahDev
@YahYahDev
Comment options

@YahYahDev
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants