Skip to content

Commit 262ff92

Browse files
author
Allen Short
committed
improved monte-mode with flycheck support
1 parent d63e34c commit 262ff92

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed
File renamed without changes.

monte.el renamed to elisp/monte.el

+15-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
:type 'integer
1717
:safe 'integerp)
1818

19+
(require 'flycheck)
1920
(require 'monte-indent)
2021

2122
(defvar monte-mode-map
@@ -31,7 +32,7 @@
3132
`(,(rx symbol-start
3233
(or "as" "bind" "break" "catch" "continue" "def" "else" "escape"
3334
"exit" "extends" "exports" "finally" "fn" "for" "guards" "if"
34-
"implements" "in" "interface" "match" "meta" "method" "module"
35+
"implements" "import" "in" "interface" "match" "meta" "method"
3536
"object" "pass" "pragma" "return" "switch" "to" "try" "var"
3637
"via" "when" "while")
3738
symbol-end)
@@ -68,3 +69,16 @@
6869
(set (make-local-variable 'font-lock-defaults) '(monte-font-lock-keywords nil nil nil nil))
6970
(set (make-local-variable 'indent-line-function) 'monte-indent-line-function)
7071
(setq-local electric-indent-inhibit t))
72+
73+
74+
(flycheck-define-checker monte-lint
75+
"Syntax and scope checking for Monte."
76+
:command ("mt" "lint" "-stdin" source-original)
77+
:standard-input t
78+
:modes (monte-mode)
79+
:error-patterns
80+
((error line-start (file-name) ":" line "." column
81+
"-" (+ digit) "." (+ digit)
82+
": " (message))))
83+
84+
(add-to-list 'flycheck-checkers 'monte-lint)

0 commit comments

Comments
 (0)