update configuration
This commit is contained in:
parent
9aff3f5d27
commit
ce5f9e935d
5 changed files with 26 additions and 21 deletions
|
@ -57,7 +57,7 @@
|
|||
(keymap.set :n :<leader>dli :<cmd>LspInfo<CR> {:desc "LSP Info"})
|
||||
(keymap.set :n :<leader>dlr :<cmd>LspRestart<CR> {:desc "Restart LSP"})
|
||||
(keymap.set :n :<leader>ds #(vim.diagnostic.open_float {:scope :line})
|
||||
{:desc "Show Diagnostics"})
|
||||
{:desc "Show Line Diagnostics"})
|
||||
(keymap.set :n :<leader>dtp :<cmd>TSPlaygroundToggle<CR>
|
||||
{:desc "Toggle Treetsitter Playground"})
|
||||
;; Other Mappings
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue