Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can I automatically disable vim-prettier if .prettierrc is doesn't exists in project folder? #195

Closed
azat-io opened this issue Aug 20, 2019 · 2 comments

Comments

@azat-io
Copy link

azat-io commented Aug 20, 2019

No description provided.

@mitermayer
Copy link
Member

Hi @azat-io ,

Do you mind elaborating on the above request?

  • Do you want to not load the vim-pluggin when you are not in a directory that has a .prettierrc ?
  • Do you want to not autoformat when you are not in a project with .prettierrc ?

I am not sure I understood the above request, but vim plugin managers can have custom loading rules vim-prettier plugin can be configured using your vim plugin manager to decided when it should be loaded, an example is:

Plug 'prettier/vim-prettier', {
  \ 'do': 'yarn install',
  \ 'branch': 'release/1.x',
  \ 'for': [
    \ 'javascript',
    \ 'typescript',
    \ 'css',
    \ 'less',
    \ 'scss',
    \ 'json',
    \ 'graphql',
    \ 'markdown',
    \ 'vue',
    \ 'lua',
    \ 'php',
    \ 'python',
    \ 'html',
    \ 'swift' ] }

@mitermayer
Copy link
Member

Duplicate of #182

@mitermayer mitermayer marked this as a duplicate of #182 Aug 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants