1
0
Fork 0

Compare commits

..

2 commits

Author SHA1 Message Date
d467f1668b
Update deps
All checks were successful
Build / build-arm64-linux (push) Successful in 9m24s
Build / build-amd64-linux (push) Successful in 32m58s
2023-10-10 18:10:09 +02:00
d2466f74cd
wezterm/nvim: only enable ligatures in nvim pane 2023-10-10 18:08:23 +02:00
4 changed files with 59 additions and 22 deletions

View file

@ -282,11 +282,11 @@
]
},
"locked": {
"lastModified": 1696737557,
"narHash": "sha256-YD/pjDjj/BNmisEvRdM/vspkCU3xyyeGVAUWhvVSi5Y=",
"lastModified": 1696940889,
"narHash": "sha256-p2Wic74A1tZpFcld1wSEbFQQbrZ/tPDuLieCnspamQo=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "3c1d8758ac3f55ab96dcaf4d271c39da4b6e836d",
"rev": "6bba64781e4b7c1f91a733583defbd3e46b49408",
"type": "github"
},
"original": {
@ -385,11 +385,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1696614066,
"narHash": "sha256-nAyYhO7TCr1tikacP37O9FnGr2USOsVBD3IgvndUYjM=",
"lastModified": 1696951896,
"narHash": "sha256-QTXye5EpcANIG82qlcIR6UbDcWYRsO34JdfIOALOKyk=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "bb2db418b616fea536b1be7f6ee72fb45c11afe0",
"rev": "6ea13c2df412306793311f8b8c58f5cd9127fb55",
"type": "github"
},
"original": {

View file

@ -12,5 +12,9 @@
"")]
(wezterm.set_tab_title title)))
:group augroup})
(aucmd :VimLeavePre {:callback #(wezterm.set_tab_title "") :group augroup})))
(aucmd :VimEnter {:callback #(wezterm.set_user_var :enable-ligatures :t)
:group augroup})
(aucmd :VimLeavePre {:callback (fn []
(wezterm.set_user_var :enable-ligatures :f)
(wezterm.set_tab_title ""))
:group augroup})))

View file

@ -12,7 +12,11 @@
:elixir "#A074C4"
:nix "#7EBAE4"
:reddit "#FA4400"
:ssh "#F4C82D"}]
:ssh "#F4C82D"}
enable-ligatures-flags [:calt=1 :clig=1 :liga=1]
disable-ligatures-flags [:calt=0 :clig=0 :liga=0]]
(var ligature-panes [])
(var latest-pane-update nil)
;; Event: Tab format
(fn extract-tab-title [tab]
@ -87,6 +91,36 @@
{:Text title}
; Right
{:Text " "}]))))
(wezterm.on :update-status
(fn [window pane]
(local pane-id (pane:pane_id))
(when (not= latest-pane-update pane-id)
(let [overrides (or (window:get_config_overrides) {})]
(set latest-pane-update pane-id)
(if (. ligature-panes pane-id)
(do
(set overrides.harfbuzz_features
enable-ligatures-flags)
(window:set_config_overrides overrides))
(do
(set overrides.harfbuzz_features
disable-ligatures-flags)
(window:set_config_overrides overrides)))))))
(wezterm.on :user-var-changed
(fn [window pane name value]
(let [overrides (or (window:get_config_overrides) {})
pane-id (pane:pane_id)]
(case [name value]
[:enable-ligatures :t] (do
(set overrides.harfbuzz_features
enable-ligatures-flags)
(tset ligature-panes pane-id true)
(window:set_config_overrides overrides))
[:enable-ligatures :f] (do
(set overrides.harfbuzz_features
disable-ligatures-flags)
(tset ligature-panes pane-id nil)
(window:set_config_overrides overrides))))))
;; Configuration
{:default_prog [_G.shells.fish :--interactive]
;; Appearance
@ -106,9 +140,7 @@
:inactive_titlebar_bg colors.frame-background
:font (wezterm.font {:family "Berkeley Mono"
:weight :Regular
:harfbuzz_features [:calt=0
:clig=0
:liga=0]})
:harfbuzz_features disable-ligatures-flags})
:font_size 11}
:colors {:tab_bar {:background colors.frame-background
:inactive_tab_edge colors.frame-background
@ -129,6 +161,7 @@
:line_height 0.95
:freetype_load_target :Light
;:freetype_render_target :HorizontalLcd
:harfbuzz_features disable-ligatures-flags
:allow_square_glyphs_to_overflow_width :WhenFollowedBySpace
;; Keys
:keys [{:key :UpArrow

View file

@ -30,12 +30,12 @@ in
};
mini-nvim = buildVimPlugin {
pname = "mini.nvim";
version = "2023-10-09";
version = "2023-10-10";
src = fetchFromGitHub {
owner = "echasnovski";
repo = "mini.nvim";
rev = "0c50ef9d0b7cae1145f3365e7bcf9ed01bc00005";
sha256 = "1il169wvz995k42is9b6baz5ii0fh6513q42qmv927s04k6vja0w";
rev = "8b43796d93b09c9f63076c69664e585d7ef28b62";
sha256 = "1qnxv138j1ai58h7nzk4x422ymvxgbfag8bc2f9xygnnbkj37ja1";
fetchSubmodules = false;
};
};
@ -96,12 +96,12 @@ in
};
substitute-nvim = buildVimPlugin {
pname = "substitute.nvim";
version = "2023-10-09";
version = "2023-10-10";
src = fetchFromGitHub {
owner = "gbprod";
repo = "substitute.nvim";
rev = "523047fac696ab2acdbfd6fec707587c64d6f9d7";
sha256 = "02c1w2yqi1dir59rvxyiyp9vk4r9n0vffvk3gm0lh31b9nf2lfhc";
rev = "bdf09243f6a1374b1c05c4b66ff944c118bf64bd";
sha256 = "17q67h27r1rc3a0rms9aa8apwvm7f89kyqnlpb8lmqmy491cfg6i";
fetchSubmodules = false;
};
};
@ -122,8 +122,8 @@ in
src = fetchFromGitHub {
owner = "nvim-treesitter";
repo = "nvim-treesitter";
rev = "34e6ace726fb7dfeb9e8e2d260111b7d2b616778";
sha256 = "1kignbgzhy1dzdjfw3ilwg14wa907q58higzcdlj3yl37vwqd9s1";
rev = "0eb1a0ad1c82e080e77e7b9d7a5e42632cefb543";
sha256 = "0fa51cfn17qkmgmnwa7ml0vg17az8qj0iqn8mypfn1yc5qz7ikyi";
fetchSubmodules = false;
};
};
@ -290,8 +290,8 @@ in
src = fetchFromGitHub {
owner = "stevearc";
repo = "conform.nvim";
rev = "fcd272ca731db1813c8da0a88b86db134e642fd3";
sha256 = "025l5ld2r24xncmygr0znhkd8yq7j7pbnyxl8ddqbywqijplkib8";
rev = "80f2f70740431b07d725cc66f63abbfd66aaae6d";
sha256 = "0sxyzsmr0qbfpkd992fz8ma1hm9y5w9k5b346sbh7p4c5v57vqpr";
fetchSubmodules = false;
};
};