From 51e5c2a60253a4119cfb845e8b77d213a6dc2ac2 Mon Sep 17 00:00:00 2001 From: ray Date: Tue, 13 Jan 2026 20:12:02 +0000 Subject: [PATCH] Add fold support for comment blocks in PHP Introduce a new query file to enable folding of comment blocks, including docblocks, enhancing code readability and organization. --- after/queries/php/folds.scm | 4 ++++ lua/plugins/ufo.lua | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 after/queries/php/folds.scm diff --git a/after/queries/php/folds.scm b/after/queries/php/folds.scm new file mode 100644 index 0000000..57f8cae --- /dev/null +++ b/after/queries/php/folds.scm @@ -0,0 +1,4 @@ +;; extends + +;; Fold comment blocks (including /** */ docblocks) +(comment) @fold diff --git a/lua/plugins/ufo.lua b/lua/plugins/ufo.lua index 5920173..097a13e 100644 --- a/lua/plugins/ufo.lua +++ b/lua/plugins/ufo.lua @@ -26,7 +26,7 @@ return { -- Open folds when searching open_fold_hl_timeout = 150, close_fold_kinds_for_ft = { - default = { 'imports', 'comment' }, + default = { 'imports' }, }, preview = { win_config = {