Home

Awesome

An emacs mode for quarto

Quarto-mode is an emacs mode for editing quarto documents.

Installing

quarto-mode is available on MELPA. From emacs,

M-x package-refresh-contents
M-x package-install
  quarto-mode

Using quarto-mode

Add this to your .emacs or ~/.emacs.d/init.el file:

;; load the library
(require 'quarto-mode)

The quarto-mode package will associate a quarto polymode to .qmd files. That means that there isn't an actual quarto-mode mode. If you want to associate other files to the quarto polymode, you should use poly-quarto-mode, such as:

;; Note that the following is not necessary to run quarto-mode in .qmd files! It's merely illustrating
;; how to associate different extensions to the mode.
(add-to-list 'auto-mode-alist '("\\.Rmd\\'" . poly-quarto-mode))

;; Or, with use-package:
(use-package quarto-mode
  :mode (("\\.Rmd" . poly-quarto-mode))
  )

Dependencies

Quarto-mode requires the following packages to be installed:

quarto-mode + ESS

If you have ESS, quarto-mode will use it. Otherwise, it won't. Specifically, quarto-mode does not depend on ESS (or R), which means that if you want to use those features, you have to install ESS separately.

Features

Differences in behavior between quarto-mode and markdown-mode