Skip to content
Major mode of KonohaScript
Emacs Lisp
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Emacs Major Mode of KonohaScript


konoha-mode.el provides Emacs major-mode of KonohaScript.

Sample configuration

(require 'konoha-mode)

;; setting for flymake
(require 'flymake)
(add-to-list 'flymake-allowed-file-name-masks '("\\.k\\'" flymake-konoha-init))

(defun flymake-konoha-init ()
  (let* ((temp-file (flymake-init-create-temp-buffer-copy
         (local-file (file-relative-name
                      (file-name-directory buffer-file-name))))
    (list "konoha" (list "-c" local-file))))

(defvar konoha-compiler-message-regexp

(defun flymake-konoha-load ()
  (add-to-list 'flymake-err-line-patterns
                 nil 1 nil 3))
  (flymake-mode t))

(add-hook 'konoha-mode-hook
          (lambda ()

;; setting for quickrun
(quickrun-add-command "konoha"
                  '((:command      . "konoha")
                    (:compile-only . "%c -c %s"))
                  :mode 'konoha-mode)
(add-to-list 'quickrun-file-alist '("\\.k$" . "konoha"))

See also

You can’t perform that action at this time.