diff options
| author | Mitermayer Reis <mitermayer.reis@gmail.com> | 2017-10-03 22:55:56 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-10-03 22:55:56 -0700 |
| commit | f520800ddf0b092e8c34277c96d630bc3171fd8b (patch) | |
| tree | 786f8daee955db01b423b1ade55aeafb5d0373c1 | |
| parent | 3cde181b6b5481496b21bd35b832bdee25df267d (diff) | |
| parent | bea51845924b743e2aa6e3a16e0729e67041fa9c (diff) | |
| download | vim-prettier-f520800ddf0b092e8c34277c96d630bc3171fd8b.tar.xz | |
Merge pull request #61 from prettier/issue/60-allow-overrides-using-stdin-filepath
bug: Fixing config overwrite value for non js by levaraging --stdin-f…
| -rw-r--r-- | autoload/prettier.vim | 2 | ||||
| -rw-r--r-- | ftplugin/css.vim | 5 | ||||
| -rw-r--r-- | ftplugin/graphql.vim | 5 | ||||
| -rw-r--r-- | ftplugin/json.vim | 6 | ||||
| -rw-r--r-- | ftplugin/less.vim | 5 | ||||
| -rw-r--r-- | ftplugin/scss.vim | 5 | ||||
| -rw-r--r-- | ftplugin/typescript.vim | 5 | ||||
| -rw-r--r-- | package.json | 2 |
8 files changed, 3 insertions, 32 deletions
diff --git a/autoload/prettier.vim b/autoload/prettier.vim index d2b0a7f..d3caa50 100644 --- a/autoload/prettier.vim +++ b/autoload/prettier.vim @@ -213,6 +213,8 @@ function! s:Get_Prettier_Exec_Args(config) abort \ get(a:config, 'parser', g:prettier#config#parser) . \ ' --config-precedence ' . \ get(a:config, 'configPrecedence', g:prettier#config#config_precedence) . + \ ' --stdin-filepath ' . + \ simplify(expand("%:t")) . \ ' --stdin ' return l:cmd endfunction diff --git a/ftplugin/css.vim b/ftplugin/css.vim index e054380..bc2aec7 100644 --- a/ftplugin/css.vim +++ b/ftplugin/css.vim @@ -1,8 +1,3 @@ -let b:prettier_ft_default_args = { - \ 'parser': 'css', - \ 'configPrecedence': 'cli-override', - \ } - augroup Prettier autocmd! if g:prettier#autoformat diff --git a/ftplugin/graphql.vim b/ftplugin/graphql.vim index b1905e3..bc2aec7 100644 --- a/ftplugin/graphql.vim +++ b/ftplugin/graphql.vim @@ -1,8 +1,3 @@ -let b:prettier_ft_default_args = { - \ 'parser': 'graphql', - \ 'configPrecedence': 'cli-override', - \ } - augroup Prettier autocmd! if g:prettier#autoformat diff --git a/ftplugin/json.vim b/ftplugin/json.vim index e911839..bc2aec7 100644 --- a/ftplugin/json.vim +++ b/ftplugin/json.vim @@ -1,9 +1,3 @@ -let b:prettier_ft_default_args = { - \ 'parser': 'json', - \ 'trailingComma': 'none', - \ 'configPrecedence': 'cli-override', - \ } - augroup Prettier autocmd! if g:prettier#autoformat diff --git a/ftplugin/less.vim b/ftplugin/less.vim index a959e7c..bc2aec7 100644 --- a/ftplugin/less.vim +++ b/ftplugin/less.vim @@ -1,8 +1,3 @@ -let b:prettier_ft_default_args = { - \ 'parser': 'less', - \ 'configPrecedence': 'cli-override', - \ } - augroup Prettier autocmd! if g:prettier#autoformat diff --git a/ftplugin/scss.vim b/ftplugin/scss.vim index f20fc25..bc2aec7 100644 --- a/ftplugin/scss.vim +++ b/ftplugin/scss.vim @@ -1,8 +1,3 @@ -let b:prettier_ft_default_args = { - \ 'parser': 'scss', - \ 'configPrecedence': 'cli-override', - \ } - augroup Prettier autocmd! if g:prettier#autoformat diff --git a/ftplugin/typescript.vim b/ftplugin/typescript.vim index a26be67..bc2aec7 100644 --- a/ftplugin/typescript.vim +++ b/ftplugin/typescript.vim @@ -1,8 +1,3 @@ -let b:prettier_ft_default_args = { - \ 'parser': 'typescript', - \ 'configPrecedence': 'cli-override', - \ } - augroup Prettier autocmd! if g:prettier#autoformat diff --git a/package.json b/package.json index 9ef941e..d93abfb 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,6 @@ "url": "git://github.com/prettier/vim-prettier.git" }, "dependencies": { - "prettier": "^1.7.2" + "prettier": "^1.7.4" } } |
