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

fix: support calling setup() w/o args #71

Merged
merged 1 commit into from
Jun 16, 2024
Merged

Conversation

tmfink
Copy link
Contributor

@tmfink tmfink commented Jun 15, 2024

Avoids error attempt to index local 'opts' (a nil value) when calling setup() without arguments.

I noticed the issue when I updated the plugin.

Snippet of my init.lua, which does not pass arguments to setup():

-- install w/ vim-plug
vim.call('plug#begin')
Plug('tris203/precognition.nvim')
vim.call('plug#end')

... 

require('precognition').setup()

Copy link
Owner

@tris203 tris203 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch @tmfink

This would have been since the introduction of the color adjustment stuff.

In lazy it would give you a type warning, but Im guessing Packer doesn't do that

lua/precognition/init.lua Outdated Show resolved Hide resolved
Copy link
Owner

@tris203 tris203 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

Will merge this in the next few days

Avoids error `attempt to index local 'opts' (a nil value)` when calling
setup() without arguments.

Co-authored-by: Tristan Knight <tris203@gmail.com>
@tris203 tris203 merged commit 02dcc8f into tris203:main Jun 16, 2024
10 checks passed
@tris203
Copy link
Owner

tris203 commented Jun 16, 2024

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants