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

Use get() to check g:prettier#autoformat safely in ftplugin #217

Merged

Conversation

hankchiutw
Copy link
Contributor

Due to the fact that plugin will be loaded after ftplugin(https://vimdoc.sourceforge.net/htmldoc/filetype.html#ftplugin-overrule),
even we set g:prettier#autoformat in plugin/prettier.vim, it's treated as undefined in ftplugin/*.vim.

This happened when using vim-pathogen.

Due to the fact that `plugin` will be loaded after `ftplugin`(https://vimdoc.sourceforge.net/htmldoc/filetype.html#ftplugin-overrule),
even we set `g:prettier#autoformat` in plugin/prettier.vim, it's treated as undefined in ftplugin/*.vim.

This happened when using `vim-pathogen`.
@mitermayer
Copy link
Member

Thank you!

@mitermayer mitermayer merged commit 9eb448e into prettier:master Nov 19, 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

Successfully merging this pull request may close these issues.

2 participants