Closed NJichev closed 1 year ago
Actually one of my tries of opening an elixir file got this on the stderr after closing nvim:
Error executing vim.schedule lua callback: ...vim/lazy/elixir.nvim/lua/elixir/language_server/init.lua:302: Failed to insert line
stack traceback:
[C]: in function 'nvim_buf_set_lines'
...vim/lazy/elixir.nvim/lua/elixir/language_server/init.lua:302: in function 'handler'
...installs/neovim/0.8.2/share/nvim/runtime/lua/vim/lsp.lua:1049: in function ''
vim/_editor.lua: in function <vim/_editor.lua:0>
Actually one of my tries of opening an elixir file got this on the stderr after closing nvim:
Error executing vim.schedule lua callback: ...vim/lazy/elixir.nvim/lua/elixir/language_server/init.lua:302: Failed to insert line stack traceback: [C]: in function 'nvim_buf_set_lines' ...vim/lazy/elixir.nvim/lua/elixir/language_server/init.lua:302: in function 'handler' ...installs/neovim/0.8.2/share/nvim/runtime/lua/vim/lsp.lua:1049: in function '' vim/_editor.lua: in function <vim/_editor.lua:0>
You can ignore this.
This is very strange.
What does :Lazy profile
say for you startup time in general?
Just opening nvim
:
Startuptime: 53.86ms
Based on the actual CPU time of the Neovim process till UIEnter.
This is more accurate than `nvim --startuptime`.
LazyStart 36.73ms
LazyDone 46.57ms (+9.84ms)
UIEnter 53.86ms (+7.29ms)
Opening a random file ending with .ex nvim foo.ex
:
Startuptime: 63.96ms
Based on the actual CPU time of the Neovim process till UIEnter.
This is more accurate than `nvim --startuptime`.
LazyStart 37.98ms
LazyDone 48.26ms (+10.28ms)
UIEnter 63.96ms (+15.7ms)
I had another report from someone who uses LunarVim that after switching to elixir-tools.nvim, opening an elixir file using telescope took 5+ seconds
i still can't reproduce.
I have switched for now to using plain elixir-ls by compiling it manually along with Mason nvim, if you have any ideas for me to debug I can try them out. It's certainly weird what's happening, it could be something completely because of something local or some weird interaction between lazy.nvim and the plugin?
I will try if I can provide a minimized version of my dotfiles and see if it's still happening
A minimal reproduction would be wonderful, if possible.
if your dotfiles are hosted somewhere, I should be able to clone them and using the (new with 0.9) NVIM_APPNAME
to start up a neovim instance using your dotfiles (without affecting my own or conflicting with my own plugins)
Yeah, you can check them out here: https://github.com/NJichev/dotfiles/tree/master/config/nvim
I think I was able to reproduce this with your config.
I think my own setup does the same, but my mental grasp of what 2 seconds feels like was way off haha.
I will investigate what is taking so long once the buffer is entered.
oh duh... it's calling elixir --version
to get your current projects elixir and erlang version. that takes about 400ms on my computer.
I'll try to think of a better method for this.
thanks for the patience @NJichev!
Adding elixir.nvim and then installing elixirls once it asked me to made my config load take 2s+. i.e doing
nvim foo.ex --startuptime output
does this:Now removing elixir.nvim from my config:
Note that Lazy's profiling says that elixir.nvim loads quite fast:
I tried switching between neovim versions
0.8.2
,0.8.3
andstable
in asdf and I get the same results on each.I used the default config for the lazy.nvim plugin manager in the readme: https://github.com/mhanberg/elixir.nvim#lazynvim So what am I doing wrong, I recently started moving my vimscript config to lua so I might be perfectly messing something up 😅
Here’s my nvim config
Edit: I also tried opening a file in a project, i.e
nvim lib/page.ex
for example and get the same behaviour if that's any information.Edit2: I am using the following elixir/erlang versions:
1.14.3-otp-25
/25.3
on a macbook with M1 Pro