From 65761d7b3f1020554ac871961cc824bfda1426b6 Mon Sep 17 00:00:00 2001 From: Daniel Lundin Date: Tue, 13 Aug 2024 20:21:59 +0200 Subject: [PATCH] ghostty / nvim: font + keybinding tweaks --- files/config/nvim/lua/config/keymaps.lua | 21 +++++++++++++-------- home/common/ghostty.nix | 13 ++++++------- home/common/tmux.nix | 2 +- 3 files changed, 20 insertions(+), 16 deletions(-) diff --git a/files/config/nvim/lua/config/keymaps.lua b/files/config/nvim/lua/config/keymaps.lua index 84bc508..2fb2a64 100644 --- a/files/config/nvim/lua/config/keymaps.lua +++ b/files/config/nvim/lua/config/keymaps.lua @@ -3,12 +3,17 @@ -- Add any additional keymaps here -- C-/ should be comment instead of lazyterm -vim.api.nvim_del_keymap("n", "") -vim.api.nvim_set_keymap("n", "", "gcc", {}) -vim.api.nvim_set_keymap("v", "", "gc", {}) -vim.api.nvim_set_keymap("n", "", "gcgc", {}) -vim.api.nvim_set_keymap("n", "", ",", {}) -vim.api.nvim_set_keymap("n", "zz", "zt", {}) +vim.keymap.del("n", "") +vim.keymap.set({ "n" }, "", "gcc", { remap = true }) +vim.keymap.set({ "v" }, "", "gc", { remap = true }) +vim.keymap.set({ "n" }, "", "gcgc", { remap = true }) +vim.keymap.del({ "n" }, "") +vim.keymap.set({ "n" }, "", "gcc", { remap = true }) +vim.keymap.set({ "v" }, "", "gc", { remap = true }) +vim.keymap.set({ "n" }, "", "gcgc", { remap = true }) -vim.api.nvim_set_keymap("n", "[d", ":lua vim.diagnostic.goto_prev { float = false }", {}) -vim.api.nvim_set_keymap("n", "]d", ":lua vim.diagnostic.goto_next { float = false }", {}) +vim.keymap.set("n", "", ",", {}) +vim.keymap.set("n", "zz", "zt", {}) + +vim.keymap.set("n", "[d", ":lua vim.diagnostic.goto_prev { float = false }", {}) +vim.keymap.set("n", "]d", ":lua vim.diagnostic.goto_next { float = false }", {}) diff --git a/home/common/ghostty.nix b/home/common/ghostty.nix index 4372aa0..0d788f2 100644 --- a/home/common/ghostty.nix +++ b/home/common/ghostty.nix @@ -30,12 +30,11 @@ in enable = true; settings = { font-size = 14; - font-family = "BerkeleyMono Nerd Font"; - font-feature = [ - # "ss02", -- Clean zero - "ss03" # Slashed zero - # "ss04", -- Cut zero - ]; + font-family = "Berkeley Mono Variable"; + font-codepoint-map = [ "U+2191-U+2195,U+2500-U+259F=BerkeleyMono Nerd Font" ]; + font-family-bold-italic = "Monaspace Xenon"; + font-style-bold-italic = "ExtraLight Italic"; + font-variation-italic = [ "wght=100" ]; mouse-hide-while-typing = true; cursor-style = "block"; @@ -53,7 +52,7 @@ in window-theme = "system"; keybind = [ - "alt+shift+c=copy_from_clipboard" + "alt+shift+c=copy_to_clipboard" "alt+shift+v=paste_from_clipboard" "ctrl+tab=goto_split:previous" "alt+enter=toggle_fullscreen" diff --git a/home/common/tmux.nix b/home/common/tmux.nix index 2683981..e9552af 100644 --- a/home/common/tmux.nix +++ b/home/common/tmux.nix @@ -4,7 +4,7 @@ enable = true; baseIndex = 0; clock24 = true; - escapeTime = 10; + escapeTime = 500; mouse = true; shortcut = "o"; extraConfig = ''