0

I have Neovim (with NvChad). I seem to have 'tpope/vimrails' installed in my lua/plugins/init.lua file. When I start up :Lazy I can see that the plugin is listed under "not-loaded"

picture enter image description here

When I go into a Rails application the vim-rails "gf" command does not work.

I have installed the tpope/vim-rails plugin in my regular vim and ran "gf" at the same location and it does work.

I have spent the entire weekend trying to work on this single issue.

Can someone please point me to a source that explains how to get tpope/vim-rails working in Neovim?

Thank you for your time.

UPDATE: So it seems the issue is something in NvChad is getting in the way of the vim-rails script. I'll have to hunt that down later and post a solution. For now, I'm happy ditching NvChad and going with basic neovim with TJ Devries Kickstart project init.lua file as it feels more close to base vim for me. I'll detail the specifics of my solution below.

1 Answer 1

0

anyone who needs this:

I have vim-rails working under TJ Devries Kickstart project ( see link). It was as simple as adding one line of code to the ~/.config/nvim/init.lua file. Just place this block inside the file...

```

require('lazy).setup({

...

{

-- Ruby on Rails development plugin by tim pope

'tpope/vim-rails'

}

...

end

```

Once that is in the init.lua file, restart nvim and enter the ":Lazy" command. You will see vim-rails listed. Press "i" to install. Restart nvim again. And you are good to go. All vim-rails commands will now work.

Below is the nvim kickstart repo with the init.lua file that you can use. Just insert the vim-rails plugin as described.

https://github.com/nvim-lua/kickstart.nvim?tab=readme-ov-file

Sign up to request clarification or add additional context in comments.

1 Comment

@quentin not sure how to connect with you (stackoverflow.com/users/19068/quentin) but just wanted to say I agreed with your response to my original post. I hope this is a better version and helps get someone unstuck as I was

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.