This package integrates janet's built-in
linter (janet -k
) with Emacs via
flycheck.
Ensure janet
is installed and on your PATH
. Probably it makes
sense if janet-mode or
janet-ts-mode have been
setup as well.
Manual
Clone this repository. For the sake of concrete exposition,
suppose the result ends up living under ~/src/flycheck-janet
.
Add the following to your init.el
(or .emacs-equivalent):
(add-to-list 'load-path
(expand-file-name "~/src/flycheck-janet"))
(require 'flycheck-janet)
Elpaca - add something like the following to your .emacs equivalent:
(use-package flycheck-janet
:elpaca (:host github
:repo "sogaiu/flycheck-janet"
:files ("*.el")))
Straight.el - add something like the following to your .emacs equivalent:
(use-package
:straight (:type git
:host github
:repo "sogaiu/flycheck-janet"
:files ("*.el")))
If you don't already have some flycheck stuff setup, you might also
want to have a call to global-flycheck-mode
somewhere appropriate in
your .emacs equivalent.
Open / create a .janet
file with an error in it like:
(def a
Assuming janet-mode
or janet-ts-mode
are active, M-x flycheck-list-errors
should bring up a buffer showing an error,
but there should also be visual evidence in the buffer with
Janet code indicating a problem.
If there are no errors displayed, one option that might help is to check out the troubleshooting section of the flycheck docs.
If the common issues section doesn't help, possibly one or both of the following two commands (mentioned later in flycheck's docs) might help in diagnosing the situation:
M-x flycheck-verify-setup
M-x flycheck-compile