diff options
| author | Hyeon Kim <simnalamburt@gmail.com> | 2020-02-09 04:06:15 +0900 |
|---|---|---|
| committer | Hyeon Kim <simnalamburt@gmail.com> | 2020-02-09 04:08:21 +0900 |
| commit | 8a3fa163dcf78a23fcace64f675365ab47fee1b8 (patch) | |
| tree | eb9f4b818aa90ab9217e743ebfb0463afccd52c9 /autoload/prettier.vim | |
| parent | 56fb126b73516756ab71c1c71b888b3b36bcf3fe (diff) | |
| download | vim-prettier-8a3fa163dcf78a23fcace64f675365ab47fee1b8.tar.xz | |
New option: prettier#autoformat_require_pragma
The 'prettier#autoformat_config_present' option is useful but it only
worked with files with pragma. Now, you can use
'autoformat_config_present' even with files without pragma using this
'autoformat_require_pragma' option.
Diffstat (limited to 'autoload/prettier.vim')
| -rw-r--r-- | autoload/prettier.vim | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/autoload/prettier.vim b/autoload/prettier.vim index d4c3171..ebe6abd 100644 --- a/autoload/prettier.vim +++ b/autoload/prettier.vim @@ -36,7 +36,9 @@ endfunction " Allows @format and @prettier pragma support upon saving function! prettier#Autoformat(...) abort - call prettier#Prettier(1, 1, line('$'), 0, { 'requirePragma': 'true'}) + call prettier#Prettier(1, 1, line('$'), 0, { + \ 'requirePragma': g:prettier#autoformat_require_pragma ? 'true' : 'false' + \ }) endfunction " Main prettier command |
