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

Code suggestion #6

Open
osamuaoki opened this issue Jan 25, 2023 · 0 comments
Open

Code suggestion #6

osamuaoki opened this issue Jan 25, 2023 · 0 comments

Comments

@osamuaoki
Copy link

I have been playing with your code a bit.

I see code as:

if options["dont_center"] then
    config["dont_center"] = options["dont_center"]
  end

Since dont_center has true/false value, what you want is more like:

if options["dont_center"] ~= nil then
    config["dont_center"] = options["dont_center"]
  end

The same is true for open_folds.

For ignore_*, they can be as you wrote. But for consistency and elegance, you may want to check against ~= nil.

Just a thought for better code.

My mod branch can be seen at: https://github.com/osamuaoki/remember.nvim/tree/osamu . This contains other mods which you may not agree and I don't know if I will be using in my future. So I am not requesting merge at this moment.

Thanks.

Osamu

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

1 participant