Skip to content

Requesting for a feature adjustment: no semantic highlighting on comments #3124

@drcxd

Description

@drcxd

Currently lua ls provides semantic token highlighting to comments, this will override other font modifications applied on comments.

Could lua ls just leave comments and does not provide any semantic token highlighting information to the client?

For example, I am using lua ls with lsp-mode in Emacs:

Image

and Emacs reports that the characters in TODO has the text property lsp-face-semhl-comment, which I believe is informed by the server.

Here is another example with clangd + lsp-mode in Emacs:

Image

The face (an Emacs jargon, basically means how a character is displayed, its color, font, is it bold? italic? etc..) of TODO is applied by another package that identifies certain pattern in comments and change thier appearance. It seems that clangd does not provide any semantic token highlighting information for comments, and I hope lua ls may also adapt this pattern.

My point is that most editors can identify comments without the help of language server correctly and have applied corresponding highlighting for them. Inforcing the highlighting by a language server is not wrong but feels unnecessary to me and also, in this case, this prevents other packages on the editor from further processing the comments.

What do you think about this suggestion?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions