[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/typst-ts-mode 44ed423508 09/19: fix: apply some suggestion
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/typst-ts-mode 44ed423508 09/19: fix: apply some suggestions from linters #42 |
Date: |
Thu, 24 Apr 2025 07:04:43 -0400 (EDT) |
branch: elpa/typst-ts-mode
commit 44ed423508cacceaead2ce7089e752bfbaff325c
Author: Huan Thieu Nguyen <nguyenthieuhuan@gmail.com>
Commit: Huan Thieu Nguyen <nguyenthieuhuan@gmail.com>
fix: apply some suggestions from linters #42
---
typst-ts-edit-indirect.el | 4 ----
typst-ts-embedding-lang-settings.el | 5 ++---
typst-ts-lsp.el | 2 +-
typst-ts-mode.el | 7 +++++--
typst-ts-watch-mode.el | 19 ++++++++++---------
5 files changed, 18 insertions(+), 19 deletions(-)
diff --git a/typst-ts-edit-indirect.el b/typst-ts-edit-indirect.el
index cb282dfd26..7c3400dc13 100644
--- a/typst-ts-edit-indirect.el
+++ b/typst-ts-edit-indirect.el
@@ -117,9 +117,5 @@ If there is no fitting mode or no lang it will be
`normal-mode'."
(goto-char (point-min))
(delete-char 1)))))
-(add-hook 'typst-ts-mode-hook (lambda ()
- (setq-local edit-indirect-guess-mode-function
-
#'typst-ts-edit-indirect--guess-mode)))
-
(provide 'typst-ts-edit-indirect)
;;; typst-ts-edit-indirect.el ends here
diff --git a/typst-ts-embedding-lang-settings.el
b/typst-ts-embedding-lang-settings.el
index 2c8dbf2c22..1b694bd7fc 100644
--- a/typst-ts-embedding-lang-settings.el
+++ b/typst-ts-embedding-lang-settings.el
@@ -222,8 +222,7 @@
"authorized_keys2" authorized_keys "authorized_keys" authorized_keys
"known_hosts" known_hosts
"known_hosts.old" known_hosts "ssh_config" ssh_config "sshd_config"
sshd_config
"syslog" syslog "varlink" varlink "typ" typst
- "typc" typst "typst" typst
- ))
+ "typc" typst "typst" typst))
"Raw block tag -> tree sitter language map.")
@@ -233,7 +232,7 @@
LANG is a string, and the returned major mode is a symbol."
(let ((lang-norm (downcase lang)))
(cl-find-if
- #'(lambda (mode) (and mode (fboundp mode)))
+ (lambda (mode) (and mode (fboundp mode)))
(list
(and (treesit-language-available-p (intern lang-norm))
(intern (concat lang-norm "-ts-mode")))
diff --git a/typst-ts-lsp.el b/typst-ts-lsp.el
index 79ae36142e..4068568c3a 100644
--- a/typst-ts-lsp.el
+++ b/typst-ts-lsp.el
@@ -27,7 +27,7 @@
;;; Code:
-(defgroup typs-ts-lsp nil
+(defgroup typst-ts-lsp nil
"Typst TS eglot integration with tinymist."
:prefix "typst-ts-compile"
:group 'typst-ts)
diff --git a/typst-ts-mode.el b/typst-ts-mode.el
index 001e0f8cce..289ee8db7f 100644
--- a/typst-ts-mode.el
+++ b/typst-ts-mode.el
@@ -683,12 +683,15 @@ typst tree sitter grammar (at least %s)!"
(current-time-string min-time))
;; auto fill function
- (setq-local normal-auto-fill-function 'typst-ts-editing-auto-fill-function)
+ (setq-local normal-auto-fill-function #'typst-ts-editing-auto-fill-function)
(treesit-major-mode-setup)
(setq-local font-lock-unfontify-region-function
#'typst-ts-mode-unfontify-region)
- (setq-local indent-line-function #'typst-ts-mode-indent-line-function))
+ (setq-local indent-line-function #'typst-ts-mode-indent-line-function)
+ (add-hook 'typst-ts-mode-hook (lambda ()
+ (setq-local edit-indirect-guess-mode-function
+
#'typst-ts-edit-indirect--guess-mode))))
;;;###autoload
(add-to-list 'auto-mode-alist '("\\.typ\\'" . typst-ts-mode))
diff --git a/typst-ts-watch-mode.el b/typst-ts-watch-mode.el
index c2c337fac7..661340c560 100644
--- a/typst-ts-watch-mode.el
+++ b/typst-ts-watch-mode.el
@@ -61,17 +61,18 @@ is eliminated."
'(display-buffer-at-bottom
(window-height . fit-window-to-buffer))
"Display buffer parameters.
-Note that since the major mode of typst watch buffer is derived from
compilation
- mode. If you have a rule like `((derived-mode . compilation-mode) ...)' in
-your `display-buffer-alist', then this option will be covered by that rule."
+Note that since the major mode of typst watch buffer is derived from
+compilation mode.
+If you have a rule like `((derived-mode . `compilation-mode') ...)'
+in your `display-buffer-alist', then this option will be covered by that rule."
:type 'symbol)
-(defvar typst-ts-before-watch-hook nil
+(defvar typst-ts-watch-before-watch-hook nil
"Hook runs before compile.")
-(defvar typst-ts-after-watch-hook nil
+(defvar typst-ts-watch-after-watch-hook nil
"Hook runs after compile.")
-(defun typst-ts--watch-process-filter (proc output)
+(defun typst-ts-watch--process-filter (proc output)
"Filter the `typst watch' process output.
Only error will be transported to the process buffer.
See `(info \"(elisp) Filter Functions\")'.
@@ -116,7 +117,7 @@ PROC: process; OUTPUT: new output from PROC."
(defun typst-ts-watch-start ()
"Watch(hot compile) current typst file."
(interactive)
- (run-hooks typst-ts-before-watch-hook)
+ (run-hooks typst-ts-watch-before-watch-hook)
(with-current-buffer (get-buffer-create typst-ts-watch-process-buffer-name)
(erase-buffer)
(unless (derived-mode-p 'typst-ts-compilation-mode)
@@ -131,7 +132,7 @@ PROC: process; OUTPUT: new output from PROC."
(file-name-nondirectory buffer-file-name)
(typst-ts-compile-get-result-pdf-filename)
typst-ts-watch-options))
- 'typst-ts--watch-process-filter)
+ 'typst-ts-watch--process-filter)
(message "Start Watch"))
;;;###autoload
@@ -144,7 +145,7 @@ PROC: process; OUTPUT: new output from PROC."
(kill-buffer typst-ts-watch-process-buffer-name)
(when window
(delete-window window)))
- (run-hooks typst-ts-after-watch-hook)
+ (run-hooks typst-ts-watch-after-watch-hook)
(message "Stop Watch"))
(provide 'typst-ts-watch-mode)
- [nongnu] elpa/typst-ts-mode updated (e0542e3e42 -> 972dc69d6b), ELPA Syncer, 2025/04/24
- [nongnu] elpa/typst-ts-mode ba70e66060 06/19: Merge branch 'develop' into 42-nongnu-patch, ELPA Syncer, 2025/04/24
- [nongnu] elpa/typst-ts-mode 44ed423508 09/19: fix: apply some suggestions from linters #42,
ELPA Syncer <=
- [nongnu] elpa/typst-ts-mode 7e5b1ef3bc 11/19: fix: .dir-locals.el add file header, ELPA Syncer, 2025/04/24
- [nongnu] elpa/typst-ts-mode 919b088997 13/19: chore, ELPA Syncer, 2025/04/24
- [nongnu] elpa/typst-ts-mode ebc84e4f65 14/19: chore: only use typst-ts as prefix #42, ELPA Syncer, 2025/04/24
- [nongnu] elpa/typst-ts-mode 929dfdda6a 01/19: fix: patch applied #41, ELPA Syncer, 2025/04/24
- [nongnu] elpa/typst-ts-mode 0b0d4bf211 05/19: fix: use start-process for watch mode #42, ELPA Syncer, 2025/04/24
- [nongnu] elpa/typst-ts-mode 13dff22973 02/19: fix: use start-process instead of async-shell-command #42, ELPA Syncer, 2025/04/24
- [nongnu] elpa/typst-ts-mode b1eb84cd2a 07/19: refactor: typst-ts-mode-return, also takes typst-ts-mode-electric-return in mind #42, ELPA Syncer, 2025/04/24
- [nongnu] elpa/typst-ts-mode 72d60432c7 03/19: fix: show the shell output #42, ELPA Syncer, 2025/04/24
- [nongnu] elpa/typst-ts-mode 2b14377e24 04/19: stub: comment out typst-ts-mode-return for now #42, ELPA Syncer, 2025/04/24
- [nongnu] elpa/typst-ts-mode 998eed6f22 10/19: refacvtor: move variables to separate file, ELPA Syncer, 2025/04/24