Update deps
This commit is contained in:
parent
27145cd80d
commit
1a7664b8ed
3 changed files with 26 additions and 29 deletions
|
@ -415,11 +415,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1691506824,
|
||||
"narHash": "sha256-Z2Ms7036CCEAfCmDBDy+sFauO6/7fx2UN3aoPCpp4tA=",
|
||||
"lastModified": 1691599243,
|
||||
"narHash": "sha256-Lw3VRCFFbjQLxZu37rL/o2RBb95VG8iThEhEkqo3SV8=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "7b8d43fbaf8450c30caaed5eab876897d0af891b",
|
||||
"rev": "a8f8f48320c64bd4e3a266a850bbfde2c6fe3a04",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -3,7 +3,13 @@
|
|||
format-core (require :core)
|
||||
toml (require :toml)
|
||||
treefmt-config-file vim.env.TREEFMT_CONFIG_FILE
|
||||
treefmt-exts []]
|
||||
treefmt-exts []
|
||||
level vim.log.levels]
|
||||
(var latest-used-formatter :unknown)
|
||||
|
||||
(fn notify [msg lvl]
|
||||
(vim.notify (.. msg " [" latest-used-formatter "]") lvl {:title :Format}))
|
||||
|
||||
(fn read-file [file]
|
||||
(with-open [f (io.open file :rb)]
|
||||
(f:read :*all)))
|
||||
|
@ -17,12 +23,16 @@
|
|||
(let [ext (format-core.file.extension file-path)
|
||||
ext-glob (.. "*." ext)]
|
||||
(if (vim.list_contains treefmt-exts ext-glob)
|
||||
(do
|
||||
(set latest-used-formatter :treefmt)
|
||||
[{:cmd :treefmt
|
||||
:args [file-path]
|
||||
:ignore_err (fn [err data]
|
||||
(and (= err nil) (not (string.find data :Error))))}]
|
||||
(and (= err nil) (not (string.find data :Error))))}])
|
||||
(= (vim.fn.executable fallback.cmd) 1)
|
||||
[fallback]
|
||||
(do
|
||||
(set latest-used-formatter fallback.cmd)
|
||||
[fallback])
|
||||
[])))
|
||||
|
||||
(fn formatter-prettier [file-path]
|
||||
|
@ -58,21 +68,8 @@
|
|||
:yaml (fn [file-path]
|
||||
(treefmt-or-fallback file-path
|
||||
{:cmd :yamlfmt
|
||||
:args [file-path]}))}})
|
||||
;; (formatter.setup {:format_on_save #(not= vim.b.nifoc_formatter_disabled 1)
|
||||
;; :filetype {:css #(do-format :prettier (args-prettier :css))
|
||||
;; :fennel #(do-format :fnlfmt {:args ["-"]})
|
||||
;; :fish #(do-format :fish_indent {})
|
||||
;; :html #(do-format :prettier
|
||||
;; (args-prettier :html))
|
||||
;; :javascript #(do-format :prettier
|
||||
;; (args-prettier :javascript))
|
||||
;; :json #(do-format :prettier
|
||||
;; (args-prettier :json))
|
||||
;; :sh #(do-format :shfmt (args-shfmt))
|
||||
;; :toml #(do-format :taplo {:args [:fmt "-"]})
|
||||
;; :typescript #(do-format :prettier
|
||||
;; (args-prettier :typescript))
|
||||
;; :yaml #(do-format :yamlfmt {:args [:-in]})}
|
||||
;; :lsp [:elixirls :nil_ls]})
|
||||
:args [file-path]}))}
|
||||
:hooks {:on_success #(notify "Formatting Succeed" level.INFO)
|
||||
:on_err #(notify "Formatting Failed" level.ERROR)
|
||||
:on_timeout #(notify "Formatting Timeout" level.ERROR)}})
|
||||
M)
|
||||
|
|
|
@ -140,12 +140,12 @@ in
|
|||
};
|
||||
rainbow-delimiters-nvim = buildVimPluginFrom2Nix {
|
||||
pname = "rainbow-delimiters.nvim";
|
||||
version = "2023-08-01";
|
||||
version = "2023-08-09";
|
||||
src = fetchFromGitHub {
|
||||
owner = "HiPhish";
|
||||
repo = "rainbow-delimiters.nvim";
|
||||
rev = "c6380e218a2b4ffcc957a71606900a24e5c7b618";
|
||||
sha256 = "1r0ws77n012wf0y12kql28fqqr8x3ywhllw1r5ywp519r8zag1ql";
|
||||
rev = "8c6697b293d44b9bbbbdcf37e200cd01c9b66355";
|
||||
sha256 = "16kk83f5rpv9vj0y7q4bkp3vrpprzwpijk2pdfi6vwg9gcv6ggy7";
|
||||
fetchSubmodules = false;
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue