kitty opts
This commit is contained in:
1 parent
661914dc36
commit
85aaec3974
1 file changed
+25
@@ -8,4 +8,29 @@ vim.g.blamer_template = "<author>, <committer-time> • <summary>" -- Example: C
|
|||||||
vim.g.blamer_relative_time = true
|
vim.g.blamer_relative_time = true
|
||||||
vim.g.blamer_enabled = true
|
vim.g.blamer_enabled = true
|
||||||
vim.g.blamer_show_in_visual_modes = 0
|
vim.g.blamer_show_in_visual_modes = 0
|
||||||
|
vim.opt.shell = "bash"
|
||||||
|
vim.opt.termguicolors = true
|
||||||
|
|
||||||
|
|
||||||
|
-- Create a custom :term command that passes Kitty's custom environment variables
|
||||||
|
vim.api.nvim_create_user_command("Term", function()
|
||||||
|
-- 1. Grab Kitty's installation path from your current terminal environment
|
||||||
|
local kitty_install = os.getenv("KITTY_INSTALLATION_DIR")
|
||||||
|
|
||||||
|
-- 2. Build the manual injection loader path Kitty requires
|
||||||
|
local kitty_bash_injection = kitty_install and (kitty_install .. "/shell-integration/bash/kitty.bash") or ""
|
||||||
|
|
||||||
|
-- 3. Open a clean terminal, tell Kitty it is safe to interact, and map it
|
||||||
|
if kitty_install ~= nil and kitty_install ~= "" then
|
||||||
|
-- Run Bash but explicitly inject the environment loader before anything else handles it
|
||||||
|
vim.cmd(string.format("terminal env KITTY_SHELL_INTEGRATION=enabled bash --rcfile %s -i", kitty_bash_injection))
|
||||||
|
else
|
||||||
|
-- Fallback safe method if Kitty environment path variables are empty
|
||||||
|
vim.cmd("terminal bash -il")
|
||||||
|
end
|
||||||
|
end, { force = true })
|
||||||
|
-- Make sure lowercase ':term' also maps to our special alignment function
|
||||||
|
vim.cmd([[cabbrev term Term]])
|
||||||
|
|
||||||
|
|
||||||
require("config.lazy")
|
require("config.lazy")
|
||||||
Reference in new issue
Block a user