Skip to content

Syntax highlighting changed after update to 3.16.2 #3318

Open

Description

@csaar95

How are you using the lua-language-server?

Visual Studio Code Extension (sumneko.lua)

Which OS are you using?

MacOS

What is the issue affecting?

Other

Expected Behaviour

Image

Actual Behaviour

Image

Reproduction steps

  1. Open Lua file.
  2. Define e. g. a lua table with functions inside.

Additional Notes

No response

Log File

No response

Activity

  1. csaar95 commented on Dec 18, 2025

    @csaar95
    Author

    I currently switched back to 3.16.1. Is this behavior intentional?

  2. johannesrld commented on Dec 20, 2025

    @johannesrld

    That is not correct syntax, you need three --- for the language server to properly interpret ---@params.

  3. tomlau10 commented on Dec 21, 2025

    @tomlau10
    Contributor

    I just did a little testing, and I found that the highlight in your Expected Behaviour is done by vscode itself, not LuaLS. 😕
    When I disable LuaLS, the highlight becomes the one in Expected Behaviour.

    While @johannesrld is true that those @param annotation should be prefixed with triple dash --- to work with LuaLS 👍
    but if you prefer the highlight in your Expected Behaviour, you can set the semantic.enable config to false:

    => this disables LuaLS's own syntax highlight, and use the default highlighting of vscode 🤔

  4. csaar95 commented on Dec 31, 2025

    @csaar95
    Author

    @tomlau10 @johannesrld

    The problem is not the behavior of the comments, but that functions within objects can no longer be distinguished from normal table fields.

  5. csaar95 commented on Jan 16, 2026

    @csaar95
    Author

    In addition, it seems to be a problem with CPU usage again in one of the newer versions (permanently at 100% with version 3.16.4).

    In this case running as vscode server on Rocky Linux 8.10.

  6. CppCXY commented on Jan 16, 2026

    @CppCXY
    Member

    The performance of luals itself can't really be considered very good. Moreover, many community-contributed patches haven't given careful thought to performance, and this situation is likely to persist for a long time.

    Regarding your original question, I think it’s related to semantic tokens — it’s possible that some updates caused ordinary comments to be assigned semantic tokens.

  7. iamqiz commented on Jun 13, 2026

    @iamqiz

    i encounter this issue in QT creator with lua language server,
    following settings from @tomlau10 , i add "semantic.enable":false in .luarc.json, the issue gone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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