Skip to content

Commit

Permalink
Merge branch 'main' into feat-jobstart
Browse files Browse the repository at this point in the history
  • Loading branch information
mikesmithgh committed Dec 31, 2024
2 parents 6327cb9 + a8d7b84 commit cf14a31
Showing 1 changed file with 22 additions and 10 deletions.
32 changes: 22 additions & 10 deletions lua/kitty-scrollback/api.lua
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,33 @@ M.generate_kittens = function(generate_modes)
':p'
)

local action_alias = 'kitty_scrollback_nvim'
local alias_config = {
'# kitty-scrollback.nvim Kitten alias',
'action_alias ' .. action_alias .. ' kitten ' .. kitty_scrollback_kitten,
'',
}
local alias_config_quoted = ([[action_alias %s kitten '%s']]):format(
action_alias,
kitty_scrollback_kitten
)

local alias_warn = {}
if kitty_scrollback_kitten:find('%s') then
alias_warn = {
[[# WARNING]],
[[# ']] .. kitty_scrollback_kitten .. [[' contains whitespace.]],
[[# You may receive an error opening kitty-scrollback.nvim. If an error occurs, you can]],
[[# workaround this issue by symlinking the kitty-scrollback.nvim plugin directory to]],
[[# Kitty's configuration directory with the command:]],
[[#]],
[[# If you are using Kitty version 0.38.2 or greater, then whitespace is allowed in the]],
[[# path and you can ignore this warning. Just make sure that the kitten path is]],
[[# wrapped in quotes. For example,]],
[[#]],
[[# ]] .. alias_config_quoted,
[[#]],
[[# If you are using Kitty version 0.38.1 or less, then you may receive an error opening]],
[[# kitty-scrollback.nvim. If an error occurs, you can workaround this issue by symlinking]],
[[# the kitty-scrollback.nvim plugin directory to Kitty's configuration directory with]],
[[# the command:]],
[[#]],
[[# ln -s ']]
.. vim.fn.fnamemodify(kitty_scrollback_kitten, ':h:h')
Expand All @@ -118,13 +137,6 @@ M.generate_kittens = function(generate_modes)
}
end

local action_alias = 'kitty_scrollback_nvim'
local alias_config = {
'# kitty-scrollback.nvim Kitten alias',
'action_alias ' .. action_alias .. ' kitten ' .. kitty_scrollback_kitten,
'',
}

local builtin_map_configs = {
'# Browse scrollback buffer in nvim',
'map kitty_mod+h ' .. action_alias,
Expand Down

0 comments on commit cf14a31

Please sign in to comment.