fix(emacs): set default formatters and add biome formatter
This commit is contained in:
parent
3ac805a98f
commit
e04df90980
1 changed files with 23 additions and 1 deletions
|
@ -180,13 +180,35 @@
|
|||
:config
|
||||
(global-undo-tree-mode))
|
||||
(use-package format-all :straight t
|
||||
:bind ("C-c f" . format-all-region-or-buffer))
|
||||
:bind ("C-c f" . format-all-region-or-buffer)
|
||||
:config
|
||||
(setq-default format-all-formatters
|
||||
'(("OCaml" ocamlformat)
|
||||
("Python" black)
|
||||
("TypeScript" biome))))
|
||||
(use-package ws-butler :straight t
|
||||
:config
|
||||
(ws-butler-global-mode))
|
||||
(use-package avy :straight t
|
||||
:bind ("C-'" . #'avy-goto-word-0))
|
||||
|
||||
(require 'format-all)
|
||||
|
||||
(define-format-all-formatter biome
|
||||
(:executable "biome")
|
||||
(:install (macos "brew install biome"))
|
||||
(:languages
|
||||
"JavaScript" "JSX"
|
||||
"TypeScript" "TSX"
|
||||
"JSON" "JSON5")
|
||||
(:features)
|
||||
(:format
|
||||
(format-all--buffer-easy
|
||||
executable
|
||||
"format"
|
||||
(when (buffer-file-name)
|
||||
(list "--stdin-file-path" (buffer-file-name))))))
|
||||
|
||||
(provide 'priime-edit)
|
||||
|
||||
;;; priime-edit.el ends here
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue