EmmyLua / VSCode-EmmyLua

Lua IDE/Debugger Plugin for VSCode
632 stars 89 forks source link

New Language Server #142

Open CppCXY opened 5 months ago

CppCXY commented 5 months ago

可能四月份新的语言服务器会上线, 到时候java版本的语言服务会和C#写的语言服务共存, 可选其一开启. 版本号将升级到0.6, 在经过1到2个月的BUG修复期版本会升级到0.7, 此时会移除java版本的语言服务. 再经过一段时间的稳定, vscode-emmylua版本号将升级到1.0 新语言服务的地址: https://github.com/CppCXY/EmmyLuaAnalyzer

CppCXY commented 5 months ago

当前依赖dotnet 8, 需要所在电脑安装对应环境. 目前已知问题:

  1. 没有解析lua标准库
  2. 解析 { x: number } 的形式的类型错误
  3. 当前文件的全局变量没有补全
  4. 标准库不可扩展类可以被随意扩展
  5. 重命名处理错误
  6. 文件删除后, 语言服务上仍然存在
  7. while循环中两个break会引发报错
notpeter commented 4 months ago

I installed the dotnet 8.0 package for MacOS x64, put "emmylua.new.languageServer": true, and reloaded my vscode window and it appears to work with in a trivial file (local annotation parsing, completions, Lua standard library docs, etc).

When I try to open this file: stub.lua I get nothing and see no error message. Works with the old, not with the new. Is there a log file somewhere or a debug/verbose mode I can enable?

Bonus bug: clicking "EmmyLua" to the left of the status bar results in a command 'emmy.stopServer' not found error.

CppCXY commented 4 months ago

I installed the dotnet 8.0 package for MacOS x64, put "emmylua.new.languageServer": true, and reloaded my vscode window and it appears to work with in a trivial file (local annotation parsing, completions, Lua standard library docs, etc).

When I try to open this file: stub.lua I get nothing and see no error message. Works with the old, not with the new. Is there a log file somewhere or a debug/verbose mode I can enable?

Bonus bug: clicking "EmmyLua" to the left of the status bar results in a command 'emmy.stopServer' not found error.

By default, it will ignore parsing files larger than 200kb. If you want to set this limit, you can create an. emmyrc.json file in the root directory and set a preloaded file size limit. You can check the changelog to know the configuration format

notpeter commented 4 months ago

By default, it will ignore parsing files larger than 200kb. If you want to set this limit, you can create an. emmyrc.json file in the root directory and set a preloaded file size limit. You can check the changelog to know the configuration format

Perfect. Here's the example .emmyrc.json from the changelog. Adding {"workspace": {"preloadFileSize": 5120000}} totally worked.

Reading that changelog it's clear you've made amazing recent progress improving annotation support. Congrats! Given that this is a work in progress, what sort of feedback are you looking for today. Should I open issues for incomplete functionality I notice (e.g. ...?) or would you prefer I wait a little while until things are more fleshed out. Thanks

CppCXY commented 4 months ago

The current Labor Day holiday in China is from May 1st to 5th. You can submit an issue on the emmyluaanalyzer project to experience it, and I will handle it after the holiday ends