diff --git a/home/config/nvim/nifoc/keymap.fnl b/home/config/nvim/nifoc/keymap.fnl index 802e423..c463ea0 100644 --- a/home/config/nvim/nifoc/keymap.fnl +++ b/home/config/nvim/nifoc/keymap.fnl @@ -57,7 +57,7 @@ (keymap.set :n :dli :LspInfo {:desc "LSP Info"}) (keymap.set :n :dlr :LspRestart {:desc "Restart LSP"}) (keymap.set :n :ds #(vim.diagnostic.open_float {:scope :line}) - {:desc "Show Diagnostics"}) + {:desc "Show Line Diagnostics"}) (keymap.set :n :dtp :TSPlaygroundToggle {:desc "Toggle Treetsitter Playground"}) ;; Other Mappings diff --git a/home/config/nvim/nifoc/statuscolumn.fnl b/home/config/nvim/nifoc/statuscolumn.fnl index f71f5ca..ec53d69 100644 --- a/home/config/nvim/nifoc/statuscolumn.fnl +++ b/home/config/nvim/nifoc/statuscolumn.fnl @@ -41,7 +41,7 @@ (each [_ diagnostic (pairs diagnostics)] (let [lnum (+ diagnostic.lnum 1) current (cached-sign :diagnostics bufnr lnum)] - (when (or (= current nil) (> diagnostic.severity current.severity)) + (when (or (= current nil) (< diagnostic.severity current.severity)) (tset cache :diagnostics bufnr lnum {:severity diagnostic.severity :col diagnostic.col @@ -59,27 +59,14 @@ (when (= current nil) (tset cache :gitsigns bufnr lnum {:name details.sign_hl_group}))))))) - (aucmd :DiagnosticChanged - {:callback #(let [full-mode (. (api.nvim_get_mode) :mode) - mode (full-mode:sub 1 1)] - (when (not= mode :i) - (update-cache-diagnostics $1.buf $1.data.diagnostics))) - :group augroup - :desc "Update cached diagnostic signs"}) - (aucmd :CursorHold + (aucmd [:BufEnter :CursorHold :CursorHoldI :DiagnosticChanged] {:callback #(update-cache-diagnostics $1.buf (vim.diagnostic.get $1.buf)) :group augroup - :desc "Periodically update cached diagnostics"}) - (aucmd :InsertLeave - {:callback (fn [args] - (vim.defer_fn #(update-cache-diagnostics args.buf - (vim.diagnostic.get args.buf)) - 1000)) - :group augroup - :desc "Update diagnostics after leaving insert mode"}) + :desc "Update cached diagnostic signs"}) (aucmd :User {:pattern :GitSignsUpdate - :callback #(update-cache-gitsigns $1.buf) + :callback #(when (not= $1.data nil) + (update-cache-gitsigns $1.data.buffer)) :group augroup :desc "Update cached gitsigns signs"}) (aucmd :BufWipeout diff --git a/home/config/nvim/nifoc/statusline.fnl b/home/config/nvim/nifoc/statusline.fnl index c270fb4..52547ec 100644 --- a/home/config/nvim/nifoc/statusline.fnl +++ b/home/config/nvim/nifoc/statusline.fnl @@ -10,7 +10,9 @@ repo (require :nifoc.repo) nifoc-treesitter (require :nifoc.treesitter) navic (require :nvim-navic) - neogit (require :neogit)] + neogit (require :neogit) + telescope-builtin (require :telescope.builtin) + telescope-themes (require :telescope.themes)] (fn buffer-variable-exists? [key] (not= (. vim :b key) nil)) @@ -204,6 +206,8 @@ self.info self.hints])))) :update [:DiagnosticChanged :BufEnter] + :on_click {:name :heirline_diagnostics_list + :callback #(telescope-builtin.diagnostics (telescope-themes.get_ivy {:bufnr 0}))} 1 mod.space-if-count 2 {:provider (fn [self] (let [spacer (if (or (> self.warnings 0) diff --git a/home/config/wezterm/config.fnl b/home/config/wezterm/config.fnl index bbc9c20..eef39dd 100644 --- a/home/config/wezterm/config.fnl +++ b/home/config/wezterm/config.fnl @@ -180,6 +180,7 @@ ;:freetype_render_target :HorizontalLcd :harfbuzz_features disable-ligatures-flags :allow_square_glyphs_to_overflow_width :WhenFollowedBySpace + :adjust_window_size_when_changing_font_size false ;; Keys :keys [{:key :UpArrow :mods :SHIFT diff --git a/home/programs/amethyst.nix b/home/programs/amethyst.nix index 66d5a8a..0ff7ff3 100644 --- a/home/programs/amethyst.nix +++ b/home/programs/amethyst.nix @@ -14,6 +14,7 @@ let "wide" "two-pane" "column" + "bsp" ]; enables-layout-hud = true; enables-layout-hud-on-space-change = true; @@ -77,14 +78,26 @@ let toggle-float = { mod = "mod2"; key = "t"; }; select-tall-layout = { mod = "mod2"; key = "a"; }; - select-wide-layout = { mod = "mod2"; key = "s"; }; select-fullscreen-layout = { mod = "mod2"; key = "f"; }; + select-wide-layout = { mod = "mod2"; key = "s"; }; + select-two-pane-layout = { mod = "mod2"; key = "2"; }; select-column-layout = { mod = "mod2"; key = "c"; }; + select-bsp-layout = { mod = "mod2"; key = "p"; }; display-current-layout = { mod = "mod1"; key = "i"; }; reevaluate-windows = { mod = "mod2"; key = "b"; }; throw-space-left = disable-keybinding; throw-space-right = disable-keybinding; + throw-space-1 = disable-keybinding; + throw-space-2 = disable-keybinding; + throw-space-3 = disable-keybinding; + throw-space-4 = disable-keybinding; + throw-space-5 = disable-keybinding; + throw-space-6 = disable-keybinding; + throw-space-7 = disable-keybinding; + throw-space-8 = disable-keybinding; + throw-space-9 = disable-keybinding; + throw-space-10 = disable-keybinding; toggle-tiling = disable-keybinding;