Shougo / dein.vim

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

`[ftplugin]` in toml is not loaded #473

Closed uga-rosa closed 1 year ago

uga-rosa commented 1 year ago

Warning: I will close the issue without the minimal init.vim and the reproduction instructions.

Problems summary

Expected

I want to use the [ftplugin] section in deinft.toml to override formatoptions.

Environment Information (Required!)

Provide a minimal init.vim/vimrc without plugin managers (Required!)

let $TEMP = expand('/tmp')
if &runtimepath !~# '/dein.vim'
  let s:dein_dir = $TEMP . '/dein/repos/github.com/Shougo/dein.vim'
  if !isdirectory(s:dein_dir)
    execute '!git clone https://github.com/Shougo/dein.vim' s:dein_dir
  endif
  execute 'set runtimepath^=' . fnamemodify(s:dein_dir, ':p')
endif

let s:base_dir = fnamemodify(expand('<sfile>'), ':h')
let s:dein_ft_toml = s:base_dir . '/deinft.toml'

let s:path = $TEMP . '/dein'
call dein#begin(s:path)
call dein#load_toml(s:dein_ft_toml)
call dein#end()

And deinft.toml

[ftplugin]

_ = '''
    setl formatoptions-=t
    setl formatoptions-=c
    setl formatoptions-=r
    setl formatoptions-=o
    setl formatoptions+=mMl
'''

How to reproduce the problem from neovim/Vim startup (Required!)

After startup, open init.vim and you will see that formatoptions has not been overwritten.

Screen shot (if possible)

Upload the log messages by :redir and :message (if errored)

Shougo commented 1 year ago

filetype plugin indent on is needed after call dein#end().

uga-rosa commented 1 year ago

Oh, it's true. It's fixed. Thank you.