Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[lsp4e-dev] Implementing inactive code highlighting

Hi all,

We would like to implement inactive code highlighting (greying out of lines in inactive preprocessor branches) in lsp4e-cpp. The CQuery language server has support for this, but we are trying to figure out how to implement the greying out in the Generic Editor.

The way CDT's C++ editor, which also supports this feature, implements it is by installing a LineBackgroundListener on the editor's StyledText widget. Would it be appropriate for us to do the same thing in the Generic Editor? I ask in part because I'm not sure if manipulating the Generic Editor's StyledText widget is a supported / intended way of interacting with the Generic Editor.

Or should we use the presentation reconciler for this purpose? Or something else? Any suggestions would be appreciated.

Thanks,
Nate

Back to the top