Skip to content

Commit ce0cdf8

Browse files
authored
feat: added custom styling for preprocessor macros
Styles such as bold and italic can be defined for preprocessor macros. Updated the default syntax group mapping, boilerplate config, and docs to reflect these changes. Note: make docgen was not working for me so I manually updated the documentation myself. Please advise if changes are needed.
1 parent e352a32 commit ce0cdf8

File tree

4 files changed

+4
-1
lines changed

4 files changed

+4
-1
lines changed

doc/nightfox.txt

+1
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@ options.styles {table} `styles` is a table that contains a list
266266
- keywords
267267
- numbers
268268
- operators
269+
- preprocs
269270
- strings
270271
- types
271272
- variables

lua/nightfox/config.lua

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ local defaults = {
2727
keywords = "NONE",
2828
numbers = "NONE",
2929
operators = "NONE",
30+
preprocs = "NONE",
3031
strings = "NONE",
3132
types = "NONE",
3233
variables = "NONE",

lua/nightfox/group/syntax.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function M.get(spec, config)
2727
Keyword = { fg = syn.keyword, style = stl.keywords }, -- any other keyword
2828
Exception = { link = "Keyword" }, -- try, catch, throw
2929

30-
PreProc = { fg = syn.preproc }, -- (preferred) generic Preprocessor
30+
PreProc = { fg = syn.preproc, style = stl.preprocs }, -- (preferred) generic Preprocessor
3131
Include = { link = "PreProc" }, -- preprocessor #include
3232
Define = { link = "PreProc" }, -- preprocessor #define
3333
Macro = { link = "PreProc" }, -- same as Define

usage.md

+1
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ combination of |highlight-args|. The list of syntax components are:
208208
- keywords
209209
- numbers
210210
- operators
211+
- preprocs
211212
- strings
212213
- types
213214
- variables

0 commit comments

Comments
 (0)