[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/haskell-ts-mode 04971e0c4e 36/61: Updated ss, added more i
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/haskell-ts-mode 04971e0c4e 36/61: Updated ss, added more info in readme |
Date: |
Wed, 4 Sep 2024 04:00:29 -0400 (EDT) |
branch: elpa/haskell-ts-mode
commit 04971e0c4ee0ab8105c2ef48e1c49ac3253f3018
Author: Pranshu Sharma <pranshusharma366@gmail.com>
Commit: Pranshu Sharma <pranshusharma366@gmail.com>
Updated ss, added more info in readme
---
README.org | 106 ++++++++++++++++++++++++-------------------------------------
ss.png | Bin 23881 -> 76449 bytes
2 files changed, 42 insertions(+), 64 deletions(-)
diff --git a/README.org b/README.org
index 8bca07d764..4d0fab56f0 100644
--- a/README.org
+++ b/README.org
@@ -3,36 +3,41 @@
A haskell mode that uses treesitter.
-The package is still in devlopment, please report bugs or email
-them(email found it main .el file).
-
* Screenshot
[[ss.png]]
+The above screenshot is indented coloured using haskell-ts-mode, with
+prettify-symbols-mode enabled.
+
* Features
-The basic features are:
+an overview of the features are:
- Syntax highliting
- Indentation
- Imenu support
- REPL
- Prettify symbols mode support
+* Comparasion with haskell-mode
The more interesting features are:
- Logical syntax highlighting:
- Only arguments that can be used in functions are highlighted, eg
in `f (_:(a:[])) only 'a' is highlighted
- - The return type of a function is optionally highlighted, if
- treesit-font-lock-level is set to 4
+ - The return type of a function is highlighted
- All new variabels are(or should be) highlighted, this includes
generators, lambda args.
- highlighting the '=' operaotr in guarded matches correctly, this
would be stupidly hard in regexp based syntax
- Unlike haskell-mode, quasi quotes are understood and do not confuse
- the mode
-- Consistant indentation: haskell-mode's indentation works in a
- cyclical way, it cycles through where you might want indentation.
- haskell-ts-mode, meanwhile relies on you to set the parse tree
- changing whitespace.
+ the mode, thanks to treesitter
+- Predictable (but less powerful) indentation: haskell-mode's
+ indentation works in a cyclical way, it cycles through where you
+ might want indentation. haskell-ts-mode, meanwhile relies on you to
+ set the concrete syntax tree changing whitespace.
+- More perfomant, this is especially seen in longer files
+- Much much less code, haskell mode has accumlated 30,000 lines of
+ features to do with all things haskell related, this mode just keeps
+ the scope to basic major mode stuff, and leaves other stuff for
+ external packages.
* Motivation
@@ -48,58 +53,6 @@ very complex and required a web of dependencies.
Both these modes ended up practically parsing haskells syntax to
implement indentation, so I thought why not use tree sitter?
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-However, haskell(-tng)-mode is still a lot more complete than this,
-and is recommended if you have any commercial work to do.
-
* Installation
#+BEGIN_SRC: elisp
@@ -114,5 +67,30 @@ treesit-font-lock-level accordingly.
If that is not enough, you can customize haskell-ts-font-lock-feature-list
-* TODO
+** how to disable haskell-ts-mode indentation
+
+#+begin_src: emacs-lisp
+(setq haskell-ts-use-indent nil)
+#+end_src
+
+** Pretify symbols mode
+prettify symbols mode can be used to replace common symbols with
+unicode alternatives.
+
+#+begin_src: emacs-lisp
+(add-hook 'haskell-ts-mode 'prettify-symbols-mode)
+#+end_src
+
+** Adjusting font lock level
+set haskell-ts-font-lock-level accordingly.
+
+* TODO and limitations
- support for customization UI
+- Imenu support for functions with multiple definitions
+
+Limitations: _Proper indenting of multiline signatures_: the
+treesitter grammer does not flatten the signautes, rather leaves them
+to the standard infix interpretatoin. This makes indentation hard, as
+it will mean the only way to check if the the signature node is an
+ancestor of node at point is to perfom a recursive ascent, which is
+horrible for perfomance.
diff --git a/ss.png b/ss.png
index 4d2a168cc7..03ddc1eb48 100644
Binary files a/ss.png and b/ss.png differ
- [nongnu] elpa/haskell-ts-mode bd85e76757 54/61: Fixed commint mode, as eariler ones did not work, (continued)
- [nongnu] elpa/haskell-ts-mode bd85e76757 54/61: Fixed commint mode, as eariler ones did not work, ELPA Syncer, 2024/09/04
- [nongnu] elpa/haskell-ts-mode baf2c373ca 38/61: f, ELPA Syncer, 2024/09/04
- [nongnu] elpa/haskell-ts-mode 4b14396789 37/61: Fixed ge and le sign in prettify sym mode and ss, ELPA Syncer, 2024/09/04
- [nongnu] elpa/haskell-ts-mode 994edb715d 22/61: mv filed, ELPA Syncer, 2024/09/04
- [nongnu] elpa/haskell-ts-mode 15c68f9296 23/61: README changed, ELPA Syncer, 2024/09/04
- [nongnu] elpa/haskell-ts-mode eacca94b5c 30/61: Dont indent quasi quote body, ELPA Syncer, 2024/09/04
- [nongnu] elpa/haskell-ts-mode e6ee63c713 10/61: Merge branch 'indent', ELPA Syncer, 2024/09/04
- [nongnu] elpa/haskell-ts-mode 5248e03fc6 21/61: uc and major syntax, ELPA Syncer, 2024/09/04
- [nongnu] elpa/haskell-ts-mode c87df5d07b 25/61: added kw, ELPA Syncer, 2024/09/04
- [nongnu] elpa/haskell-ts-mode 8499f4c29e 11/61: uc, ELPA Syncer, 2024/09/04
- [nongnu] elpa/haskell-ts-mode 04971e0c4e 36/61: Updated ss, added more info in readme,
ELPA Syncer <=
- [nongnu] elpa/haskell-ts-mode 2f49fe8e6a 41/61: Fixed ss name, ELPA Syncer, 2024/09/04
- [nongnu] elpa/haskell-ts-mode 764d8414ef 43/61: fixed image, ELPA Syncer, 2024/09/04
- [nongnu] elpa/haskell-ts-mode a32b73374e 49/61: Added indent para, ELPA Syncer, 2024/09/04
- [nongnu] elpa/haskell-ts-mode 5d3bd04e43 46/61: Better keymap formatting, ELPA Syncer, 2024/09/04
- [nongnu] elpa/haskell-ts-mode 044c1e54fd 48/61: changed syntax table, ELPA Syncer, 2024/09/04
- [nongnu] elpa/haskell-ts-mode 6586064122 58/61: Removed a todo item, ELPA Syncer, 2024/09/04
- [nongnu] elpa/haskell-ts-mode e66403b8e6 59/61: Changes to indentatoin for infix, ELPA Syncer, 2024/09/04
- [nongnu] elpa/haskell-ts-mode 7acc4e8627 55/61: Colouring for type synonmyms, ELPA Syncer, 2024/09/04