Skip to content

Commit

Permalink
Add instructions for LunarVim installation (#510)
Browse files Browse the repository at this point in the history
* add LunarVim installation instructions

* add instructions to prevent `elixirls` auto-reinstalling
  • Loading branch information
dimitarvp authored Dec 3, 2023
1 parent 4e03af5 commit 2b266ea
Showing 1 changed file with 28 additions and 3 deletions.
31 changes: 28 additions & 3 deletions pages/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,10 @@ INDEXING_ENABLED=true mix package
2. [Vanilla Emacs with eglot](#vanilla-emacs-with-eglot)
3. [Visual Studio Code](#visual-studio-code)
4. [neovim](#neovim)
5. [Vim + ALE](#vim--ale)
6. [Vim + Vim-LSP](#vim--vim-lsp)
7. [Helix](#helix)
5. [LunarVim](#lunarvim)
6. [Vim + ALE](#vim--ale)
7. [Vim + Vim-LSP](#vim--vim-lsp)
8. [Helix](#helix)

### Vanilla Emacs with lsp-mode
The emacs instructions assume you're using `use-package`, which you
Expand Down Expand Up @@ -208,6 +209,30 @@ configuration below as a reference:

If the configuration above doesn't work for you, please try this minimal [neovim configuration](https://github.com/scottming/nvim-mini-for-lexical), It can eliminate other plugin factors.

### LunarVim

[LunarVim](https://www.lunarvim.org) is a neovim configuration package with a lot of goodies built-in, while remaining very configurable.

First, add this to your configuration:

```lua
-- Add `elixirls` to `skipped_servers` list
vim.list_extend(lvim.lsp.automatic_configuration.skipped_servers, { "elixirls" })

-- Remove `lexical` from `skipped_servers` list
lvim.lsp.automatic_configuration.skipped_servers = vim.tbl_filter(function(server)
return server ~= "lexical"
end, lvim.lsp.automatic_configuration.skipped_servers)
```

This is necessary because LunarVim defaults to `elixirls` so we must ignore it first. Otherwise you'll have both `lexical` and `elixirls` running when you open Elixir files.

Remove `elixirls` from the `lvim.lsp.installer.setup.ensure_installed = { ... }` list so it does not get automatically reinstalled.

Optionally run `:LspUninstall elixirls` from within neovim if you don't want to keep `elixirls` around.

Then use the same configuration as the one in the [neovim](#neovim) section.

### Vim + ALE

[ALE](https://github.com/dense-analysis/ale) includes built-in LSP support for Lexical.
Expand Down

0 comments on commit 2b266ea

Please sign in to comment.