From: Yuan Fu Date: Tue, 22 Nov 2022 06:32:51 +0000 (-0800) Subject: * lisp/treesit.el (treesit-max-buffer-size): Enlarge value. X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ca87a0133d893fd8cde00a9738d4c3b4dafe155f;p=emacs.git * lisp/treesit.el (treesit-max-buffer-size): Enlarge value. --- diff --git a/lisp/treesit.el b/lisp/treesit.el index b81396fc229..8f5d28f656c 100644 --- 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")