Skip to content

Commit

Permalink
Minor fixes for coalton-mode (#1746)
Browse files Browse the repository at this point in the history
* Set the default connection in coalton-mode to prevent from errors from `autodoc`.

* Indent automatically with Return in coalton-mode.
  • Loading branch information
fukamachi authored Jan 13, 2025
1 parent 3abc50f commit 476cce3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion extensions/coalton-mode/coalton-mode.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,8 @@
(variable-value 'insertion-line-comment) ";; "
(variable-value 'language-mode-tag) 'coalton-mode
(variable-value 'idle-function) 'coalton-idle-function)
(set-syntax-parser *syntax-table* (make-tmlanguage-coalton)))
(set-syntax-parser *syntax-table* (make-tmlanguage-coalton))
(lem-lisp-mode/internal::check-connection))

(defun guess-current-position-package (point)
(with-point ((p point))
Expand Down Expand Up @@ -339,6 +340,7 @@
(coalton-compile-region start end))))

(define-key *coalton-mode-keymap* "C-c C-c" 'coalton-compile-defun)
(define-key *coalton-mode-keymap* "Return" 'newline-and-indent)

(load-static-indentation-rules)
(define-file-type ("coal") coalton-mode)
Expand Down

0 comments on commit 476cce3

Please sign in to comment.