mattt-b / flycheck-odin

Emacs Flycheck integration for the Odin language

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

flycheck-odin

Flycheck for Odin

Setup

(eval-after-load 'flycheck
  '(add-hook 'flycheck-mode-hook #'flycheck-odin-setup))

Default behavior

This is a wrapper around odin check $LOCATION -vet. With no changes on the users' part, the default behavior is is to run odin check $CURRENT_DIRECTORY -vet (where '$CURRENT_DIRECTORY' is the directory of the current buffer).

Changing behavior

This exposes the following variables that can be customized globally or with .dir-locals.el

flycheck-odin-project-path
Change the $LOCATION in odin check $LOCATION -vet. This can be a directory or a file.

flycheck-odin-error-filters
A list of Emacs regexes of errors to ignore.

flycheck-odin-command-arguments
A list of compiler flags. Defaults to ("-vet")

An example configuration might look something like this:

((odin-mode
  (flycheck-odin-project-path . "~/code/project/src")
  (flycheck-odin-error-filters . ("^[^[:blank:]]*/Odin/core/"
                                  "^[^[:blank:]]*/Odin/shared/some_library/"
                                  "foobar"))))

About

Emacs Flycheck integration for the Odin language

License:The Unlicense


Languages

Language:Emacs Lisp 100.0%