Skip to content

Getting very slow neovim startup time after using elixir.nvim #59

Closed
@NJichev

Description

@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:

times in msec
 clock   self+sourced   self:  sourced script
 clock   elapsed:              other lines

000.007  000.007: --- NVIM STARTING ---
...(truncated)
1989.936  1916.747: opening buffers.  <---- line in question
2009.648  019.712: BufEnter autocommands
2009.650  000.003: editing files in windows
2009.777  000.126: VimEnter autocommands
2009.801  000.024: UIEnter autocommands
2009.803  000.002: before starting main loop
2119.209  109.407: first screen update
2119.212  000.002: --- NVIM STARTED ---

Now removing elixir.nvim from my config:

...(truncated)
190.560  122.877: opening buffers
190.614  000.054: BufEnter autocommands
190.616  000.002: editing files in windows
190.702  000.086: VimEnter autocommands
190.739  000.037: UIEnter autocommands
190.959  000.100  000.100: sourcing /Users/njichev/.asdf/installs/neovim/0.8.2/share/nvim/runtime/autoload/provider/clipboard.vim
190.964  000.126: before starting main loop
283.900  092.936: first screen update
283.904  000.003: --- NVIM STARTED ---

Note that Lazy's profiling says that elixir.nvim loads quite fast:

    ●   elixir 7.26ms
      ➜   elixir.nvim 5.96ms
        ★   plenary.nvim 0.35ms
          ‒   plenary.nvim/plugin/plenary.vim 0.06ms

I tried switching between neovim versions 0.8.2, 0.8.3 and stable 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions