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