Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add a custom plugin #59

Closed
mingsu opened this issue Dec 14, 2021 · 2 comments
Closed

How to add a custom plugin #59

mingsu opened this issue Dec 14, 2021 · 2 comments

Comments

@mingsu
Copy link

mingsu commented Dec 14, 2021

Thanks for creating this great Neovim Lua configuration!

Just wondering how to add a custom plugin.

I have followed the instruction to add code in

  • module/tools/config.lua
  • module/tools/plugin.lua

but not succeed.

In my case, I want to add this plugin: jalvesaq/Nvim-R

Below are the added parts:

> tail module/tools/config.lua

...

function config.NvimR()
    require("Nvim-R").setup({})
end

return config
> tail module/tools/plugin.lua

...

tools["jalvesaq/Nvim-R.nvim"] = {opt = true}

return tools

@ayamir
Copy link
Owner

ayamir commented Dec 14, 2021

Because your new plugin's installation config is not correct.
First of all, this plugin's git repo is jalvesaq/Nvim-R rather than jalvesaq/Nvim-R.nvim.
Secondly, you need to learning how to use Packer.nvim to manage plugins: quickstart
Thirdly, I notice that this plugin is about r lang so you'd better put it in lang module.
So the correct config is like this:

lang["jalvesaq/Nvim-R"] = {opt = true, ft = "r", branch = "stable"}

Additionally, you don't need to add its config in config.lua because this section doesn't occur in its readme.
Btw, you can read its doc in nvim by :h Nvim-R.

@mingsu
Copy link
Author

mingsu commented Dec 14, 2021

Great, it works now, Thanks!

@mingsu mingsu closed this as completed Dec 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants