Compare commits
2 commits
eceae40d63
...
46145fc2fd
Author | SHA1 | Date | |
---|---|---|---|
46145fc2fd | |||
1da7fbc650 |
4 changed files with 12 additions and 9 deletions
|
@ -350,11 +350,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1696856794,
|
||||
"narHash": "sha256-5/SMa9LWm/0PYFQWRAQcH23PYF2z+v99iYlYrLD6gYQ=",
|
||||
"lastModified": 1696881408,
|
||||
"narHash": "sha256-neubkEquIiTsP+rVBG5V9GcWJpYSSkpwsyBne/B5lIQ=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "ec2ddd34272a42f16f963c59ce494712b2fe6b9e",
|
||||
"revCount": 521,
|
||||
"rev": "ff02fd8b34f58cd8019c8aa426413e21c12bcdd2",
|
||||
"revCount": 522,
|
||||
"type": "git",
|
||||
"url": "https://git.kempkens.io/daniel/nix-overlay"
|
||||
},
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
(usercmd :FormatEnableBuffer mod.enable-for-buffer
|
||||
{:desc "Enable Formatting for the current buffer"})
|
||||
(aucmd :BufWritePre
|
||||
{:callback mod.maybe-format-buffer
|
||||
{:callback #(mod.maybe-format-buffer $1.buf)
|
||||
:group augroup
|
||||
:desc "Run Formatter before saving"})))
|
||||
|
||||
|
@ -35,9 +35,9 @@
|
|||
(if (= b.nifoc_formatter_disabled 1) false
|
||||
(or (has-formatter-config? ft) (format-with-lsp? ft)))))
|
||||
|
||||
(fn mod.maybe-format-buffer []
|
||||
(fn mod.maybe-format-buffer [bufnr]
|
||||
(let [ft vim.bo.filetype]
|
||||
(if (= b.nifoc_formatter_disabled 1) nil
|
||||
(conform.format {:lsp_fallback (format-with-lsp? ft)}))))
|
||||
(conform.format {: bufnr :lsp_fallback (format-with-lsp? ft)}))))
|
||||
|
||||
mod)
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
(keymap.set :n :<leader>dtp :<cmd>TSPlaygroundToggle<CR>
|
||||
{:desc "Toggle Treetsitter Playground"})
|
||||
;; Other Mappings
|
||||
(keymap.set :n :F formatting.maybe-format-buffer {:desc "Format Buffer"})
|
||||
(keymap.set :n :F #(formatting.maybe-format-buffer 0) {:desc "Format Buffer"})
|
||||
(keymap.set :n :<A-Left> :b)
|
||||
(keymap.set :n :<A-Right> :w)
|
||||
(keymap.set :n :<S-Left> "^")
|
||||
|
|
|
@ -25,7 +25,10 @@
|
|||
((. (require :mini.jump2d) :setup) {:hooks {:before_start (fn []
|
||||
(vim.cmd :nohlsearch))}})
|
||||
;; https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-move.md
|
||||
((. (require :mini.move) :setup) {})
|
||||
((. (require :mini.move) :setup) {:mappings {:down :<A-Down>
|
||||
:up :<A-Up>
|
||||
:line_down :<A-Down>
|
||||
:line_up :<A-Up>}})
|
||||
;; https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-surround.md
|
||||
((. (require :mini.surround) :setup) {})
|
||||
;; https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-pairs.md
|
||||
|
|
Loading…
Reference in a new issue