Skip to content

Add indentation support for ado. #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 7, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add indentation support for ado.
  • Loading branch information
shaunplee committed Jan 7, 2021
commit 55793cd03e4e9520398386263f403b5db71cdf2d
4 changes: 3 additions & 1 deletion purescript-indentation.el
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,8 @@ autofill-mode."
"in" purescript-indentation-expression))))
("do" . (lambda () (purescript-indentation-with-starter
#'purescript-indentation-expression-layout nil)))
("ado" . (lambda () (purescript-indentation-with-starter
#'purescript-indentation-expression-layout nil)))
("mdo" . (lambda () (purescript-indentation-with-starter
#'purescript-indentation-expression-layout nil)))
("rec" . (lambda () (purescript-indentation-with-starter
Expand Down Expand Up @@ -977,7 +979,7 @@ autofill-mode."

(defun purescript-indentation-peek-token ()
"Return token starting at point."
(cond ((looking-at "\\(if\\|then\\|else\\|let\\|in\\|mdo\\|rec\\|\\(?:[[:word:]]+\\.\\)*do\\|proc\\|case\\|of\\|where\\|module\\|deriving\\|data\\|type\\|newtype\\|class\\|instance\\)\\([^[:alnum:]'_]\\|$\\)")
(cond ((looking-at "\\(if\\|then\\|else\\|let\\|in\\|ado\\|mdo\\|rec\\|\\(?:[[:word:]]+\\.\\)*do\\|proc\\|case\\|of\\|where\\|module\\|deriving\\|data\\|type\\|newtype\\|class\\|instance\\)\\([^[:alnum:]'_]\\|$\\)")
(match-string-no-properties 1))
((looking-at "[][(){}[,;]")
(match-string-no-properties 0))
Expand Down