Compare commits

..

5 Commits

14 changed files with 238 additions and 108 deletions

View File

@ -1,6 +1,6 @@
{
"LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" },
"ale": { "branch": "master", "commit": "6c337ad19ca32fcb11ff7f29a8e68598763b59a2" },
"ale": { "branch": "master", "commit": "e5d6d94f71003e4d0d3b1c77cc4e2514b415e9f9" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" },
"cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" },
@ -8,31 +8,34 @@
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
"dhall-vim": { "branch": "master", "commit": "bd9fd99f21dbc7174fb728a21d04e073ef7dd930" },
"editorconfig-vim": { "branch": "master", "commit": "3c2813f2566d9392ff3614248c5db43c3fda9d5f" },
"editorconfig-vim": { "branch": "master", "commit": "91bd0b0a2c6a72a110ab9feae335e1224480c233" },
"friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" },
"harpoon": { "branch": "master", "commit": "1bc17e3e42ea3c46b33c0bbad6a880792692a1b3" },
"lazy.nvim": { "branch": "main", "commit": "d8f26efd456190241afd1b0f5235fe6fdba13d4a" },
"lazy.nvim": { "branch": "main", "commit": "f15a93907ddad3d9139aea465ae18336d87f5ce6" },
"legendary.nvim": { "branch": "master", "commit": "f0067589b9e6de063afac707451689aa13cf6aff" },
"lua-utils.nvim": { "branch": "main", "commit": "e565749421f4bbb5d2e85e37c3cef9d56553d8bd" },
"lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" },
"lualine.nvim": { "branch": "master", "commit": "f4f791f67e70d378a754d02da068231d2352e5bc" },
"lush.nvim": { "branch": "main", "commit": "45a79ec4acb5af783a6a29673a999ce37f00497e" },
"neorg": { "branch": "main", "commit": "ed43ed58116caa0a17bbbc7aa663e32bf94bc531" },
"nui.nvim": { "branch": "main", "commit": "53e907ffe5eedebdca1cd503b00aa8692068ca46" },
"nvim-cmp": { "branch": "main", "commit": "12509903a5723a876abd65953109f926f4634c30" },
"nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" },
"nvim-dap": { "branch": "master", "commit": "ead0de6eac91a555b714bfd7d28959eeecfb96f9" },
"nvim-lspconfig": { "branch": "master", "commit": "1f941b3668151963fca3e1230922c433ea4b7b64" },
"nvim-dap": { "branch": "master", "commit": "52302f02fea3a490e55475de52fa4deb8af2eb11" },
"nvim-lspconfig": { "branch": "master", "commit": "6c17f8656f667727b27f5f598463afedb7791b18" },
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
"nvim-treesitter": { "branch": "master", "commit": "043d5fb1505ca4bc0f48b42666ae7ebc4bb1a671" },
"nvim-treesitter": { "branch": "master", "commit": "6d957c22cb48a734b009a69d03c18d20042c4754" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "ad8f0a472148c3e0ae9851e26a722ee4e29b1595" },
"nvim-web-devicons": { "branch": "master", "commit": "1c9136332840edee0c593f2f4f89598c8ed97f5f" },
"oil.nvim": { "branch": "master", "commit": "add50252b5e9147c0a09d36480d418c7e2737472" },
"nvim-web-devicons": { "branch": "master", "commit": "1020869742ecb191f260818234517f4a1515cfe8" },
"oil.nvim": { "branch": "master", "commit": "5313690956d27cc6b53d5a2583df05e717c59b16" },
"pathlib.nvim": { "branch": "main", "commit": "57e5598af6fe253761c1b48e0b59b7cd6699e2c1" },
"plenary.nvim": { "branch": "master", "commit": "3707cdb1e43f5cea73afb6037e6494e7ce847a66" },
"snacks.nvim": { "branch": "main", "commit": "b72364f916905bbb355d5105d364e96de118766d" },
"telescope.nvim": { "branch": "master", "commit": "415af52339215926d705cccc08145f3782c4d132" },
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
"smart-splits.nvim": { "branch": "master", "commit": "4a231987665d3c6e02ca88833d050e918afe3e1e" },
"snacks.nvim": { "branch": "main", "commit": "1491b543ef1d8a0eb29a6ebc35db4fb808dcb47f" },
"sqlite.lua": { "branch": "master", "commit": "b487fcc8937b683942a1f7d9662fcf50ca5acd58" },
"telescope.nvim": { "branch": "master", "commit": "78857db9e8d819d3cc1a9a7bdc1d39d127a36495" },
"vim-gitgutter": { "branch": "main", "commit": "7b0b5098e3e57be86bb96cfbf2b8902381eef57c" },
"vim-nix": { "branch": "master", "commit": "e25cd0f2e5922f1f4d3cd969f92e35a9a327ffb0" },
"vim-nix": { "branch": "master", "commit": "7235c7ce2cea530cb6b59bc3e46d4bfe917d15c8" },
"vimspector": { "branch": "master", "commit": "5e24df822e278ee79abfc8c7110089a5322d1a3c" },
"which-key.nvim": { "branch": "main", "commit": "6cebd86917df559a88de0f806b2989799c6e6423" },
"which-key.nvim": { "branch": "main", "commit": "0e76a87ac51772569aec678dc74baa8e2a86100c" },
"zig.vim": { "branch": "master", "commit": "f023e86b042c0d5bef68b9f0651144a6bf6d642e" }
}

View File

@ -0,0 +1,5 @@
local M = {}
M.utils = require("foodogsquared.utils")
return M

View File

@ -0,0 +1,7 @@
local M = {}
function M:to_bool(v)
return not not v
end
return M

View File

@ -302,10 +302,10 @@ return lush(function()
sassMixinName({ fg = base0D }),
-- Spelling highlighting
SpellBad({ gui = "undercurl" }), --, base08)
SpellBad({ gui = "undercurl" }), --, base08)
SpellLocal({ gui = "undercurl" }), --, base0C)
SpellCap({ gui = "undercurl" }), --, base0D)
SpellRare({ gui = "undercurl" }), --, base0E)
SpellCap({ gui = "undercurl" }), --, base0D)
SpellRare({ gui = "undercurl" }), --, base0E)
-- Startify highlighting
StartifyBracket({ fg = base03 }),

View File

@ -26,7 +26,7 @@ return {
{ "~/library/writings" },
},
},
fzf = { },
fzf = {},
},
})
@ -51,13 +51,64 @@ return {
})
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("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>fv",
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>fG",
function ()
builtins.live_grep({
cwd = require("telescope.utils").buffer_dir()
})
end,
{ noremap = true, desc = "Grep for string in current directory" }
)
vim.keymap.set(
"n",
"<leader>fb",
get_builtin("buffers", { ignore_current_buffer = true }),
{ noremap = true, desc = "Search currently opened buffers" }
)
vim.keymap.set(
"n",
"<leader>fB",
function ()
builtins.buffers({
cwd = require("telescope.utils").buffer_dir(),
ignore_current_buffer = true,
show_all_buffers = false,
only_cwd = true,
})
end,
{ noremap = true, desc = "Search currently opened buffers in current directory" }
)
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>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" })
@ -69,7 +120,12 @@ return {
{
"ThePrimeagen/harpoon",
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")
if has_telescope then

View File

@ -35,5 +35,5 @@ return {
},
},
},
}
},
}

View File

@ -1,3 +1,5 @@
local _fds = require("../foodogsquared")
return {
{
"folke/snacks.nvim",
@ -20,7 +22,7 @@ return {
},
input = { enabled = true },
notifier = { enabled = true },
git = { enabled = true, },
git = { enabled = true },
lazygit = {
enabled = vim.fn.executable("lazygit") == 1,
},
@ -35,9 +37,27 @@ return {
words = { enabled = true },
},
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>gf", function() Snacks.lazygit.log_file() end, desc = "Open current file history in lazygit" },
{
"<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>gf",
function()
Snacks.lazygit.log_file()
end,
desc = "Open current file history in lazygit",
},
},
init = function()
vim.api.nvim_create_autocmd("User", {
@ -58,7 +78,9 @@ return {
Snacks.toggle.option("relativenumber", { name = "Relative number" }):map("<leader>uL")
Snacks.toggle.diagnostics():map("<leader>ud")
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.option("background", { off = "light", on = "dark", name = "Dark style" }):map("<leader>ub")
Snacks.toggle.inlay_hints():map("<leader>uh")
@ -69,6 +91,7 @@ return {
end,
},
-- Oil and vinegar goes well as oil and your computer.
{
"stevearc/oil.nvim",
dependencies = {
@ -80,13 +103,44 @@ return {
default_file_explorer = true,
columns = { "icon", "permissions" },
view_options = {
hidden = true,
show_hidden = true,
},
},
keys = {
{ "-", "<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" },
},
},
},
{
"mrjones2014/smart-splits.nvim",
version = ">=1.0.0",
lazy = _fds.utils.to_bool(os.getenv("WEZTERM_CONFIG_DIR")),
keys = {
{ "<C-h>",
function() require("smart-splits").move_cursor_left() end, { desc = "smart-splits move cursor left" } },
{ "<C-j>",
function() require("smart-splits").move_cursor_down() end, { desc = "smart-splits move cursor down" } },
{ "<C-k>",
function() require("smart-splits").move_cursor_up() end, { desc = "smart-splits move cursor up" } },
{ "<C-l>",
function() require("smart-splits").move_cursor_right() end, { desc = "smart-splits move cursor right" } },
{ "<C-\\>",
function() require("smart-splits").move_cursor_previous() end, { desc = "smart-splits move cursor previous" } },
},
},
{
"mrjones2014/legendary.nvim",
version = ">=2.0.0",
dependencies = { 'kkharji/sqlite.lua' },
priority = 10000,
},
}

View File

@ -1,2 +1 @@
return {
}
return {}

View File

@ -31,14 +31,14 @@ return {
highlight_current_scope = { enable = false },
highlight_definitions = { clear_on_cursor_move = true, enable = true },
navigation = {
enable = true,
keymaps = {
goto_definition = "gnd",
goto_next_usage = "<a-*>",
goto_previous_usage = "<a-#>",
list_definitions = "gnD",
list_definitions_toc = "gO",
},
enable = true,
keymaps = {
goto_definition = "gnd",
goto_next_usage = "<a-*>",
goto_previous_usage = "<a-#>",
list_definitions = "gnD",
list_definitions_toc = "gO",
},
},
smart_rename = { enable = true, keymaps = { smart_rename = "grr" } },
textobjects = {

View File

@ -7,10 +7,8 @@ local wezterm = require("wezterm")
-- same code fetching the colors all over various config files.
local xdg_data_home = os.getenv("XDG_DATA_HOME") or "~/.local/share"
local theme_dir = xdg_data_home .. "/base16/bark-on-a-tree"
local light_scheme, light_scheme_metadata =
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 light_scheme, light_scheme_metadata = 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 function scheme_for_appearance()
-- We're just following the default XDG appearance spec.
@ -75,7 +73,7 @@ function module.apply_to_config(config)
-- Configuring the windows padding.
config.window_padding = {
left = 0,
right = '1cell',
right = "1cell",
top = 0,
bottom = 0,
}

View File

@ -5,8 +5,8 @@ function module.apply_to_config(config)
-- Quick select-related options. Quite similar to Kitty hints which is
-- nice.
config.quick_select_patterns = {
"[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,40}", -- SHA1 hashes, usually used for Git.
"[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.
}
@ -14,7 +14,7 @@ function module.apply_to_config(config)
config.check_for_updates = false
-- 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.front_end = "WebGpu"
config.force_reverse_video_cursor = true
@ -22,6 +22,7 @@ function module.apply_to_config(config)
-- Use some IME.
config.use_ime = true
config.xim_im_name = "ibus"
-- Set up the visual bell.
config.audible_bell = "SystemBeep"

View File

@ -44,7 +44,7 @@ function module.apply_to_config(config)
end)
-- 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 {})
window:gui_window():maximize()
end)

View File

@ -9,14 +9,11 @@ local module = {}
local copy_mode = nil
if wezterm.gui then
copy_mode = wezterm.gui.default_key_tables().copy_mode
table.insert(
copy_mode,
{
key = 'z',
mods = keymod,
action = act.CopyMode { MoveBackwardZoneOfType = 'Output' },
}
)
table.insert(copy_mode, {
key = "z",
mods = keymod,
action = act.CopyMode({ MoveBackwardZoneOfType = "Output" }),
})
end
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.
config.keys = {
-- Clipboard
{ key = "c", mods = keymod, action = act.CopyTo("Clipboard") },
{ key = "v", mods = keymod, action = act.PasteFrom("Clipboard") },
{ key = "c", mods = keymod, action = act.CopyTo("Clipboard") },
{ key = "v", mods = keymod, action = act.PasteFrom("Clipboard") },
-- Font resize.
{ key = "+", mods = keymod, action = act.IncreaseFontSize },
{ key = "_", mods = keymod, action = act.DecreaseFontSize },
{ key = ")", mods = keymod, action = act.ResetFontSize },
{ key = "+", mods = keymod, action = act.IncreaseFontSize },
{ key = "_", mods = keymod, action = act.DecreaseFontSize },
{ key = ")", mods = keymod, action = act.ResetFontSize },
-- Scrollback
{ key = "j", mods = keymod, action = act.ScrollByPage(1) },
{ key = "k", mods = keymod, action = act.ScrollByPage(-1) },
{ key = "j", mods = keymod, action = act.ScrollByPage(1) },
{ key = "k", mods = keymod, action = act.ScrollByPage(-1) },
{ key = "j", 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 },
-- Pane navigation.
@ -82,21 +79,21 @@ function module.apply_to_config(config)
}),
},
{ key = "h", mods = keymod, action = act.ActivatePaneDirection("Left") },
{ key = "l", mods = keymod, action = act.ActivatePaneDirection("Right") },
{ key = "LeftArrow", mods = keymod, action = act.ActivatePaneDirection("Left") },
{ key = "DownArrow", mods = keymod, action = act.ActivatePaneDirection("Down") },
{ key = "UpArrow", mods = keymod, action = act.ActivatePaneDirection("Up") },
{ key = "RightArrow", mods = keymod, action = act.ActivatePaneDirection("Right") },
{ key = "^", mods = keymod, action = act.ActivateLastTab },
{ key = "h", mods = keymod, action = act.ActivatePaneDirection("Left") },
{ key = "l", mods = keymod, action = act.ActivatePaneDirection("Right") },
{ key = "LeftArrow", mods = keymod, action = act.ActivatePaneDirection("Left") },
{ key = "DownArrow", mods = keymod, action = act.ActivatePaneDirection("Down") },
{ key = "UpArrow", mods = keymod, action = act.ActivatePaneDirection("Up") },
{ key = "RightArrow", mods = keymod, action = act.ActivatePaneDirection("Right") },
{ key = "^", mods = keymod, action = act.ActivateLastTab },
-- More pane-related niceties.
{ key = "f", mods = "LEADER", action = act.TogglePaneZoomState },
{ key = "f", mods = keymod, action = act.TogglePaneZoomState },
{ key = "n", mods = "LEADER", 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 = "d", mods = keymod, action = act.CloseCurrentPane({ confirm = false }) },
{ key = "f", mods = "LEADER", action = act.TogglePaneZoomState },
{ key = "f", mods = keymod, action = act.TogglePaneZoomState },
{ key = "n", mods = "LEADER", 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 = "d", mods = keymod, action = act.CloseCurrentPane({ confirm = false }) },
-- Tab navigation
{
@ -109,12 +106,12 @@ function module.apply_to_config(config)
one_shot = true,
}),
},
{ mods = alt_keymod, key = "h", action = act.ActivateTabRelative(-1) },
{ mods = alt_keymod, key = "j", action = act.ActivateTab(-1) },
{ mods = alt_keymod, key = "k", action = act.ActivateTab(0) },
{ mods = alt_keymod, key = "l", action = act.ActivateTabRelative(1) },
{ key = "t", mods = alt_keymod, action = act.ShowTabNavigator },
{ key = "d", mods = alt_keymod, action = act.CloseCurrentTab({ confirm = false }) },
{ mods = alt_keymod, key = "h", action = act.ActivateTabRelative(-1) },
{ mods = alt_keymod, key = "j", action = act.ActivateTab(-1) },
{ mods = alt_keymod, key = "k", action = act.ActivateTab(0) },
{ mods = alt_keymod, key = "l", action = act.ActivateTabRelative(1) },
{ key = "t", mods = alt_keymod, action = act.ShowTabNavigator },
{ key = "d", mods = alt_keymod, action = act.CloseCurrentTab({ confirm = false }) },
-- Hints and quick selections
{
@ -128,32 +125,32 @@ function module.apply_to_config(config)
}),
},
{ key = "h", mods = "ALT", action = act.AdjustPaneSize({ "Left", 1 }) },
{ key = "j", mods = "ALT", action = act.AdjustPaneSize({ "Down", 1 }) },
{ key = "k", mods = "ALT", action = act.AdjustPaneSize({ "Up", 1 }) },
{ key = "l", mods = "ALT", action = act.AdjustPaneSize({ "Right", 1 }) },
{ key = "h", mods = "ALT", action = act.AdjustPaneSize({ "Left", 1 }) },
{ key = "j", mods = "ALT", action = act.AdjustPaneSize({ "Down", 1 }) },
{ key = "k", mods = "ALT", action = act.AdjustPaneSize({ "Up", 1 }) },
{ key = "l", mods = "ALT", action = act.AdjustPaneSize({ "Right", 1 }) },
{ key = "r", mods = keymod, action = act.ReloadConfiguration },
{ key = "o", mods = keymod, action = act.ShowDebugOverlay },
{ key = "p", mods = keymod, action = act.ActivateCommandPalette },
{ key = "y", mods = keymod, action = act.ActivateCopyMode },
{ key = "e", mods = keymod, action = act.EmitEvent("view-last-output-in-new-pane") },
{ key = "r", mods = keymod, action = act.ReloadConfiguration },
{ key = "o", mods = keymod, action = act.ShowDebugOverlay },
{ key = "p", mods = keymod, action = act.ActivateCommandPalette },
{ key = "y", mods = keymod, action = act.ActivateCopyMode },
{ key = "e", mods = keymod, action = act.EmitEvent("view-last-output-in-new-pane") },
-- Selection
{ key = "Space", mods = "LEADER", action = act.QuickSelect },
{ key = "a", mods = keymod, action = act.QuickSelect },
{ key = "s", mods = keymod, action = act.Search({ CaseSensitiveString = "" }) },
{ key = "a", mods = keymod, action = act.QuickSelect },
{ key = "s", mods = keymod, action = act.Search({ CaseSensitiveString = "" }) },
}
config.key_tables = {
hints = {
{ key = "g", action = act.Search({ Regex = "[0-9a-f]{6,}" }) },
{ key = "g", action = act.Search({ Regex = "[0-9a-f]{6,}" }) },
{
key = "h",
action = act.QuickSelectArgs({
patterns = {
"[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,40}", -- SHA1 hashes, usually used for Git.
"[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.
"[[:alpha:][:digit:]-=+/?]{44,64}",
},
@ -181,8 +178,8 @@ function module.apply_to_config(config)
},
{ key = "Space", action = act.QuickSelect },
{ key = "s", action = act.QuickSelect },
{ key = "f", action = act.Search({ CaseSensitiveString = "" }) },
{ key = "s", action = act.QuickSelect },
{ key = "f", action = act.Search({ CaseSensitiveString = "" }) },
},
pane_navigation = {
@ -204,13 +201,13 @@ function module.apply_to_config(config)
},
resize_pane = {
{ key = "h", action = act.AdjustPaneSize({ "Left", 1 }) },
{ key = "j", action = act.AdjustPaneSize({ "Down", 1 }) },
{ key = "k", action = act.AdjustPaneSize({ "Up", 1 }) },
{ key = "l", action = act.AdjustPaneSize({ "Right", 1 }) },
{ key = "q", action = act.PopKeyTable },
{ key = "h", action = act.AdjustPaneSize({ "Left", 1 }) },
{ key = "j", action = act.AdjustPaneSize({ "Down", 1 }) },
{ key = "k", action = act.AdjustPaneSize({ "Up", 1 }) },
{ key = "l", action = act.AdjustPaneSize({ "Right", 1 }) },
{ key = "q", action = act.PopKeyTable },
{ key = "Escape", action = act.PopKeyTable },
{ key = "Enter", action = act.PopKeyTable },
{ key = "Enter", action = act.PopKeyTable },
},
copy_mode = copy_mode,

View File

@ -8,4 +8,14 @@ require("config/keys").apply_to_config(config)
require("config/appearance").apply_to_config(config)
require("config/mux_server").apply_to_config(config)
local smart_splits = require("wezterm").plugin.require("https://github.com/mrjones2014/smart-splits.nvim")
smart_splits.apply_to_config(config, {
direction_keys = { 'h', 'j', 'k', 'l' },
modifiers = {
move = 'CTRL',
resize = 'META',
},
log_level = 'info',
})
return config