LuaLS / lua.tmbundle

TextMate support for Lua
MIT License
7 stars 5 forks source link

函数名写在前边时,不能语法高亮 #4

Closed Richard-Cat closed 1 year ago

Richard-Cat commented 2 years ago

image

sumneko commented 2 years ago

语法解析没法判断出你赋值的是一个函数,所以只能把这个函数名当做全局变量来着色。 你需要的是语义着色功能,这个是由语言服务提供的。

Richard-Cat commented 2 years ago

最近研究了下lua.tmLanguage.json,稍作修改,实现了函数名写在function前边时也着色

Richard-Cat commented 2 years ago

lua.tmLanguage.json.txt

sumneko commented 2 years ago

你可以提个PR

sumneko commented 1 year ago

Fixed by #6