Conversation
|
Meh. Closed in favor of a competing extension: EmmyLuaLs/Zed-EmmyLua, search extensions for Personally I'd suggest this official Zed Lua extension adopt EmmyLuaLS as the default. That extension also include DAP debug support. I'd relegate lua-language-server to 2nd tier (no-default) status. But shrug I'm no longer a Zed maintainer. |
|
@notpeter Somewhat out of topic for this PR but since you're recommending EmmyLua over LuaLS, I'm curious about your experience with EmmyLua's new internal formatter, that has replaced EmmyLuaCodeStyle since around May I believe. I gave EmmyLua a serious try some months ago but found the new formatter too intrusive for my taste (no "preserve" setting for tables and functions) and not as stable as EmmyLuaCodeStyle (with the "auto" settings it could get stuck in a state where each consecutive save would alternate between expanding/collapsing some function calls), so I just made a mental note to check back again once it would have matured more and moved back to LuaLS. |
|
TBH I'm not writing a whole lot of Lua these days so I haven't used it extensively. If you have a test-case which does not result in stable formatting I would absolutely file that upstream. EmmyLuaCodeStyle also has some cases which don't have stable formatting: If you have an alternate formatter you prefer to use in Zed, you can just set |
Add support for emmylua_ls using the same pattern as the Zed Ruby extension to support multiple LSPs (distinct IDs, settings, paths, etc). Only LuaLS will be enabled by default. While making these changes I also improved LSP Symbol and Completion handling for both the existing and new language servers.
emmylua_lsin addition tolua-language-serverworktree.which; Zed auto-download from GitHub releases (both LSPs)FIELDcompletions (both LSPs)Prior to shipping an extension in the Zed extension store with this code, a companion PR to the Zed repo with new default settings is needed so Zed will automatically prefer LuaLS and disable EmmyLuaLS by default (merge, cherry-pick to preview; wait a week to minimize impact):