Shougo / dein.vim

:zap: Dark powered Vim/Neovim plugin manager
MIT License
3.42k stars 197 forks source link

In the hooks_file, if a marker that you want to use purely as a folding marker is nested in a marker that contains a hook_name, it will not be parsed correctly. #514

Closed kurokoji closed 3 months ago

kurokoji commented 3 months ago

Description

In the hooks_file, if a marker that you want to use purely as a folding marker is nested in a marker that contains a hook_name, it will not be parsed correctly.

The hooks_file where the bug occurs looks like this:

" hook_add {{{
echom "hook_add"

" example {{{
echom "example"
" }}}

echom "ignored"
" }}}

To Reproduce

Not working as expected when activated using Minimal Config.

Expected behavior

I want echom "ignored" to be included in hook_add.

Screenshots

image

Desktop:

Minimal Config

let $CACHE = expand('$BASE_DIR/cache') if !isdirectory($CACHE) call mkdir($CACHE, 'p') endif

let s:dein_base_dir = expand('$CACHE/dein') let s:dein_dir = expand(s:dein_base_dir .. '/repos/github.com/Shougo/dein.vim')

if &runtimepath !~# '/dein.vim' if !isdirectory(s:dein_dir) echo 'install dein.vim' execute '!git clone https://github.com/Shougo/dein.vim' s:dein_dir endif

execute 'set runtimepath^=' . substitute(fnamemodify(s:dein_dir, ':p'), '[/\]$', '', '') endif

let $NORMAL_TOML_DIR = expand('$BASE_DIR/toml')

let s:normal_toml_list = split(glob($NORMAL_TOML_DIR .. '/*.toml'), '\n')

if dein#min#load_state(s:dein_base_dir) call dein#begin(s:dein_base_dir)

for toml in s:normal_toml_list call dein#load_toml(toml, #{ lazy: 0 }) endfor

call dein#end()

call dein#save_state() endif

if has('vim_starting') && dein#check_install() call dein#install() endif


- toml/dein.toml
``` toml
[[plugins]]
repo = 'Shougo/dein.vim'
hooks_file = '$NORMAL_TOML_DIR/hooks_file.vim'

" example {{{ echom "example" " }}}

echom "ignored" " }}}



## Additional context

If it's the specs, you can safely ignore this issue.