Alpha Chen 1 month ago
parent 79d2db46a3
commit e7a5b6c50d
No known key found for this signature in database

@ -54,14 +54,19 @@
(let [fmt #{:formatCommand $1 :formatStdin true} (let [fmt #{:formatCommand $1 :formatStdin true}
lint #{:lintCommand $1 :lintFormats $2 :lintStdin true} lint #{:lintCommand $1 :lintFormats $2 :lintStdin true}
fennel [(fmt "fnlfmt /dev/stdin") fennel [(fmt "fnlfmt /dev/stdin")
(lint (-> (iter [:fennel (lint (let [x (iter [:fennel
:--globals "--globals vim,hs,spoon"
"vim,hs,spoon"
:--raw-errors :--raw-errors
"$(realpath --relative-to . ${INPUT})" "$(realpath --relative-to . ${INPUT})"
:2>&1]) :2>&1])]
(: :join " ")) ["%f:%l: %m"])] (x:join " ")) ["%f:%l: %m"])]
js [] js [{:formatCommand (let [x (iter ["prettier --stdin --stdin-filepath ${INPUT}"
"${--range-start:charStart} ${--range-end:charEnd}"
"${--tab-width:tabWidth} ${--use-tabs:!insertSpaces}"])]
(x:join " "))
:formatStdin true
:formatCanRange true
:rootMarkers [:.prettierrc.json]}]
yaml [(fmt "yamlfmt -in")]] yaml [(fmt "yamlfmt -in")]]
(lspconfig.efm.setup {:init_options {:documentFormatting true (lspconfig.efm.setup {:init_options {:documentFormatting true
:hover true :hover true
@ -75,7 +80,7 @@
: yaml} : yaml}
;; since otherwise eslint goes haywire ;; since otherwise eslint goes haywire
:lintDebounce 1000000000} :lintDebounce 1000000000}
:filetypes [:fennel :yaml]})) :filetypes [:fennel :typescriptreact :yaml]}))
; (fn on-attach-do [...] ; (fn on-attach-do [...]
; (let [fns [...]] ; https://benaiah.me/posts/everything-you-didnt-want-to-know-about-lua-multivals/ ; (let [fns [...]] ; https://benaiah.me/posts/everything-you-didnt-want-to-know-about-lua-multivals/

Loading…
Cancel
Save