jvgrootveld / telescope-zoxide

An extension for telescope.nvim that allows you operate zoxide within Neovim.
MIT License
312 stars 17 forks source link

feat: add config option 'verbose' #18

Closed mawkler closed 1 month ago

mawkler commented 1 year ago

"Directory changed to..." messages are only printed when verbose is set to true

mawkler commented 1 year ago

@jvgrootveld Hi! Any chance this could get merged? 🙂

jvgrootveld commented 1 month ago

Ty for your contribution. I was a little absent lately due to different things. I just want to let everyone know will check all Open issues and PR's shortly.

jvgrootveld commented 1 month ago

@mawkler I love that you made a suggestion to make this plugin better! But I'm sorry, I don't think I will accept this into the default configuration. I'm not (yet) convinced every user benefits from this change.

There is one default change directory print so that's it clear for every (new) user what happend. If you don't want the print you can easily override this in your own config like:

mappings = {
    default = {
      after_action = function(selection)
        -- Do nothing
      end
    }
  }

If you want a verbose option you can use that within the override, no need to add an extra option to the plugin config.

The config is made so that you can override anything due to the two config maps (default and your own) are merged.

But if you can convince me otherwise I will give this a second look :)

mawkler commented 1 month ago

@jvgrootveld Note that my PR doesn't change any default behavior for the user. It only adds the option to disable the messages if you want.

The use case for me is that I already display the current working directory in my status line.

But it's of course up to you if you want to merge the PR or not, and if you don't I'll give your suggestion a try! 🙂

jvgrootveld commented 1 month ago

@mawkler I understand, but you can already disable the message without adding new options by overriding the default after_action function.

In my opinion, a configuration option is to change a (fundamental) feature of the plugin, logging messages is not really a feature.

Still thanks again for the idea, I will close this PR and suggest to override the default after_action function for your own situation :)