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

Neogit breaks when the setup function is not called #77

Closed
RianFuro opened this issue Mar 25, 2021 · 5 comments
Closed

Neogit breaks when the setup function is not called #77

RianFuro opened this issue Mar 25, 2021 · 5 comments
Labels
bug Something isn't working

Comments

@RianFuro
Copy link
Contributor

RianFuro commented Mar 25, 2021

...with the following error when opening the status buffer:

Error executing vim.schedule lua callback: .../site/pack/packer/start/neogit/lua/neogit/lib/buffer.lua:131: Vim(sign):E155: Unknown sign: NeogitOpen:section
@RianFuro RianFuro added the bug Something isn't working label Mar 25, 2021
@TimUntersberger
Copy link
Collaborator

Ah this is more of a documentation issue, because calling the setup function is required.

@RianFuro
Copy link
Contributor Author

hmm... could we avoid that? I mean putting require'neogit'.setup {} into my config fixes the problem, but then again, if an empty setup is all that's needed we might as well just set sensible defaults without the setup call.

@akinsho
Copy link
Contributor

akinsho commented Mar 25, 2021

FWIW require'plugin'.setup() has become the prevailing convention for nvim lua plugins, so I think this has become quite normal to do and users are becoming quite used to having some sort of setup function, see:

Butting out now 🚶🏿‍♂️

@RianFuro
Copy link
Contributor Author

RianFuro commented Mar 25, 2021

Yeah I have no problems with the setup function, I'm just saying we probably shouldn't mandate it to be called if we can avoid it. telescope for example works perfectly fine without calling the setup (edit: as does hop.nvim).

Also @akinsho thanks for the reference to hop, I was looking for a plugin like that 😁

@TimUntersberger
Copy link
Collaborator

We now call the setup function with default arguments when neogit is loaded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants