Giter Site home page Giter Site logo

Comments (7)

musjj avatar musjj commented on August 15, 2024 1

Yes, that sounds pretty good! Maybe also have a special default config key, that when specified, will get invoked when no --config is provided? But I'm just bikeshedding here, either way would be fine.

from kitty-scrollback.nvim.

mikesmithgh avatar mikesmithgh commented on August 15, 2024 1

Hey @musjj , I released adding configs to your setup function in v2.0.0 let me know how this works for you 👍

from kitty-scrollback.nvim.

mikesmithgh avatar mikesmithgh commented on August 15, 2024

Hey @musjj,

I have plans to add more detailed documentation and guides for configuring keymaps/options.

There are a couple things you can do at the moment.

Example disable all keymaps: https://github.com/mikesmithgh/kitty-scrollback.nvim/blob/main/lua/kitty-scrollback/configs/keymaps_disabled.lua
Example override keymaps: https://github.com/mikesmithgh/kitty-scrollback.nvim/blob/main/lua/kitty-scrollback/configs/keymaps_custom.lua

  • <NOP> could also be used to disable certain keymaps (e.g., lua vim.keymap.set({ 'n' }, '<Plug>(KsbYankLine)', '<NOP>', {}))

If you run the command :KittyScrollbackGenerateKittens! it will display a list of kittens pointing to all of the example configs.

Those should allow you to reconfigure the default keymaps (https://github.com/mikesmithgh/kitty-scrollback.nvim/blob/main/lua/kitty-scrollback/keymaps.lua#L20).

Right now, yanks to the unnamed register are handled by an autocommand and not by a keymap. So that can't be configured, https://github.com/mikesmithgh/kitty-scrollback.nvim/blob/main/lua/kitty-scrollback/autocommands.lua#L165

  • I could add an option to specify a register or nil to allow that to be configured or disabled. Is this something that you are interested in?

Appreciate the feedback 👍

from kitty-scrollback.nvim.

musjj avatar musjj commented on August 15, 2024

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 could add an option to specify a register or nil to allow that to be configured or disabled. Is this something that you are interested in?

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

from kitty-scrollback.nvim.

mikesmithgh avatar mikesmithgh commented on August 15, 2024

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

from kitty-scrollback.nvim.

mikesmithgh avatar mikesmithgh commented on August 15, 2024

🎉 This issue has been resolved in version 2.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

from kitty-scrollback.nvim.

musjj avatar musjj commented on August 15, 2024

Thank you!

from kitty-scrollback.nvim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.