0

I checked the documentation but couldn't find an answer to this basic question: Is it possible to reuse my existing .vimrc file in Nvchad? Currently, nvchad ignores my settings in .vimrc file.

1 Answer 1

2

NvChad has some exit point for customization. In particular it loads the .lua file in the lua\custom folder.

You could edit the lua\custom\init.lua file in that folder with the following content:

local vimrc = vim.fn.stdpath "config" .. ".vimrc"
vim.cmd('source ' .. vimrc)

Assuming your .vimrc is in the nvim folder (~/AppData/local/nvim on Windows)

2
  • 1
    Thank you for the suggestion. There is one issue though. I created lua/custom/vimrc.lua and put the lines above. It didn't work. Then I put the above lines into lua/custom/chadrc.lua file. It worked. Maybe should I source vimrc.lua file somewhere? Mar 29 at 9:46
  • 1
    I believe the correct way is to edit lua\custom\init.lua I have tested at my end and it seems to work. Mar 29 at 10:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.