elixir-tools / elixir-tools.nvim

Neovim plugin for Elixir
MIT License
413 stars 31 forks source link

:LspInfo results in vim errors #202

Closed coop closed 7 months ago

coop commented 7 months ago

When enabling nextls I see the following error in vim when running :LspInfo:

image

If I disable nextls and use elixirls :LspInfo works no problems.

I'm using lunarvim and this is my config:

lvim.plugins = {
  {
    "vim-test/vim-test",
    config = function()
      vim.g["test#strategy"] = "kitty"
    end,
  },
  { "duggiefresh/vim-easydir" },
  { "tpope/vim-eunuch" },
  {
    "elixir-tools/elixir-tools.nvim",
    version = "*",
    event = { "BufReadPre", "BufNewFile" },
    config = function()
      local elixir = require("elixir")

      elixir.setup {
        nextls = {
          enable = true,
          spitfire = true,
          version = "0.18.0",
          init_options = {
            experimental = {
              completions = {
                enable = true, -- control if completions are enabled. defaults to false
              },
            },
          },
        },
        elixirls = {
          enable = false,
          settings = {
            enableTestLenses = true,
          },
        },
        credo = {
          enable = false,
        },
      }
    end,
    dependencies = {
      "nvim-lua/plenary.nvim",
    },
  },
}
mhanberg commented 7 months ago

You might try updating your plugins. I’m not sure that stacktrace lines up with what is current in lsp config.

Also works on my machine

coop commented 7 months ago

I've done that dance and everything says it is up to date. I've also killed lunarvim, reinstalled and have the same problem with the same stacktrace. It's likely an issue with my setup but definitely related to nextls as disabling nextls :LspInfo works. I will try investigating.

mhanberg commented 7 months ago

I installed lunarvim and was able to replicate, will dig into it

mhanberg commented 7 months ago

CleanShot 2024-02-27 at 22 40 01@2x lspconfig is not up to date, not exactly sure why. might be related to mason

mhanberg commented 7 months ago

aright, you need to start lunarvim with LVIM_DEV_MODE=1 lvim for it to allow you to update its "core plugins"

once i did that, it updated a ton of plugins and then it works

coop commented 7 months ago

I'm sure this is a my problem but I did LVIM_DEV_MODE=1 lvim, updated plugins and now I have no syntax highlighting and none of the language servers are running. Probably should have debugged this after work.

image
mhanberg commented 7 months ago

You might need to reinstall the treesitter parsers.

What's weird i had no highlighting and tons of treesitter errors until I updated all the plugins.

It was probably using my existing parsers from my normal nvim install.