From 89c85093ee083820882caa73322f71c1806f4cb8 Mon Sep 17 00:00:00 2001 From: Adam Olsen Date: Fri, 27 Dec 2024 13:37:44 -0700 Subject: [PATCH] feat: add refactorex [RefactorEx](https://github.com/gp-pereira/refactorex) is an LSP server that allows for refactoring Elixir code. It adds the ability to rename symbols via `vim.lsp.buf.rename()` and various code actions. Tested with the following code: ```lua require("lspconfig.configs").refactorex = { default_config = { cmd = { vim.fn.stdpath("data") .. "/mason/bin/refactorex", "--stdio" }, filetypes = { "elixir" }, root_dir = function(fname) return require("lspconfig").util.root_pattern("mix.exs")(fname) end, settings = {}, capabilities = { textDocumentSync = { openClose = true, change = 1, save = { includeText = true }, }, codeActionProvider = { resolveProvider = true, }, renameProvider = { prepareProvider = true, }, }, }, } require("lspconfig").refactorex.setup({}) ``` Originally I had the build section like this: ```yaml source: # renovate:datasource=github-tags id: pkg:github/gp-pereira/refactorex@0.1.29 build: run: | mix deps.get mix compile ``` However, it would never run `mix compile`, that step was always just skipped. Not sure why. --- packages/refactorex/package.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 packages/refactorex/package.yaml diff --git a/packages/refactorex/package.yaml b/packages/refactorex/package.yaml new file mode 100644 index 0000000000..984dbbdf39 --- /dev/null +++ b/packages/refactorex/package.yaml @@ -0,0 +1,19 @@ +--- +name: refactorex +description: Language server allowing for refactoring Elixir code +homepage: https://github.com/gp-pereira/refactorex +licenses: + - MIT +languages: + - Elixir +categories: + - LSP + +source: + # renovate:datasource=github-tags + id: pkg:github/gp-pereira/refactorex@0.1.29 + build: + run: mix do deps.get, compile + +bin: + refactorex: exec:bin/start