[kitty|nvim] Add kitty buffer editing in nvim
This commit is contained in:
1 parent
8e6546f468
commit
2da3fea10d
3 files changed
+35
-6
No files matched your search
@@ -40,6 +40,10 @@ editor .
|
|||||||
close_on_child_death no
|
close_on_child_death no
|
||||||
allow_hyperlinks yes
|
allow_hyperlinks yes
|
||||||
|
|
||||||
|
allow_remote_control socket-only
|
||||||
|
listen_on unix:/tmp/kitty
|
||||||
|
shell_integrated enabled
|
||||||
|
|
||||||
# Keymaps
|
# Keymaps
|
||||||
map ctrl+a>q close_window
|
map ctrl+a>q close_window
|
||||||
map ctrl+a>minus launch --location=hsplit
|
map ctrl+a>minus launch --location=hsplit
|
||||||
@@ -60,3 +64,13 @@ map ctrl+a>right resize_window wider
|
|||||||
map ctrl+a>up resize_window taller
|
map ctrl+a>up resize_window taller
|
||||||
map ctrl+a>down resize_window shorter 3
|
map ctrl+a>down resize_window shorter 3
|
||||||
map ctrl+a>home resize_window reset
|
map ctrl+a>home resize_window reset
|
||||||
|
|
||||||
|
# Kittens
|
||||||
|
# kitty-scrollback.nvim Kitten alias
|
||||||
|
action_alias kitty_scrollback_nvim kitten '/home/benq/.local/share/nvim/benq/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
|
||||||
@@ -3,16 +3,22 @@ vim.api.nvim_create_autocmd("TextYankPost", {
|
|||||||
desc = "Highlight in yanking",
|
desc = "Highlight in yanking",
|
||||||
group = vim.api.nvim_create_augroup("highlight-yank", { clear = true }),
|
group = vim.api.nvim_create_augroup("highlight-yank", { clear = true }),
|
||||||
callback = function()
|
callback = function()
|
||||||
vim.highlight.on_yank()
|
vim.hl.hl_op({
|
||||||
|
higroup = 'IncSearch',
|
||||||
|
timeout = 100,
|
||||||
|
})
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- LSP
|
-- LSP
|
||||||
vim.keymap.del('n', "gra")
|
local function safe_del(mode, lhs)
|
||||||
vim.keymap.del('n', "gri")
|
pcall(vim.keymap.del, mode, lhs)
|
||||||
vim.keymap.del('n', "grn")
|
end
|
||||||
vim.keymap.del('n', "grr")
|
safe_del('n', "gra")
|
||||||
vim.keymap.del('n', "grt")
|
safe_del('n', "gri")
|
||||||
|
safe_del('n', "grn")
|
||||||
|
safe_del('n', "grr")
|
||||||
|
safe_del('n', "grt")
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("LspAttach", {
|
vim.api.nvim_create_autocmd("LspAttach", {
|
||||||
group = vim.api.nvim_create_augroup("LspKeymaps", { clear = true }),
|
group = vim.api.nvim_create_augroup("LspKeymaps", { clear = true }),
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
return {
|
||||||
|
'mikesmithgh/kitty-scrollback.nvim',
|
||||||
|
enabled = true,
|
||||||
|
version = '^6.0.0',
|
||||||
|
lazy = true,
|
||||||
|
cmd = { 'KittyScrollbackGenerateKittens', 'KittyScrollbackCheckHealth', 'KittyScrollbackGenerateCommandLineEditing' },
|
||||||
|
event = { 'User KittyScrollbackLaunch' },
|
||||||
|
opts = {}
|
||||||
|
}
|
||||||
Reference in new issue
Block a user