add(nvim): even more macros

This commit is contained in:
Léana 江 2024-01-28 13:28:01 +01:00 committed by Léana 江
parent 3bf9695311
commit a121d93bdb
5 changed files with 17 additions and 36 deletions

View file

@ -1,11 +1,10 @@
(import-macros {: require-then!} :macros)
(local {: fst} (require :helpers))
(import-macros {: require-then! : fst!} :macros)
(fn diagnostic-message []
(let [{: row} (vim.api.nvim_win_get_cursor 0)
ds (vim.diagnostic.get 0 {:lnum (- row 1)})]
(if (>= (length ds) 1)
(-> (fst ds)
(-> (fst! ds)
(. :message)
(: :gsub "%%" "%%%%"))
"")))