Skip to content

Commit ec8409e

Browse files
authored
Merge pull request #22 from Hi-Angel/impl-ability-so-switch-to-js-ffi
Implement ability to switch from .purs to .js FFI file
2 parents 0d6d18e + 32938fc commit ec8409e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

purescript-mode.el

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
(require 'purescript-string)
3838
(require 'purescript-font-lock)
3939
(require 'cl-lib)
40+
(cl-eval-when 'compile (require 'find-file))
4041

4142
;; All functions/variables start with `(literate-)purescript-'.
4243

@@ -341,7 +342,9 @@ see documentation for that variable for more details."
341342
(set (make-local-variable 'dabbrev-case-replace) nil)
342343
(set (make-local-variable 'dabbrev-abbrev-char-regexp) "\\sw\\|[.]")
343344
(setq-local beginning-of-defun-function 'purescript-beginning-of-defun)
344-
(setq prettify-symbols-alist purescript-font-lock-prettify-symbols-alist)
345+
(setq prettify-symbols-alist purescript-font-lock-prettify-symbols-alist
346+
;; make (ff-find-other-file) find .js FFI file, given .purs
347+
ff-other-file-alist '((".purs\\'" (".js"))))
345348
(when (bound-and-true-p purescript-font-lock-symbols)
346349
(warn "`purescript-font-lock-symbols' is obsolete: please enable `prettify-symbols-mode' locally or globally instead."))
347350
)

0 commit comments

Comments
 (0)