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

Remove Unnecessary Warning on Startup #73

Closed
h33n0k opened this issue Nov 16, 2024 · 2 comments
Closed

Remove Unnecessary Warning on Startup #73

h33n0k opened this issue Nov 16, 2024 · 2 comments

Comments

@h33n0k
Copy link

h33n0k commented Nov 16, 2024

Problem:

Every time I start Neovim, I get the following annoying warning message:

nvim-hlslens needs to invoke `require('hlslens').setup()` to boot!`

This warning appears even though i have already set up hlslens, causing an unnecessary disruption on startup.

Proposed Solution:

I suggest removing the following block of code from lua/hlslens.lua, as it doesn't provide any real value other than warning the user:

if not initialized then
	vim.notify([[nvim-hlslens needs to invoke `require('hlslens').setup()` to boot!]],
		vim.log.levels.WARN)
end

Rationale

  • The warning does not offer any actionable information when the user has already properly configured hlslens.
  • It's redundant and adds unnecessary clutter to the user experience.
  • Removing this would prevent interruptions without losing any functionality.

Additional Context:

I really enjoy using this plugin, as I do with all your other plugins. However, this particular warning feels unnecessary and disruptive. I believe removing it would improve the overall experience without any negative side effects.

@h33n0k
Copy link
Author

h33n0k commented Nov 16, 2024

See #74

@kevinhwang91
Copy link
Owner

hlslens will automatically load in older versions, so the warning message advises users to configure it manually.
Maybe it's time to remove

lua vim.schedule(function() require('hlslens').setup(nil, true) end)

to force users to invoke setup.

Thanks, I will remove related code later.

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