跳到主要内容
版本:1.2

Installation

General

  1. Make sure to check that you have a recent Neovim version with luajit support. The output of version information nvim -v should include a line for: LuaJIT.
  2. Make sure all the dependencies listed in Manual Install are actually installed on your system.

Unable to run lvim

Make sure that lvim is available and executable on your path. You can check the results of these commands to verify that

which lvim
stat "$(which lvim)"
cat "$(which lvim)"

If you get errors with any of the above commands, then you need to either fix that manually or reinstall the binary again.

cd <lunarvim-repo> # this will be in `~/.local/share/lunarvim/lvim` by default
bash utils/installer/install_bin.sh

Getting errors after an update

Cache issues

This might be the result of old cache files that need to be reset. LunarVim makes use of impatient's to optimize the startup procedure and deliver a snappy experience.

  1. while running LunarVim: :LvimCacheReset
  2. from the CLI: lvim +LvimCacheReset

Plugin issue

Another common reason for such errors is due to Packer being unable to fully restore a snapshot. This could be due to multiple reasons, but most commonly it's a breaking change in some plugin, or git refusing to pull an update to a plugin because it can't safely fast-forward the current branch.

The easiest way to solve this is to manually update (a rebase is likely required) the offending plugin, which should be located in Packer's package-root at $LUNARVIM_RUNTIME_DIR/site/pack/packer.

Let's say it's nvim-cmp for example

:! git -C "$LUNARVIM_RUNTIME_DIR/site/pack/packer/start/nvim-cmp" status

now check which commit is currently checked out

:! git -C "$LUNARVIM_RUNTIME_DIR/site/pack/packer/start/nvim-cmp" log -1

it should match the one in $LUNARVIM_RUNTIME_DIR/lvim/snapshots/default.json, but you can always restore the snapshot with :LvimSyncCorePlugins

:! git -C "$LUNARVIM_RUNTIME_DIR/site/pack/packer/start/nvim-cmp" pull --rebase

Packer failure

if you have not done any changes to any of the plugins, then you can remove Packer's package root completely.

LUNARVIM_RUNTIME_DIR="${LUNARVIM_RUNTIME_DIR:-$HOME/.local/share/lunarvim}"
rm -rf "$LUNARVIM_RUNTIME_DIR/site/pack/packer"

now open lvim, you'll see a lot of errors about all the plugins missing, but running :LvimSyncCorePlugins should fix them all.

LunarVim is slow!

are you using fish?

First of all, it is not recommended to set shell to fish in vim. Plenty of vim addons execute fish-incompatible shellscript, so setting it to /bin/sh is typically better, especially if you have no good reason to set it to fish.

vim.opt.shell = "/bin/sh"

See fish-shell/fish-shell#7004 and :h 'shell' for more info.

Language server XXX does not start for me!

Update node

Some language servers depend on newer versions of node. Update your version of node to the latest.

is it overridden?

This could be due to the fact that the server is overridden

--- is it in this list?
:lua print(vim.inspect(lvim.lsp.automatic_configuration.skipped_servers))

If that's the case, then you need to either remove it from that list and re-run :LvimCacheReset

vim.tbl_map(function(server)
return server ~= "emmet_ls"
end, lvim.lsp.automatic_configuration.skipped_servers)

or set it up manually.

is it supported by nvim-lsp-installer?

Any server that does not show up in LspInstallInfo needs to be installed manually.

is it at least showing up in :LspInfo?

Check out the tips for debugging nvim-lspconfig.

Too many language servers are starting at once!

Are any of these servers overridden by default?

:lua print(vim.inspect(require("lvim.lsp.config").override))

If they are then you are using the syntax prior to LunarVim#1813.

-- this is the correct syntax since 3dd60bd
vim.list_extend(lvim.lsp.override, { "jsonls" })
-- this the correct syntax since 198577a
vim.list_extend(lvim.lsp.automatic_configuration.skipped_servers, { "jsonls" })

My LunarVim looks ugly!