projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b32f50c
)
* lisp/treesit.el (treesit-max-buffer-size): Enlarge value.
author
Yuan Fu
<casouri@gmail.com>
Tue, 22 Nov 2022 06:32:51 +0000
(22:32 -0800)
committer
Yuan Fu
<casouri@gmail.com>
Tue, 22 Nov 2022 09:06:51 +0000
(
01:06
-0800)
lisp/treesit.el
patch
|
blob
|
history
diff --git
a/lisp/treesit.el
b/lisp/treesit.el
index 0dcd16d89ae26c9d9c4bda9a99a8ec40cf0d1651..24387c287a7710b1f60e59dfcce99bcb22cb1f4f 100644
(file)
--- a/
lisp/treesit.el
+++ b/
lisp/treesit.el
@@
-95,7
+95,12
@@
indent, imenu, etc."
:group 'tools
:version "29.1")
-(defcustom treesit-max-buffer-size (* 4 1024 1024)
+(defcustom treesit-max-buffer-size
+ (let ((mb (* 1024 1024)))
+ ;; 40MB for 64-bit systems, 15 for 32-bit.
+ (if (> most-positive-fixnum (* 4 1024 mb))
+ (* 40 mb)
+ (* 15 mb)))
"Maximum buffer size for enabling tree-sitter parsing (in bytes)."
:type 'integer
:version "29.1")