Skip to content

Add EmmyLua_LS support - #60

Open
notpeter wants to merge 1 commit into
zed-extensions:mainfrom
notpeter:emmylua_ls
Open

Add EmmyLua_LS support#60
notpeter wants to merge 1 commit into
zed-extensions:mainfrom
notpeter:emmylua_ls

Conversation

@notpeter

Copy link
Copy Markdown
Contributor

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.

  • Add support for emmylua_ls in addition to lua-language-server
  • Support config specified binary/args/env; PATH found binary with worktree.which; Zed auto-download from GitHub releases (both LSPs)
  • Keep managed downloads isolated by language server
  • Preserve server-provided metadata in custom completion labels. Previously, custom labels omitted signatures, inferred types, and source descriptions.
  • Handle PROPERTY completions same as existing FIELD completions (both LSPs)
  • Highlight symbols by LSP kind without parsing their labels
  • Improve README.md with advanced configuration examples and links

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):

    "Lua": {
     "language_servers": ["lua-language-server", "!emmylua_ls", "..."],
    },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant