Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NeoVim cant find "keymap" (a nil value)

Tags:

lua

neovim

Im following "ThePrimeagen" tutorial on setting up NeoVim (https://www.youtube.com/watch?v=w7i4amO_zaE), but Im stuck at 3:13 where he ":so" (sources) the file.
In my case I get the error:
E5108: Error executing lua [string ":source (no file)]:2: attempt to index field 'keymap' (a nil value) stack traceback: [string ":source (no file)"]:2: in main chunk

I dont know much about lua, but what I understand is that it cant find "keymap", thats weird, everything works till now, I placed the nvim/lua folder on the right place, init.lua files work, only this remap that doesnt.
Any ideas on a solution?

the remap.lua file:

vim.g.mapleader = " "
vim.keymap.set("n", "<leader>pv", vim.cmd.Ex)
like image 942
EnderMega Avatar asked Dec 29 '25 12:12

EnderMega


1 Answers

Just install unstable neovim version:

sudo add-apt-repository ppa:neovim-ppa/unstable
sudo apt-get update
sudo apt-get install neovim
like image 129
Prabhu Egorus Avatar answered Jan 02 '26 16:01

Prabhu Egorus



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!