Skip to content

[Feature Request] Support typstyle formatter for Typst language #272

@RaySlash

Description

@RaySlash

Formatter: typstyle
Language: Typst

I was trying to use the typstyle formatter with format-all-the-code. I was trying to load and set and override a default. I am a noob emacs user but willing to fix this up. I am using following, but I am still getting errors:

(use-package format-all
  :commands format-all-mode
  :hook (prog-mode . format-all-mode)
  :config (setq-default format-all-formatters '(("Typst" (typstyle))))
  (define-format-all-formatter typstyle
    (:executable "typstyle")
    (:install "cargo install typstyle")
    (:languages "Typst")
    (:features)
    (:format (format-all--buffer-easy executable))))

The error is as follows(No formatter for this lang. Can i not override the default formatter list? I can try a PR if you can help me out here a bit. Thank you.):

Debugger entered--Lisp error: (error "No supported formatters for this language")
  error("No supported formatters for %s" "this language")
  format-all--prompt-for-formatter(nil)
  format-all--buffer-or-region(t nil)
  format-all-buffer(t)
  funcall-interactively(format-all-buffer t)
  command-execute(format-all-buffer record)
  execute-extended-command(nil "format-all-buffer" nil)
  funcall-interactively(execute-extended-command nil "format-all-buffer" nil)
  call-interactively(execute-extended-command)
  #f(compiled-function () (interactive nil) #<bytecode -0x15746737000a9580>)()
  funcall-interactively(#f(compiled-function () (interactive nil) #<bytecode -0x15746737000a9580>))
  command-execute(#f(compiled-function () (interactive nil) #<bytecode -0x15746737000a9580>))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions