[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/typst-ts-mode 1285fc3be5 014/246: feat: add a syntax table
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/typst-ts-mode 1285fc3be5 014/246: feat: add a syntax table |
Date: |
Fri, 14 Feb 2025 16:53:26 -0500 (EST) |
branch: elpa/typst-ts-mode
commit 1285fc3be5ec08a089481a65ffcf1a13e5b2bd14
Author: Ziqi Yang <mr.ziqiyang@gmail.com>
Commit: Ziqi Yang <mr.ziqiyang@gmail.com>
feat: add a syntax table
---
typst-ts-mode.el | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/typst-ts-mode.el b/typst-ts-mode.el
index 3ec039fe02..897e26c8fe 100644
--- a/typst-ts-mode.el
+++ b/typst-ts-mode.el
@@ -244,6 +244,16 @@
;;
==============================================================================
+;; TODO typst has three modes (namely 'markup', 'code' and 'math')
+;; Currently only add common settings to syntax table
+(defvar typst-ts-mode-syntax-table
+ (let ((st (make-syntax-table)))
+ ;; comment
+ (modify-syntax-entry ?/ ". 124b" st)
+ (modify-syntax-entry ?* ". 23" st)
+ (modify-syntax-entry ?\n "> b" st)
+ st))
+
(defvar typst-ts-mode-font-lock-rules
'(;; Typst font locking
:language typst
@@ -446,8 +456,7 @@ TYPES."
(define-derived-mode typst-ts-mode text-mode "Typst"
"Major mode for editing Typst, powered by tree-sitter."
:group 'typst
- ;; TODO syntax table
- ;; :syntax-table typst-ts-mode--syntax-table
+ :syntax-table typst-ts-mode-syntax-table
(unless (treesit-ready-p 'typst)
(error "Tree-sitter for Typst isn't available"))
- [nongnu] branch elpa/typst-ts-mode created (now d4e4a21f13), ELPA Syncer, 2025/02/14
- [nongnu] elpa/typst-ts-mode 3a3c98107e 001/246: init, ELPA Syncer, 2025/02/14
- [nongnu] elpa/typst-ts-mode c4a3c02c07 012/246: feat: indentation rules, ELPA Syncer, 2025/02/14
- [nongnu] elpa/typst-ts-mode 5e644c216d 006/246: feat: label and reference fontify in markup, ELPA Syncer, 2025/02/14
- [nongnu] elpa/typst-ts-mode 2a27ed3bdc 009/246: feat: add more fontification rules to code section, ELPA Syncer, 2025/02/14
- [nongnu] elpa/typst-ts-mode 01ef0d45b9 018/246: feat: better functionality for typst watch process, ELPA Syncer, 2025/02/14
- [nongnu] elpa/typst-ts-mode 1285fc3be5 014/246: feat: add a syntax table,
ELPA Syncer <=
- [nongnu] elpa/typst-ts-mode 439deb4b07 022/246: fix(preview): open non-english character file name, ELPA Syncer, 2025/02/14
- [nongnu] elpa/typst-ts-mode ebdce771f3 035/246: doc: update README, ELPA Syncer, 2025/02/14
- [nongnu] elpa/typst-ts-mode 5700854a1e 036/246: doc: update README, ELPA Syncer, 2025/02/14
- [nongnu] elpa/typst-ts-mode 21f263b341 039/246: doc: Fix flymake warnings., ELPA Syncer, 2025/02/14
- [nongnu] elpa/typst-ts-mode 6a6ab91ff6 038/246: refactor: Refactored heading increase/decrease functions., ELPA Syncer, 2025/02/14
- [nongnu] elpa/typst-ts-mode b4b6444909 041/246: feat: Move heading and it contents down or up., ELPA Syncer, 2025/02/14
- [nongnu] elpa/typst-ts-mode 5ee0e33683 010/246: feat: math fontification support, ELPA Syncer, 2025/02/14
- [nongnu] elpa/typst-ts-mode 7485611871 048/246: style: change all tab into white space & add editorconfig file, ELPA Syncer, 2025/02/14
- [nongnu] elpa/typst-ts-mode 208aa360d8 058/246: feat: almost done, have some bugs, ELPA Syncer, 2025/02/14
- [nongnu] elpa/typst-ts-mode 5f3e28bee0 064/246: feat: add utility function to modify language tags relationship, ELPA Syncer, 2025/02/14