Skip to content

Improve lua grammar #140489

@sumneko

Description

@sumneko

The current lua grammar is a little poor, such as:

  1. Many tokens are not catched:
    no-token

  2. Dose not support tokens after Lua 5.2
    old-token

  3. Dose not support EmmyLua, whitch is a type annotation system that has become the de facto standard
    no-luadoc

Since the source project is no longer active (I have created a PR there 3 years ago), I created a new project to provide the grammar file: https://github.com/sumneko/lua.tmbundle/blob/master/Syntaxes/Lua.plist

The effect of the above code after using this grammar file is:
new-syntax

The grammar file has been in my extension for several years and it works fine.
I hope that it can be set as the default lua grammar file of VSCode, so that theme developers can better optimize the color matching for it.

Metadata

Metadata

Labels

feature-requestRequest for new features or functionalitygrammarSyntax highlighting grammarverification-neededVerification of issue is requestedverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions