[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/clojure-ts-mode 80d2dcd1f6 47/71: Cleanup mode function, a
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/clojure-ts-mode 80d2dcd1f6 47/71: Cleanup mode function, add var to control treesit debugging tools |
Date: |
Fri, 25 Aug 2023 03:59:35 -0400 (EDT) |
branch: elpa/clojure-ts-mode
commit 80d2dcd1f6323646dd190654962e4a61ace51410
Author: dannyfreeman <danny@dfreeman.email>
Commit: dannyfreeman <danny@dfreeman.email>
Cleanup mode function, add var to control treesit debugging tools
---
clojure-ts-mode.el | 29 ++++++++++++++++-------------
1 file changed, 16 insertions(+), 13 deletions(-)
diff --git a/clojure-ts-mode.el b/clojure-ts-mode.el
index 349a95c83b..458d6fa48e 100644
--- a/clojure-ts-mode.el
+++ b/clojure-ts-mode.el
@@ -63,6 +63,10 @@
(lm-version (or load-file-name buffer-file-name)))
"The current version of `clojure-ts-mode'.")
+(defvar clojure-ts--debug nil
+ "Enables debugging messages, shows current node in mode-line.
+Only intended for use at development time.")
+
(defconst clojure-ts--builtin-dynamic-var-regexp
(eval-and-compile
(concat "^"
@@ -519,23 +523,22 @@ Requires Emacs 29 and libtree-sitter-clojure.so available
somewhere in
(setq-local comment-start ";")
(when (treesit-ready-p 'clojure)
(treesit-parser-create 'clojure)
- (setq-local treesit-font-lock-settings clojure-ts--font-lock-settings)
- (setq-local treesit-defun-prefer-top-level t
+ (setq-local treesit-font-lock-settings clojure-ts--font-lock-settings
+ treesit-defun-prefer-top-level t
treesit-defun-tactic 'top-level
- treesit-defun-type-regexp (rx (or "list_lit" "vec_lit"
"map_lit")))
- (setq-local treesit-font-lock-feature-list
+ treesit-defun-type-regexp (rx (or "list_lit" "vec_lit"
"map_lit"))
+ treesit-simple-indent-rules clojure-ts--fixed-indent-rules
+ treesit-defun-name-function
#'clojure-ts--standard-definition-node-name
+ treesit-simple-imenu-settings clojure-ts--imenu-settings
+ treesit-font-lock-feature-list
'((comment string char number)
(keyword constant symbol bracket builtin)
(deref quote metadata definition variable type doc regex
tagged-literals)))
- (setq-local treesit-simple-indent-rules clojure-ts--fixed-indent-rules)
- (setq-local treesit-defun-name-function
#'clojure-ts--standard-definition-node-name)
- (setq-local treesit-simple-imenu-settings clojure-ts--imenu-settings)
- (setq treesit--indent-verbose t)
- (treesit-major-mode-setup)
- (treesit-inspect-mode)))
- ;; (clojure-mode-variables)
- ;; (add-hook 'paredit-mode-hook #'clojure-paredit-setup)
- ;; (add-hook 'electric-indent-function
#'clojure-mode--electric-indent-function)
+ (when clojure-ts--debug
+ (setq-local treesit--indent-verbose t
+ treesit--font-lock-verbose t)
+ (treesit-inspect-mode))
+ (treesit-major-mode-setup)))
;; Redirect clojure-mode to clojure-ts-mode if clojure-mode is present
(if (require 'clojure-mode nil 'noerror)
- [nongnu] elpa/clojure-ts-mode 866e815f8e 63/71: Release v0.1.2, (continued)
- [nongnu] elpa/clojure-ts-mode 866e815f8e 63/71: Release v0.1.2, ELPA Syncer, 2023/08/25
- [nongnu] elpa/clojure-ts-mode e423062a04 10/71: Fix a link, ELPA Syncer, 2023/08/25
- [nongnu] elpa/clojure-ts-mode 2fe33b8fc2 35/71: Fix a typo, ELPA Syncer, 2023/08/25
- [nongnu] elpa/clojure-ts-mode aed33874a7 22/71: Update copyright years, ELPA Syncer, 2023/08/25
- [nongnu] elpa/clojure-ts-mode 9fb5739a67 64/71: Add elpaignore file, ELPA Syncer, 2023/08/25
- [nongnu] elpa/clojure-ts-mode 2d6b12e15b 61/71: Fix link in changelog, ELPA Syncer, 2023/08/25
- [nongnu] elpa/clojure-ts-mode 59bbb1e773 31/71: Tweak the readme a bit, ELPA Syncer, 2023/08/25
- [nongnu] elpa/clojure-ts-mode 6cba90c556 67/71: Move defcustom above usage, ELPA Syncer, 2023/08/25
- [nongnu] elpa/clojure-ts-mode 662bc0d1ee 25/71: Add a command to display the mode's version, ELPA Syncer, 2023/08/25
- [nongnu] elpa/clojure-ts-mode dcbd3b04dd 38/71: Fix bulleted markdown list, not displaying properly, ELPA Syncer, 2023/08/25
- [nongnu] elpa/clojure-ts-mode 80d2dcd1f6 47/71: Cleanup mode function, add var to control treesit debugging tools,
ELPA Syncer <=
- [nongnu] elpa/clojure-ts-mode 3dabaf535d 08/71: Hijack clojure-mode's auto/interpreter-mode registrations, ELPA Syncer, 2023/08/25
- [nongnu] elpa/clojure-ts-mode d6985289f8 70/71: Add info about mailing list alternative in CONTRIBUTING.md, ELPA Syncer, 2023/08/25
- [nongnu] elpa/clojure-ts-mode 359521e61f 52/71: Add MELPA Stable badge and Make 0.1.0 version, ELPA Syncer, 2023/08/25
- [nongnu] elpa/clojure-ts-mode 54a69be9cd 29/71: Use eldev to lint the project, ELPA Syncer, 2023/08/25
- [nongnu] elpa/clojure-ts-mode aaac7df2cc 26/71: Remove unneeded progn, ELPA Syncer, 2023/08/25
- [nongnu] elpa/clojure-ts-mode ae3790adc0 65/71: Allow user to configure highlighting comment macro body, ELPA Syncer, 2023/08/25
- [nongnu] elpa/clojure-ts-mode 3e4c55fab1 71/71: 0.1.4 in package header, ELPA Syncer, 2023/08/25
- [nongnu] elpa/clojure-ts-mode c9f1ed357d 13/71: Refer users to upstream tree-sitter-clojure, ELPA Syncer, 2023/08/25
- [nongnu] elpa/clojure-ts-mode 30d1d8a3f3 02/71: Add dir-locals, try to fix license badge, ELPA Syncer, 2023/08/25
- [nongnu] elpa/clojure-ts-mode 25df890b68 21/71: Remove old test file, no longer needed, ELPA Syncer, 2023/08/25