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

Installed, but no commands? #4

Closed
Normanras opened this issue Oct 19, 2023 · 6 comments · Fixed by #5
Closed

Installed, but no commands? #4

Normanras opened this issue Oct 19, 2023 · 6 comments · Fixed by #5
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@Normanras
Copy link

I can't quite figure out if this is a plugin manager issue or the plugin. I'm using Lazy, and it shows as installed (see screenshot), but none of the commands work.
pulse-nvim-issue

I've whittled the config down to a very basic setup using the readme. Any :Pulse* command says E492: Not an editor command:.

return {
  'linguini1/pulse.nvim',
    version = "*",
	-- config = function()
	--   require('pulse').setup{
	-- 	level = vim.log.levels.INFO,
	-- 	pulse.add("Test", {
	-- 	  interval = 90,
	-- 	  message = "Test Message!",
	-- 	  enabled = True,
	  -- })
  -- }
  -- end
}

By the way, with the command :PulseSetTimer, should the name param be in quotes?

@linguini1 linguini1 self-assigned this Oct 20, 2023
@linguini1 linguini1 added bug Something isn't working and removed bug Something isn't working labels Oct 20, 2023
@linguini1
Copy link
Owner

linguini1 commented Oct 20, 2023

Hello! Thanks for trying out pulse!

In this basic configuration, you have commented out the setup function. I have actually designed the plugin so that unless you call setup(), the editor commands are not loaded. You will need to at least have the following for commands to work:

return {
    "linguini1/pulse.nvim",
    config = function() require("pulse").setup() end
}

I also see in your config that it looks like you're calling pulse.add() within your pulse.setup() call. Could you try modifying it to:

return {
  'linguini1/pulse.nvim',
    version = "*",
    config = function()

        local pulse = require("pulse")

        pulse.setup({ level = vim.log.levels.INFO })

	 	pulse.add("Test", {
	 	  interval = 90,
	 	  message = "Test Message!",
	 	  enabled = True,
        })
  end
}

Let me know if this resolves your issue! I will also update the documentation to make it clear that .setup must be called to get commands as part of the base install.

@Normanras
Copy link
Author

Thanks! I opened this issue and decided to leave my commented code in the issue for exactly this reason - very helpful. I'll try again with your instructions and happy to contribute to the docs if you don't have time to get around to it.

@linguini1
Copy link
Owner

Thanks! I opened this issue and decided to leave my commented code in the issue for exactly this reason - very helpful. I'll try again with your instructions and happy to contribute to the docs if you don't have time to get around to it.

Great! Please let me know if it works when you get around to it and I'll close this issue. I've opened PR #5 to clarify the docs, but if you feel something is missing I would be happy to have you as a contributor!

@Normanras
Copy link
Author

Normanras commented Oct 20, 2023

Okay, we've got action and it's working as expected. Your config setup is perfect. The only other finding (which maybe should be a separate issue) is that :PulseList shows no timers. This is both for one-shot timers, and pulse.add() timers. :PulseStatus {{timer_name}} works as expected and shows the timer and its remaining time. And I get the timer message without fail.

I'll try to debug and see if I can find out more, but for the sake of the original intention of this issue, it can be closed.

@linguini1
Copy link
Owner

I'll try to debug and see if I can find out more, but for the sake of the original intention of this issue, it can be closed.

Please feel free to open another issue and I'll have a look!

@Normanras
Copy link
Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants