Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[PREVIEW] a new lua language server #3017

Open
CppCXY opened this issue Dec 31, 2024 · 14 comments
Open

[PREVIEW] a new lua language server #3017

CppCXY opened this issue Dec 31, 2024 · 14 comments
Labels

Comments

@CppCXY
Copy link
Collaborator

CppCXY commented Dec 31, 2024

This language server has excellent performance and rich features, and it’s compatible with most of luals’ features. If you’re interested, feel free to give it a try.

language server: https://github.com/CppCXY/emmylua-analyzer-rust
vscode plugin: https://marketplace.visualstudio.com/items?itemName=tangzx.emmylua

@Mc-GrowlR
Copy link
Contributor

Can I export the document now?

@CppCXY
Copy link
Collaborator Author

CppCXY commented Jan 1, 2025

Can I export the document now?

Exporting documentation is actually not the job of the language server, but I also agree that there is no good tool for exporting documentation that supports luacats well. The documentation export function of luals itself is not very effective and not highly usable. I might consider adding a standalone CLI for documentation export in the future, but not now.

@CppCXY
Copy link
Collaborator Author

CppCXY commented Jan 1, 2025

The release was too rushed yesterday, and I didn't provide a detailed description of the features. However, I plan to describe its features once I am almost done (in about ten days).

@Mc-GrowlR
Copy link
Contributor

Can I export the document now?我现在可以导出文档吗?

Exporting documentation is actually not the job of the language server, but I also agree that there is no good tool for exporting documentation that supports luacats well. The documentation export function of luals itself is not very effective and not highly usable. I might consider adding a standalone CLI for documentation export in the future, but not now.导出文档实际上不是语言服务器的工作,但我也同意没有一个好的工具可以很好地支持 luacats 来导出文档。luals 本身的文档导出功能不是很有效,也不是很好用。我可能会考虑在未来添加一个独立的 CLI 来导出文档,但现在不会。
Agreed, this is indeed the case with exporting documents, and I would like to have a good tool for exporting documents. I look at the last dozens of issues, and the proportion of issues about exporting documents is also quite a lot, and it seems that everyone has a great demand for this feature.

@Mc-GrowlR
Copy link
Contributor

Regarding the purpose of exporting documents, I feel that I can use the JSON documents exported from the document to convert the Lua library files annotated with Luacats into library files in various Lua dialects in batches, so that we can quickly share various Lua ecological components in various Lua dialects.

@CppCXY
Copy link
Collaborator Author

CppCXY commented Jan 1, 2025

Regarding the purpose of exporting documents, I feel that I can use the JSON documents exported from the document to convert the Lua library files annotated with Luacats into library files in various Lua dialects in batches, so that we can quickly share various Lua ecological components in various Lua dialects.

If it's just for this purpose, all you need is a parser and simple analysis to achieve your goal, and I have already provided such a parser.

@Mc-GrowlR
Copy link
Contributor

What kind of form is it? Can I get the results of my analysis?

@CppCXY
Copy link
Collaborator Author

CppCXY commented Jan 2, 2025

What kind of form is it? Can I get the results of my analysis?

a rust lib, I described this library in a previous issue, and it supports both strongly-typed APIs and simple APIs. Additionally, they can be converted freely between each other.

@CppCXY
Copy link
Collaborator Author

CppCXY commented Jan 10, 2025

The current language server and plugin have been released. If you're interested, you can give them a try. My next step is to plan the design of export documentation.

@Mc-GrowlR
Copy link
Contributor

The current language server and plugin have been released. If you're interested, you can give them a try. My next step is to plan the design of export documentation.当前的语言服务器和插件已经发布。如果您感兴趣,可以尝试使用。我的下一步是规划导出文档的设计。

Ok。thanks

@ParadiseFallen
Copy link

can it run in wasm for mocano?

@CppCXY
Copy link
Collaborator Author

CppCXY commented Jan 30, 2025

can it run in wasm for mocano?

I'm unsure if WASM supports asynchronous operations, and my codebase is fully asynchronous. Additionally, the file system poses another issue—I don't know how to load the workspace in the WebIDE. Perhaps a dedicated crate needs to be written to support the WASM runtime. On another note, since the language server itself supports TCP connections, that might be a viable solution.

@tomlau10
Copy link
Contributor

我嘗試在 macbook 上安裝 vscode plugin tangzx.emmylua,但好像遇到 server start error

dyld: Symbol not found: __ZTTNSt3__118basic_stringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEE
  Referenced from: /Users/tomlau10/.vscode/extensions/tangzx.emmylua-0.9.13-darwin-x64/server/emmylua_ls
  Expected in: /usr/lib/libc++.1.dylib
 in /Users/tomlau10/.vscode/extensions/tangzx.emmylua-0.9.13-darwin-x64/server/emmylua_ls
[Error - 11:35:29 AM] Server process exited with signal SIGABRT.
[Error - 11:35:29 AM] Server initialization failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 

因特殊原因我 macos 是停留在 11.6
是不是太舊了所以 prebuilt binary 不支持。。。
我只能手動 build 嗎? @CppCXY

@CppCXY
Copy link
Collaborator Author

CppCXY commented Feb 21, 2025

我嘗試在 macbook 上安裝 vscode plugin tangzx.emmylua,但好像遇到 server start error

dyld: Symbol not found: __ZTTNSt3__118basic_stringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEE
  Referenced from: /Users/tomlau10/.vscode/extensions/tangzx.emmylua-0.9.13-darwin-x64/server/emmylua_ls
  Expected in: /usr/lib/libc++.1.dylib
 in /Users/tomlau10/.vscode/extensions/tangzx.emmylua-0.9.13-darwin-x64/server/emmylua_ls
[Error - 11:35:29 AM] Server process exited with signal SIGABRT.
[Error - 11:35:29 AM] Server initialization failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 

因特殊原因我 macos 是停留在 11.6 是不是太舊了所以 prebuilt binary 不支持。。。 我只能手動 build 嗎? @CppCXY

我不清楚github有没有提供低版本的mac, 有的话你可以试试, 或者你可以在拥有rust工具链后, 一键编译

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants