We currently use a bunch of options to customize styles of various symbol kinds:
// enable semantic highlight for static member functions
"ccls.highlighting.enabled.staticMemberFunctions": true,
// styles
"ccls.highlighting.bold.staticMemberFunctions": true,
"ccls.highlighting.underline.staticMemberFunctions": true,
"ccls.highlighting.italic.staticMemberFunctions": true,
// similar options for other symbol kinds: memberFunctions, freeStandingFunctions, etc
functiontype and variable are considered basic symbol kinds. Other symbol kinds inherit styles (bold/italic/underline/etc) and colors from basic symbol kinds. For example, the default package.json specifies:
// Mix of function.face and member.face
"ccls.highlight.memberFunction.face": ["function", "member"]
"ccls.highlight.function.face": ["enabled"]
"ccls.highlight.member.face": ["fontStyle: italic"]
// Mix of variable.face and global.face
"ccls.highlight.globalVariable.face": ["variable", "global"]
"ccls.highlight.global.face": ["fontWeight: bolder"]
To fix the colors of some specific symbol kinds (say staticMemberFunction), specify:
We currently use a bunch of options to customize styles of various symbol kinds:
This is tedious. This patch changes it to adopt the approach I used in emacs-ccls.
To enable semantic highlight, add the following lines to
settings.json
:function
type
andvariable
are considered basic symbol kinds. Other symbol kinds inherit styles (bold/italic/underline/etc) and colors from basic symbol kinds. For example, the defaultpackage.json
specifies:To fix the colors of some specific symbol kinds (say
staticMemberFunction
), specify:to override
ccls.highlighting.function.colors
for static member functions.Available symbol kinds: