diff options
Diffstat (limited to 'lisp/progmodes/lua-ts-mode.el')
| -rw-r--r-- | lisp/progmodes/lua-ts-mode.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/progmodes/lua-ts-mode.el b/lisp/progmodes/lua-ts-mode.el index 8d726b9b15b..2963d5a96af 100644 --- a/lisp/progmodes/lua-ts-mode.el +++ b/lisp/progmodes/lua-ts-mode.el @@ -675,7 +675,9 @@ Calls REPORT-FN directly." :syntax-table lua-ts--syntax-table (use-local-map lua-ts-mode-map) - (when (treesit-ensure-installed 'lua) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'lua) + (treesit-ready-p 'lua)) (setq treesit-primary-parser (treesit-parser-create 'lua)) ;; Comments. |
