Shougo / dein.vim

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

hooks_fileで読み込む設定に行継続していると、途中までしか読みこまれない #502

Closed yasunori0418 closed 1 year ago

yasunori0418 commented 1 year ago

Related Issues

vim-jp#plugins

Description

⚠️ All issues without an minimal init.vim or instructions to reproduce can be automatically closed.

タイトルにあるように、hooks_fileで読み込む設定に行継続が含まれる辞書型や配列があると、途中までしか読みこまれず、以下のエラーが発生します。

[dein] Error occurred while executing hook: lightline.vim
[dein] Vim(let):E697: リスト型の最後に ']' がありません:

問題の再現ができる最小構成は、現在準備中です。 上記のエラーが発生する自分のdotfilesのリンク

To Reproduce

  1. hooks_fileに従い、読み込む設定を指定する。
  2. 再度、neovimを立ち上げる
  3. descriptionに書いたエラーが発生する。

エラー発生時点のg:lightlineの内容

{'active': {}, 'colorscheme': 'nordfox'}

lightline.vim#L9までしか読み込まれていないようです。

Expected behavior

lightline.vimの内容が全て読み込まれること

Screenshots

Desktop:

Please complete the following information, when reporting bugs related to the Dein.vim.

yasunori0418 commented 1 year ago

最小構成

" Set dein base path (required) let s:dein_base = '~/.cache/dein_issue/'

" Set dein source path (required) let s:dein_src = s:dein_base . 'repos/github.com/Shougo/dein.vim'

" dein installation check if &runtimepath !~# '/dein.vim' if !isdirectory(s:dein_src) execute '!git clone https://github.com/Shougo/dein.vim' s:dein_src endif execute 'set runtimepath^=' . s:dein_src endif

" Call dein initialization (required) call dein#begin(s:dein_base)

call dein#add(s:dein_src)

call dein#add('itchyny/lightline.vim', #{ \ hooks_file: s:dein_base . 'lightline.vim' \ })

" Finish dein initialization (required) call dein#end()

filetype indent plugin on

" Enable syntax highlighting if has('syntax') syntax on endif

" Uncomment if you want to install not-installed plugins on startup. if dein#check_install() call dein#install() endif


* lightline.vim
```lightline.vim
" hook_add {{{
" default lightline settings.
let g:lightline.active = {
    \ 'left': [ [ 'mode', 'paste' ],
    \           [ 'readonly', 'filename', 'modified' ] ],
    \ 'right': [ [ 'lineinfo' ],
    \            [ 'percent' ],
    \            [ 'fileformat', 'fileencoding', 'filetype' ] ] }
let g:lightline.inactive = {
    \ 'left': [ [ 'filename' ] ],
    \ 'right': [ [ 'lineinfo' ],
    \            [ 'percent' ] ] }
let g:lightline.tabline = {
    \ 'left': [ [ 'tabs' ] ],
    \ 'right': [ [ 'close' ] ] }
" }}}
Shougo commented 1 year ago

Fixed.