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

Buffer opens up with modifiable set to false #252

Closed
PrayagS opened this issue May 25, 2024 · 1 comment
Closed

Buffer opens up with modifiable set to false #252

PrayagS opened this issue May 25, 2024 · 1 comment

Comments

@PrayagS
Copy link

PrayagS commented May 25, 2024

Installed the plugin using lazy as specified in the README. It looks as follows,

{
    'mikesmithgh/kitty-scrollback.nvim',
    enabled = true,
    lazy = true,
    cmd = { 'KittyScrollbackGenerateKittens', 'KittyScrollbackCheckHealth' },
    event = { 'User KittyScrollbackLaunch' },
    -- version = '*', -- latest stable version, may have breaking changes if major version changed
    -- version = '^4.0.0', -- pin major version, include fixes and features that do not have breaking changes
    config = function()
        require('kitty-scrollback').setup({
            {
                status_window = {
                    style_simple = true,
                },
                visual_selection_highlight_mode = 'kitty',
            },
        })
    end,
},

The relevant portion in kitty configuration is as follows,

# kitty-scrollback.nvim Kitten alias
action_alias kitty_scrollback_nvim kitten /Users/prayagmatic/.local/share/nvim/lazy/kitty-scrollback.nvim/python/kitty_scrollback_nvim.py

# Browse scrollback buffer in nvim
map kitty_mod+h kitty_scrollback_nvim
# Browse output of the last shell command in nvim
map kitty_mod+g kitty_scrollback_nvim --config ksb_builtin_last_cmd_output
# Show clicked command output in nvim
mouse_map ctrl+shift+right press ungrabbed combine : mouse_select_command_output : kitty_scrollback_nvim --config ksb_builtin_last_visited_cmd_output

When I use any of these keybindings, the nvim buffer opens up as expected. However, I can't modify anything since it opens up with modifiable set to false.

I have tried the following extra arguments to nvim,

  • --nvim-args -u /Users/prayagmatic/.config/kitty/init.lua: Use a different nvim configuration which is copied from the README.
  • --nvim-args --cmd "set modifiable" or its Lua equivalent
  • --nvim-args --clean --noplugin -n

In all the cases, it always starts with modifiable set to false. It only works when I toggle it manually after the buffer is opened.

I can't exactly pinpoint as to who's overriding this value. Is it possible that the kitten or the nvim plugin is forcefully overriding this value?

TIA.

@PrayagS
Copy link
Author

PrayagS commented May 25, 2024

Well, this got fixed after toggling this plugin option,

Closing this issue. Though still curious as to how it was being set to false. I checked launch.lua and saw that it is explicitly defined as true,

@PrayagS PrayagS closed this as completed May 25, 2024
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

1 participant