mirror of
https://github.com/foo-dogsquared/dotfiles.git
synced 2025-02-25 06:18:59 +00:00
chore: reformat codebase
This commit is contained in:
parent
f2f7a9e221
commit
5e8f90a6bd
@ -302,10 +302,10 @@ return lush(function()
|
|||||||
sassMixinName({ fg = base0D }),
|
sassMixinName({ fg = base0D }),
|
||||||
|
|
||||||
-- Spelling highlighting
|
-- Spelling highlighting
|
||||||
SpellBad({ gui = "undercurl" }), --, base08)
|
SpellBad({ gui = "undercurl" }), --, base08)
|
||||||
SpellLocal({ gui = "undercurl" }), --, base0C)
|
SpellLocal({ gui = "undercurl" }), --, base0C)
|
||||||
SpellCap({ gui = "undercurl" }), --, base0D)
|
SpellCap({ gui = "undercurl" }), --, base0D)
|
||||||
SpellRare({ gui = "undercurl" }), --, base0E)
|
SpellRare({ gui = "undercurl" }), --, base0E)
|
||||||
|
|
||||||
-- Startify highlighting
|
-- Startify highlighting
|
||||||
StartifyBracket({ fg = base03 }),
|
StartifyBracket({ fg = base03 }),
|
||||||
|
@ -26,7 +26,7 @@ return {
|
|||||||
{ "~/library/writings" },
|
{ "~/library/writings" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
fzf = { },
|
fzf = {},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -51,13 +51,38 @@ return {
|
|||||||
})
|
})
|
||||||
end, { noremap = true, desc = "Find files in current directory" })
|
end, { noremap = true, desc = "Find files in current directory" })
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>fg", get_builtin("grep_string"), { noremap = true, desc = "Grep for string in cursor" })
|
vim.keymap.set(
|
||||||
vim.keymap.set("n", "<leader>fG", get_builtin("live_grep"), { noremap = true, desc = "Grep for string in project" })
|
"n",
|
||||||
vim.keymap.set("n", "<leader>fb", get_builtin("buffers"), { noremap = true, desc = "Search currently opened buffers" })
|
"<leader>fg",
|
||||||
|
get_builtin("grep_string"),
|
||||||
|
{ noremap = true, desc = "Grep for string in cursor" }
|
||||||
|
)
|
||||||
|
vim.keymap.set(
|
||||||
|
"n",
|
||||||
|
"<leader>fG",
|
||||||
|
get_builtin("live_grep"),
|
||||||
|
{ noremap = true, desc = "Grep for string in project" }
|
||||||
|
)
|
||||||
|
vim.keymap.set(
|
||||||
|
"n",
|
||||||
|
"<leader>fb",
|
||||||
|
get_builtin("buffers"),
|
||||||
|
{ noremap = true, desc = "Search currently opened buffers" }
|
||||||
|
)
|
||||||
vim.keymap.set("n", "<leader>fh", get_builtin("help_tags"), { noremap = true, desc = "Search help pages" })
|
vim.keymap.set("n", "<leader>fh", get_builtin("help_tags"), { noremap = true, desc = "Search help pages" })
|
||||||
vim.keymap.set("n", "<leader>ft", get_builtin("treesitter"), { noremap = true, desc = "Search treesitter objects" })
|
vim.keymap.set(
|
||||||
|
"n",
|
||||||
|
"<leader>ft",
|
||||||
|
get_builtin("treesitter"),
|
||||||
|
{ noremap = true, desc = "Search treesitter objects" }
|
||||||
|
)
|
||||||
vim.keymap.set("n", "<leader>fM", get_builtin("man_pages"), { noremap = true, desc = "Search manpages" })
|
vim.keymap.set("n", "<leader>fM", get_builtin("man_pages"), { noremap = true, desc = "Search manpages" })
|
||||||
vim.keymap.set("n", "<leader>fS", get_builtin("spell_suggest"), { noremap = true, desc = "Pick spell suggestions" })
|
vim.keymap.set(
|
||||||
|
"n",
|
||||||
|
"<leader>fS",
|
||||||
|
get_builtin("spell_suggest"),
|
||||||
|
{ noremap = true, desc = "Pick spell suggestions" }
|
||||||
|
)
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>fA", get_builtin("resume"), { noremap = true, desc = "Return last search" })
|
vim.keymap.set("n", "<leader>fA", get_builtin("resume"), { noremap = true, desc = "Return last search" })
|
||||||
|
|
||||||
@ -69,7 +94,12 @@ return {
|
|||||||
{
|
{
|
||||||
"ThePrimeagen/harpoon",
|
"ThePrimeagen/harpoon",
|
||||||
config = function()
|
config = function()
|
||||||
vim.keymap.set("n", "<leader>fm", "<cmd>lua require('harpoon.mark').add_file()<cr>", { desc = "Add mark to file" })
|
vim.keymap.set(
|
||||||
|
"n",
|
||||||
|
"<leader>fm",
|
||||||
|
"<cmd>lua require('harpoon.mark').add_file()<cr>",
|
||||||
|
{ desc = "Add mark to file" }
|
||||||
|
)
|
||||||
|
|
||||||
local has_telescope, telescope = pcall("telescope")
|
local has_telescope, telescope = pcall("telescope")
|
||||||
if has_telescope then
|
if has_telescope then
|
||||||
|
@ -35,5 +35,5 @@ return {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ return {
|
|||||||
},
|
},
|
||||||
input = { enabled = true },
|
input = { enabled = true },
|
||||||
notifier = { enabled = true },
|
notifier = { enabled = true },
|
||||||
git = { enabled = true, },
|
git = { enabled = true },
|
||||||
lazygit = {
|
lazygit = {
|
||||||
enabled = vim.fn.executable("lazygit") == 1,
|
enabled = vim.fn.executable("lazygit") == 1,
|
||||||
},
|
},
|
||||||
@ -35,9 +35,27 @@ return {
|
|||||||
words = { enabled = true },
|
words = { enabled = true },
|
||||||
},
|
},
|
||||||
keys = {
|
keys = {
|
||||||
{ "<leader>gb", function() Snacks.git.blame_line() end, desc = "Open blame lines for current file" },
|
{
|
||||||
{ "<leader>gg", function() Snacks.lazygit() end, desc = "Open lazygit" },
|
"<leader>gb",
|
||||||
{ "<leader>gf", function() Snacks.lazygit.log_file() end, desc = "Open current file history in lazygit" },
|
function()
|
||||||
|
Snacks.git.blame_line()
|
||||||
|
end,
|
||||||
|
desc = "Open blame lines for current file",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>gg",
|
||||||
|
function()
|
||||||
|
Snacks.lazygit()
|
||||||
|
end,
|
||||||
|
desc = "Open lazygit",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>gf",
|
||||||
|
function()
|
||||||
|
Snacks.lazygit.log_file()
|
||||||
|
end,
|
||||||
|
desc = "Open current file history in lazygit",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
init = function()
|
init = function()
|
||||||
vim.api.nvim_create_autocmd("User", {
|
vim.api.nvim_create_autocmd("User", {
|
||||||
@ -58,7 +76,9 @@ return {
|
|||||||
Snacks.toggle.option("relativenumber", { name = "Relative number" }):map("<leader>uL")
|
Snacks.toggle.option("relativenumber", { name = "Relative number" }):map("<leader>uL")
|
||||||
Snacks.toggle.diagnostics():map("<leader>ud")
|
Snacks.toggle.diagnostics():map("<leader>ud")
|
||||||
Snacks.toggle.line_number():map("<leader>ul")
|
Snacks.toggle.line_number():map("<leader>ul")
|
||||||
Snacks.toggle.option("conceallevel", { off = 0, on = vim.o.conceallevel > 0 and vim.o.conceallevel or 2 }):map("<leader>uc")
|
Snacks.toggle
|
||||||
|
.option("conceallevel", { off = 0, on = vim.o.conceallevel > 0 and vim.o.conceallevel or 2 })
|
||||||
|
:map("<leader>uc")
|
||||||
Snacks.toggle.treesitter():map("<leader>uT")
|
Snacks.toggle.treesitter():map("<leader>uT")
|
||||||
Snacks.toggle.option("background", { off = "light", on = "dark", name = "Dark style" }):map("<leader>ub")
|
Snacks.toggle.option("background", { off = "light", on = "dark", name = "Dark style" }):map("<leader>ub")
|
||||||
Snacks.toggle.inlay_hints():map("<leader>uh")
|
Snacks.toggle.inlay_hints():map("<leader>uh")
|
||||||
@ -86,7 +106,13 @@ return {
|
|||||||
|
|
||||||
keys = {
|
keys = {
|
||||||
{ "-", "<cmd>Oil<CR>", { desc = "Open parent directory in file explorer" } },
|
{ "-", "<cmd>Oil<CR>", { desc = "Open parent directory in file explorer" } },
|
||||||
{ "<C-->", function () require("oil").open(vim.fn.getcwd()) end, { desc = "Open current working directory in file explorer" } },
|
{
|
||||||
|
"<C-->",
|
||||||
|
function()
|
||||||
|
require("oil").open(vim.fn.getcwd())
|
||||||
|
end,
|
||||||
|
{ desc = "Open current working directory in file explorer" },
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -1,2 +1 @@
|
|||||||
return {
|
return {}
|
||||||
}
|
|
||||||
|
@ -31,14 +31,14 @@ return {
|
|||||||
highlight_current_scope = { enable = false },
|
highlight_current_scope = { enable = false },
|
||||||
highlight_definitions = { clear_on_cursor_move = true, enable = true },
|
highlight_definitions = { clear_on_cursor_move = true, enable = true },
|
||||||
navigation = {
|
navigation = {
|
||||||
enable = true,
|
enable = true,
|
||||||
keymaps = {
|
keymaps = {
|
||||||
goto_definition = "gnd",
|
goto_definition = "gnd",
|
||||||
goto_next_usage = "<a-*>",
|
goto_next_usage = "<a-*>",
|
||||||
goto_previous_usage = "<a-#>",
|
goto_previous_usage = "<a-#>",
|
||||||
list_definitions = "gnD",
|
list_definitions = "gnD",
|
||||||
list_definitions_toc = "gO",
|
list_definitions_toc = "gO",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
smart_rename = { enable = true, keymaps = { smart_rename = "grr" } },
|
smart_rename = { enable = true, keymaps = { smart_rename = "grr" } },
|
||||||
textobjects = {
|
textobjects = {
|
||||||
|
@ -7,10 +7,8 @@ local wezterm = require("wezterm")
|
|||||||
-- same code fetching the colors all over various config files.
|
-- same code fetching the colors all over various config files.
|
||||||
local xdg_data_home = os.getenv("XDG_DATA_HOME") or "~/.local/share"
|
local xdg_data_home = os.getenv("XDG_DATA_HOME") or "~/.local/share"
|
||||||
local theme_dir = xdg_data_home .. "/base16/bark-on-a-tree"
|
local theme_dir = xdg_data_home .. "/base16/bark-on-a-tree"
|
||||||
local light_scheme, light_scheme_metadata =
|
local light_scheme, light_scheme_metadata = wezterm.color.load_base16_scheme(theme_dir .. "/albino-bark-on-a-tree.yaml")
|
||||||
wezterm.color.load_base16_scheme(theme_dir .. "/albino-bark-on-a-tree.yaml")
|
local dark_theme, dark_theme_metadata = wezterm.color.load_base16_scheme(theme_dir .. "/bark-on-a-tree.yaml")
|
||||||
local dark_theme, dark_theme_metadata =
|
|
||||||
wezterm.color.load_base16_scheme(theme_dir .. "/bark-on-a-tree.yaml")
|
|
||||||
|
|
||||||
local function scheme_for_appearance()
|
local function scheme_for_appearance()
|
||||||
-- We're just following the default XDG appearance spec.
|
-- We're just following the default XDG appearance spec.
|
||||||
@ -75,7 +73,7 @@ function module.apply_to_config(config)
|
|||||||
-- Configuring the windows padding.
|
-- Configuring the windows padding.
|
||||||
config.window_padding = {
|
config.window_padding = {
|
||||||
left = 0,
|
left = 0,
|
||||||
right = '1cell',
|
right = "1cell",
|
||||||
top = 0,
|
top = 0,
|
||||||
bottom = 0,
|
bottom = 0,
|
||||||
}
|
}
|
||||||
|
@ -5,8 +5,8 @@ function module.apply_to_config(config)
|
|||||||
-- Quick select-related options. Quite similar to Kitty hints which is
|
-- Quick select-related options. Quite similar to Kitty hints which is
|
||||||
-- nice.
|
-- nice.
|
||||||
config.quick_select_patterns = {
|
config.quick_select_patterns = {
|
||||||
"[0-9a-f]{7,40}", -- SHA1 hashes, usually used for Git.
|
"[0-9a-f]{7,40}", -- SHA1 hashes, usually used for Git.
|
||||||
"[0-9a-f]{7,64}", -- SHA256 hashes, used often for getting hashes for Guix packaging.
|
"[0-9a-f]{7,64}", -- SHA256 hashes, used often for getting hashes for Guix packaging.
|
||||||
"sha256-.{44,128}", -- SHA256 hashes in Base64, used often in getting hashes for Nix packaging.
|
"sha256-.{44,128}", -- SHA256 hashes in Base64, used often in getting hashes for Nix packaging.
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -14,7 +14,7 @@ function module.apply_to_config(config)
|
|||||||
config.check_for_updates = false
|
config.check_for_updates = false
|
||||||
|
|
||||||
-- Enable some things for Wayland.
|
-- Enable some things for Wayland.
|
||||||
if os.getenv "XDG_SESSION_TYPE" == "wayland" then
|
if os.getenv("XDG_SESSION_TYPE") == "wayland" then
|
||||||
config.enable_wayland = true
|
config.enable_wayland = true
|
||||||
config.front_end = "WebGpu"
|
config.front_end = "WebGpu"
|
||||||
config.force_reverse_video_cursor = true
|
config.force_reverse_video_cursor = true
|
||||||
@ -22,6 +22,7 @@ function module.apply_to_config(config)
|
|||||||
|
|
||||||
-- Use some IME.
|
-- Use some IME.
|
||||||
config.use_ime = true
|
config.use_ime = true
|
||||||
|
config.xim_im_name = "ibus"
|
||||||
|
|
||||||
-- Set up the visual bell.
|
-- Set up the visual bell.
|
||||||
config.audible_bell = "SystemBeep"
|
config.audible_bell = "SystemBeep"
|
||||||
|
@ -44,7 +44,7 @@ function module.apply_to_config(config)
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
-- Maximize the terminal on startup.
|
-- Maximize the terminal on startup.
|
||||||
wezterm.on('gui-startup', function(cmd)
|
wezterm.on("gui-startup", function(cmd)
|
||||||
local tab, pane, window = wezterm.mux.spawn_window(cmd or {})
|
local tab, pane, window = wezterm.mux.spawn_window(cmd or {})
|
||||||
window:gui_window():maximize()
|
window:gui_window():maximize()
|
||||||
end)
|
end)
|
||||||
|
@ -9,14 +9,11 @@ local module = {}
|
|||||||
local copy_mode = nil
|
local copy_mode = nil
|
||||||
if wezterm.gui then
|
if wezterm.gui then
|
||||||
copy_mode = wezterm.gui.default_key_tables().copy_mode
|
copy_mode = wezterm.gui.default_key_tables().copy_mode
|
||||||
table.insert(
|
table.insert(copy_mode, {
|
||||||
copy_mode,
|
key = "z",
|
||||||
{
|
mods = keymod,
|
||||||
key = 'z',
|
action = act.CopyMode({ MoveBackwardZoneOfType = "Output" }),
|
||||||
mods = keymod,
|
})
|
||||||
action = act.CopyMode { MoveBackwardZoneOfType = 'Output' },
|
|
||||||
}
|
|
||||||
)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function module.apply_to_config(config)
|
function module.apply_to_config(config)
|
||||||
@ -44,20 +41,20 @@ function module.apply_to_config(config)
|
|||||||
-- It also makes use of key tables which is defined after.
|
-- It also makes use of key tables which is defined after.
|
||||||
config.keys = {
|
config.keys = {
|
||||||
-- Clipboard
|
-- Clipboard
|
||||||
{ key = "c", mods = keymod, action = act.CopyTo("Clipboard") },
|
{ key = "c", mods = keymod, action = act.CopyTo("Clipboard") },
|
||||||
{ key = "v", mods = keymod, action = act.PasteFrom("Clipboard") },
|
{ key = "v", mods = keymod, action = act.PasteFrom("Clipboard") },
|
||||||
|
|
||||||
-- Font resize.
|
-- Font resize.
|
||||||
{ key = "+", mods = keymod, action = act.IncreaseFontSize },
|
{ key = "+", mods = keymod, action = act.IncreaseFontSize },
|
||||||
{ key = "_", mods = keymod, action = act.DecreaseFontSize },
|
{ key = "_", mods = keymod, action = act.DecreaseFontSize },
|
||||||
{ key = ")", mods = keymod, action = act.ResetFontSize },
|
{ key = ")", mods = keymod, action = act.ResetFontSize },
|
||||||
|
|
||||||
-- Scrollback
|
-- Scrollback
|
||||||
{ key = "j", mods = keymod, action = act.ScrollByPage(1) },
|
{ key = "j", mods = keymod, action = act.ScrollByPage(1) },
|
||||||
{ key = "k", mods = keymod, action = act.ScrollByPage(-1) },
|
{ key = "k", mods = keymod, action = act.ScrollByPage(-1) },
|
||||||
{ key = "j", mods = "CTRL|ALT", action = act.ScrollToPrompt(1) },
|
{ key = "j", mods = "CTRL|ALT", action = act.ScrollToPrompt(1) },
|
||||||
{ key = "k", mods = "CTRL|ALT", action = act.ScrollToPrompt(-1) },
|
{ key = "k", mods = "CTRL|ALT", action = act.ScrollToPrompt(-1) },
|
||||||
{ key = "G", mods = keymod, action = act.ScrollToBottom },
|
{ key = "G", mods = keymod, action = act.ScrollToBottom },
|
||||||
{ key = "g", mods = "CTRL|ALT", action = act.ScrollToTop },
|
{ key = "g", mods = "CTRL|ALT", action = act.ScrollToTop },
|
||||||
|
|
||||||
-- Pane navigation.
|
-- Pane navigation.
|
||||||
@ -82,21 +79,21 @@ function module.apply_to_config(config)
|
|||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
|
|
||||||
{ key = "h", mods = keymod, action = act.ActivatePaneDirection("Left") },
|
{ key = "h", mods = keymod, action = act.ActivatePaneDirection("Left") },
|
||||||
{ key = "l", mods = keymod, action = act.ActivatePaneDirection("Right") },
|
{ key = "l", mods = keymod, action = act.ActivatePaneDirection("Right") },
|
||||||
{ key = "LeftArrow", mods = keymod, action = act.ActivatePaneDirection("Left") },
|
{ key = "LeftArrow", mods = keymod, action = act.ActivatePaneDirection("Left") },
|
||||||
{ key = "DownArrow", mods = keymod, action = act.ActivatePaneDirection("Down") },
|
{ key = "DownArrow", mods = keymod, action = act.ActivatePaneDirection("Down") },
|
||||||
{ key = "UpArrow", mods = keymod, action = act.ActivatePaneDirection("Up") },
|
{ key = "UpArrow", mods = keymod, action = act.ActivatePaneDirection("Up") },
|
||||||
{ key = "RightArrow", mods = keymod, action = act.ActivatePaneDirection("Right") },
|
{ key = "RightArrow", mods = keymod, action = act.ActivatePaneDirection("Right") },
|
||||||
{ key = "^", mods = keymod, action = act.ActivateLastTab },
|
{ key = "^", mods = keymod, action = act.ActivateLastTab },
|
||||||
|
|
||||||
-- More pane-related niceties.
|
-- More pane-related niceties.
|
||||||
{ key = "f", mods = "LEADER", action = act.TogglePaneZoomState },
|
{ key = "f", mods = "LEADER", action = act.TogglePaneZoomState },
|
||||||
{ key = "f", mods = keymod, action = act.TogglePaneZoomState },
|
{ key = "f", mods = keymod, action = act.TogglePaneZoomState },
|
||||||
{ key = "n", mods = "LEADER", action = act.SplitHorizontal({ domain = "CurrentPaneDomain" }) },
|
{ key = "n", mods = "LEADER", action = act.SplitHorizontal({ domain = "CurrentPaneDomain" }) },
|
||||||
{ key = "n", mods = keymod, action = act.SplitHorizontal({ domain = "CurrentPaneDomain" }) },
|
{ key = "n", mods = keymod, action = act.SplitHorizontal({ domain = "CurrentPaneDomain" }) },
|
||||||
{ key = "n", mods = alt_keymod, action = act.SplitVertical({ domain = "CurrentPaneDomain" }) },
|
{ key = "n", mods = alt_keymod, action = act.SplitVertical({ domain = "CurrentPaneDomain" }) },
|
||||||
{ key = "d", mods = keymod, action = act.CloseCurrentPane({ confirm = false }) },
|
{ key = "d", mods = keymod, action = act.CloseCurrentPane({ confirm = false }) },
|
||||||
|
|
||||||
-- Tab navigation
|
-- Tab navigation
|
||||||
{
|
{
|
||||||
@ -109,12 +106,12 @@ function module.apply_to_config(config)
|
|||||||
one_shot = true,
|
one_shot = true,
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
{ mods = alt_keymod, key = "h", action = act.ActivateTabRelative(-1) },
|
{ mods = alt_keymod, key = "h", action = act.ActivateTabRelative(-1) },
|
||||||
{ mods = alt_keymod, key = "j", action = act.ActivateTab(-1) },
|
{ mods = alt_keymod, key = "j", action = act.ActivateTab(-1) },
|
||||||
{ mods = alt_keymod, key = "k", action = act.ActivateTab(0) },
|
{ mods = alt_keymod, key = "k", action = act.ActivateTab(0) },
|
||||||
{ mods = alt_keymod, key = "l", action = act.ActivateTabRelative(1) },
|
{ mods = alt_keymod, key = "l", action = act.ActivateTabRelative(1) },
|
||||||
{ key = "t", mods = alt_keymod, action = act.ShowTabNavigator },
|
{ key = "t", mods = alt_keymod, action = act.ShowTabNavigator },
|
||||||
{ key = "d", mods = alt_keymod, action = act.CloseCurrentTab({ confirm = false }) },
|
{ key = "d", mods = alt_keymod, action = act.CloseCurrentTab({ confirm = false }) },
|
||||||
|
|
||||||
-- Hints and quick selections
|
-- Hints and quick selections
|
||||||
{
|
{
|
||||||
@ -128,32 +125,32 @@ function module.apply_to_config(config)
|
|||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
|
|
||||||
{ key = "h", mods = "ALT", action = act.AdjustPaneSize({ "Left", 1 }) },
|
{ key = "h", mods = "ALT", action = act.AdjustPaneSize({ "Left", 1 }) },
|
||||||
{ key = "j", mods = "ALT", action = act.AdjustPaneSize({ "Down", 1 }) },
|
{ key = "j", mods = "ALT", action = act.AdjustPaneSize({ "Down", 1 }) },
|
||||||
{ key = "k", mods = "ALT", action = act.AdjustPaneSize({ "Up", 1 }) },
|
{ key = "k", mods = "ALT", action = act.AdjustPaneSize({ "Up", 1 }) },
|
||||||
{ key = "l", mods = "ALT", action = act.AdjustPaneSize({ "Right", 1 }) },
|
{ key = "l", mods = "ALT", action = act.AdjustPaneSize({ "Right", 1 }) },
|
||||||
|
|
||||||
{ key = "r", mods = keymod, action = act.ReloadConfiguration },
|
{ key = "r", mods = keymod, action = act.ReloadConfiguration },
|
||||||
{ key = "o", mods = keymod, action = act.ShowDebugOverlay },
|
{ key = "o", mods = keymod, action = act.ShowDebugOverlay },
|
||||||
{ key = "p", mods = keymod, action = act.ActivateCommandPalette },
|
{ key = "p", mods = keymod, action = act.ActivateCommandPalette },
|
||||||
{ key = "y", mods = keymod, action = act.ActivateCopyMode },
|
{ key = "y", mods = keymod, action = act.ActivateCopyMode },
|
||||||
{ key = "e", mods = keymod, action = act.EmitEvent("view-last-output-in-new-pane") },
|
{ key = "e", mods = keymod, action = act.EmitEvent("view-last-output-in-new-pane") },
|
||||||
|
|
||||||
-- Selection
|
-- Selection
|
||||||
{ key = "Space", mods = "LEADER", action = act.QuickSelect },
|
{ key = "Space", mods = "LEADER", action = act.QuickSelect },
|
||||||
{ key = "a", mods = keymod, action = act.QuickSelect },
|
{ key = "a", mods = keymod, action = act.QuickSelect },
|
||||||
{ key = "s", mods = keymod, action = act.Search({ CaseSensitiveString = "" }) },
|
{ key = "s", mods = keymod, action = act.Search({ CaseSensitiveString = "" }) },
|
||||||
}
|
}
|
||||||
|
|
||||||
config.key_tables = {
|
config.key_tables = {
|
||||||
hints = {
|
hints = {
|
||||||
{ key = "g", action = act.Search({ Regex = "[0-9a-f]{6,}" }) },
|
{ key = "g", action = act.Search({ Regex = "[0-9a-f]{6,}" }) },
|
||||||
{
|
{
|
||||||
key = "h",
|
key = "h",
|
||||||
action = act.QuickSelectArgs({
|
action = act.QuickSelectArgs({
|
||||||
patterns = {
|
patterns = {
|
||||||
"[0-9a-f]{7,40}", -- SHA1 hashes, usually used for Git.
|
"[0-9a-f]{7,40}", -- SHA1 hashes, usually used for Git.
|
||||||
"[0-9a-f]{7,64}", -- SHA256 hashes, used often for getting hashes for Guix packaging.
|
"[0-9a-f]{7,64}", -- SHA256 hashes, used often for getting hashes for Guix packaging.
|
||||||
"sha256-[[:alpha:][:digit:]-=+/?]{44}", -- SHA256 hashes in Base64, used often in getting hashes for Nix packaging.
|
"sha256-[[:alpha:][:digit:]-=+/?]{44}", -- SHA256 hashes in Base64, used often in getting hashes for Nix packaging.
|
||||||
"[[:alpha:][:digit:]-=+/?]{44,64}",
|
"[[:alpha:][:digit:]-=+/?]{44,64}",
|
||||||
},
|
},
|
||||||
@ -181,8 +178,8 @@ function module.apply_to_config(config)
|
|||||||
},
|
},
|
||||||
|
|
||||||
{ key = "Space", action = act.QuickSelect },
|
{ key = "Space", action = act.QuickSelect },
|
||||||
{ key = "s", action = act.QuickSelect },
|
{ key = "s", action = act.QuickSelect },
|
||||||
{ key = "f", action = act.Search({ CaseSensitiveString = "" }) },
|
{ key = "f", action = act.Search({ CaseSensitiveString = "" }) },
|
||||||
},
|
},
|
||||||
|
|
||||||
pane_navigation = {
|
pane_navigation = {
|
||||||
@ -204,13 +201,13 @@ function module.apply_to_config(config)
|
|||||||
},
|
},
|
||||||
|
|
||||||
resize_pane = {
|
resize_pane = {
|
||||||
{ key = "h", action = act.AdjustPaneSize({ "Left", 1 }) },
|
{ key = "h", action = act.AdjustPaneSize({ "Left", 1 }) },
|
||||||
{ key = "j", action = act.AdjustPaneSize({ "Down", 1 }) },
|
{ key = "j", action = act.AdjustPaneSize({ "Down", 1 }) },
|
||||||
{ key = "k", action = act.AdjustPaneSize({ "Up", 1 }) },
|
{ key = "k", action = act.AdjustPaneSize({ "Up", 1 }) },
|
||||||
{ key = "l", action = act.AdjustPaneSize({ "Right", 1 }) },
|
{ key = "l", action = act.AdjustPaneSize({ "Right", 1 }) },
|
||||||
{ key = "q", action = act.PopKeyTable },
|
{ key = "q", action = act.PopKeyTable },
|
||||||
{ key = "Escape", action = act.PopKeyTable },
|
{ key = "Escape", action = act.PopKeyTable },
|
||||||
{ key = "Enter", action = act.PopKeyTable },
|
{ key = "Enter", action = act.PopKeyTable },
|
||||||
},
|
},
|
||||||
|
|
||||||
copy_mode = copy_mode,
|
copy_mode = copy_mode,
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
local config = require("wezterm").config_builder()
|
local config = require("wezterm").config_builder()
|
||||||
config:set_strict_mode(true)
|
config:set_strict_mode(true)
|
||||||
|
|
||||||
|
|
||||||
require("config/events").apply_to_config(config)
|
require("config/events").apply_to_config(config)
|
||||||
require("config/base").apply_to_config(config)
|
require("config/base").apply_to_config(config)
|
||||||
require("config/keys").apply_to_config(config)
|
require("config/keys").apply_to_config(config)
|
||||||
|
Loading…
Reference in New Issue
Block a user