doom-neovim/doom-nvim

[BUG] Startup errors with keymaps service.

GeraldRyan opened this issue · 5 comments

Current Behavior:

On starting neovim I get the following error and don't get the famous doom start screen.

Error detected while processing /home/gerald/.config/nvim/init.lua:
E5113: Error while calling lua chunk: /home/gerald/.config/nvim/lua/doom/services/keymaps.lua:152: attempt to index field 'keymap' (a nil value)

stack traceback:
/home/gerald/.config/nvim/lua/doom/services/keymaps.lua:152: in function 'handler'
/home/gerald/.config/nvim/lua/doom/services/keymaps.lua:196: in function 'traverse'
/home/gerald/.config/nvim/lua/doom/services/keymaps.lua:172: in function 'traverse'
/home/gerald/.config/nvim/lua/doom/services/keymaps.lua:221: in function 'applyKeymaps'
/home/gerald/.config/nvim/lua/doom/core/modules.lua:149: in function 'load_modules'
/home/gerald/.config/nvim/lua/doom/core/init.lua:51: in main chunk
[C]: in function 'require'
/home/gerald/.config/nvim/init.lua:16: in main chunk

Expected Behavior:

I expect it to start and show the DOOM screen like on my work Mac.

Steps To Reproduce:

[Sorry clipboard was not available to me inside the console but here's the gist]

Configuration OK
Performance OK
Remote Plugins: OK
Terminal

  • INFO key_backspace...
  • INFO key_dc ...
  • INFO $VTE_VERSION='6003'
  • INFO $COLORTERM='truecolor'
I doubt it's an nvim version issue. nvim works fine on itself without doom. It works perfectly out of the box on my mac at work. I can work fine in a simple running vim instance, but I am a novice at setting it up and configuring it and what all these scripts and plugins are doing so bear with me.
Doom Report Output

Result -
Error loading lua [string ":lua"]:1 unexpected symbol near '<eof>'

Anything else:

image

Same bug here on a fresh install.
@GeraldRyan You might want to edit your Issue title though. It is not explicit and quite generic

Hi @GeraldRyan @acherifi , what OS are you using? I am developing on macos but I can't re-create this issue (fresh install from script in README.md) I also have a docker image for testing archlinux but it's late here so I'll have to do that tomorrow.

Actually, just checked the line error. Are you using neovim 0.7? Doom-nvim requires 0.7+ to use thevim.keymap.set api. I'll set a reminder update the in-editor warning to notify users on updating.

Hi @connorgmeehan and thank you for your answer.

I am under Ubuntu 22.04 and indeed not using neovim 0.7.
I just switched to neovim 0.7.2 using the appimage and it did the trick.

See also #375 (comment), I just changed to use the PPA on my Ubuntu and it works fine (the advantage of the PPA over an appimage is that it will get updates as new versions of neovim are released): https://launchpad.net/~neovim-ppa/+archive/ubuntu/stable

I tried making the keymaps service backwards compatibile with v0.6.0 but ended up just hitting plugin compatibility issues which is going to be too much effort to manage backward compatibility. To make it a little clearer for users I've updated the warning / error if using <v.0.7.0 and added a link to a new document https://github.com/NTBBloodbath/doom-nvim/blob/main/docs/updating-neovim.md. I think it's the best we can do with current contributors free time etc. It'd be nice to keep backwards compatibility but I don't think it's feasible sadly :(