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

feat: add configs in setup #16

Closed
mikesmithgh opened this issue Sep 22, 2023 · 1 comment
Closed

feat: add configs in setup #16

mikesmithgh opened this issue Sep 22, 2023 · 1 comment
Labels

Comments

@mikesmithgh
Copy link
Owner

See #12 (comment)

Thanks, that's interesting, I didn't realize that the plugin uses a separate config file. Are there any plans to go with the conventional require("kitty-scrollback").setup(...) configuration method? That'd make configuration a lot easier.

I originally used separate config files because the kitten (written in python) starts Nvim and passes kitty specific info as arguments. I did some experimenting and think I could get the conventional setup method to work and agree it would be cleaner.

require('kitty-scrollback').setup({
  default = function(kitty_data)
    return { ... default config here ... }
  end,
  another = function(kitty_data)
    return { ... another config here ... }
  end,
  ...
})

Then the kitten would be called like kitty.conf

map ctrl+shift+h kitty_scrollback_nvim --config default
map f1 kitty_scrollback_nvim --config another

That way you could centralize all your configs in the setup and then specify the particular config by key. @musjj Does that sound like a good approach to you or do you have any other ideas?

Yes, it would be nice if there's an option to configure this too!

Nice, I'll add an issue for that

mikesmithgh added a commit that referenced this issue Sep 25, 2023
BREAKING CHANGE: The --config-file option has been removed.
Custom configurations are now supplied in the setup()
function instead of separate config file. The config name
correspondes to the key of the table provided to setup().
mikesmithgh added a commit that referenced this issue Nov 1, 2023
BREAKING CHANGE: The `--config-file` option has been removed.
Custom configurations are now supplied in the setup() function instead
of separate config file. The config name correspondes to the key of
the table provided to `setup()`.

closes #16
closes #12
closes #2
mikesmithgh pushed a commit that referenced this issue Nov 1, 2023
# [2.0.0](v1.1.10...v2.0.0) (2023-11-01)

* feat!: use kitty_mod for keymaps ([8e652bf](8e652bf)), closes [#30](#30)
* feat!: replace config-file with config name ([e16e96a](e16e96a)), closes [#16](#16) [#12](#12) [#2](#2)

### BREAKING CHANGES

* The default mapping keys changed from `ctrl+shift` to `kitty_mod`.

- If you are using the default value for `kitty_mod` of `ctrl+shift`, then no change is needed.
- If you are using a different value for `kitty_mod`, then you should correct any potential mapping conflicts that may occur
  now that `kitty-scrollback.nvim` is using `kitty_mod`.
* The `--config-file` option has been removed.
Custom configurations are now supplied in the setup() function instead
of separate config file. The config name correspondes to the key of
the table provided to `setup()`.
@mikesmithgh
Copy link
Owner Author

🎉 This issue has been resolved in version 2.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

No branches or pull requests

1 participant