branch: elpa/treesit-fold commit 52d36972efb8a858492aa3ebabd451c40fd49074 Author: Jen-Chieh Shen <jcs090...@gmail.com> Commit: GitHub <nore...@github.com>
chore(list): sort language alphabetically (#12) * Sort list alphabetically * doc * list --- README.md | 8 +++++--- ts-fold-parsers.el | 20 +++++++++++--------- ts-fold.el | 2 +- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index cecbd84862..2dfd5d22d8 100644 --- a/README.md +++ b/README.md @@ -69,10 +69,13 @@ then in Emacs: ## 🔨 Supported languages -> These languages are fairly complete: +> ⚠️ Please sort these two lists alphabetically! + +These languages are fairly complete: * Bash * C / C++ / C# / CSS +* Elixir * Go * HTML * Java / JavaScript / JSX / JSON @@ -81,9 +84,8 @@ then in Emacs: * R / Ruby / Rust * Scala / Swift * TypeScript / TSX -* Elixir -> These languages are in development: +These languages are in development: * Agda * Elm diff --git a/ts-fold-parsers.el b/ts-fold-parsers.el index 0139f447aa..7cc00bb72c 100644 --- a/ts-fold-parsers.el +++ b/ts-fold-parsers.el @@ -107,6 +107,16 @@ (block . ts-fold-range-seq) (comment . ts-fold-range-c-like-comment))) +(defun ts-fold-parsers-elixir () + "Rules sets for Elixir." + '((list . ts-fold-range-seq) + (map . ts-fold-range-seq) + (tuple . ts-fold-range-seq) + (comment + . (lambda (node offset) + (ts-fold-range-line-comment node offset "#"))) + (do_block .ts-fold-range-elixir))) + (defun ts-fold-parsers-go () "Rule sets for Go." '((block . ts-fold-range-seq) @@ -218,14 +228,6 @@ (defun ts-fold-parsers-typescript () "Rule sets for TypeScript." (append (ts-fold-parsers-javascript))) -(defun ts-fold-parsers-elixir () - "Rules sets for Elixir." - '((list . ts-fold-range-seq) - (map . ts-fold-range-seq) - (tuple . ts-fold-range-seq) - (comment - . (lambda (node offset) - (ts-fold-range-line-comment node offset "#"))) - (do_block .ts-fold-range-elixir))) + (provide 'ts-fold-parsers) ;;; ts-fold-parsers.el ends here diff --git a/ts-fold.el b/ts-fold.el index 5ea0393d8d..7d47842830 100644 --- a/ts-fold.el +++ b/ts-fold.el @@ -65,11 +65,11 @@ The alist is in form of (major-mode . (foldable-node-type)).") ;; alphabetically sorted (defcustom ts-fold-range-alist `((agda-mode . ,(ts-fold-parsers-agda)) - (elixir-mode . ,(ts-fold-parsers-elixir)) (c-mode . ,(ts-fold-parsers-c)) (c++-mode . ,(ts-fold-parsers-c++)) (csharp-mode . ,(ts-fold-parsers-csharp)) (css-mode . ,(ts-fold-parsers-css)) + (elixir-mode . ,(ts-fold-parsers-elixir)) (ess-r-mode . ,(ts-fold-parsers-r)) (go-mode . ,(ts-fold-parsers-go)) (html-mode . ,(ts-fold-parsers-html))