Skip to content

Provide additional language server support for Elixir #4732

@scottming

Description

@scottming

Check for existing issues

  • Completed

Language

elixir

Tree Sitter parser link

https://github.com/elixir-lang/tree-sitter-elixir

Language server link

https://github.com/lexical-lsp/lexical

Misc notes

Hello Zed team,

I have tried out Zed and found that it opens quickly and provides a great user experience.

I want to suggest adding an option for custom LS. As a committer of Lexical, I mainly use it for developing Elixir projects. It is speedy and has many unique features, such as Real-time diagnostics support, Context-aware code completion, Consistent and Stable Formatting, etc.

Welcome to check out our README and see our design philosophy.

FYI, for neovim config, I just need to:

local lspconfig = require("lspconfig")
local configs = require("lspconfig.configs")

local M = {
	filetypes = { "elixir", "eelixir", "heex", "surface" },
	cmd = { "/Users/scottming/Code/lexical/_build/dev/rel/lexical/start_lexical.sh" },
	settings = {},
}

function M.load_lexical()
	if not configs.lexical then
		configs.lexical = {
			default_config = {
				filetypes = M.filetypes,
				root_dir = function(fname)
					local project = lspconfig.util.root_pattern(".git")(fname)
					return lspconfig.util.root_pattern("mix.exs", ".git")(fname) or vim.loop.os_homedir()
				end,
			},
		}
	end
end

return M

Metadata

Metadata

Assignees

No one assigned

    Labels

    elixirElixir programming language supportfeature[core label]languageAn umbrella label for all programming languages syntax behaviorspotential extensionFunctionality that could be implemented as an extension (consider moving to community extensions)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions