-
-
Notifications
You must be signed in to change notification settings - Fork 139
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
Fix interference with coc-tsserver #277
Conversation
Hi @knpwrs, Thank you for this PR! On the PR https://github.com/prettier/vim-prettier/pull/272/files @johanventer has updated to remove the augroup in favour of the a single prettier group. Could you please rebase and follow similar principles? After that this should be good to be merged. How would this conflict with #279 ? @yzia2000 would this be a problem ? |
I used typescriptreact instead of typescript.tsx because the additive support for react files. This was inspired by this comment: vim/vim#4830 (comment). This also happens to be the way default runtime .vim files change ft. UPDATEI think #280 is unrelated to the typescriptreact change. I would support using javascriptreact instead of javascript.jsx and typescriptreact instead of typescript.tsx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please look into typescriptreact and javascriptreact.
@@ -1,3 +1,4 @@ | |||
augroup PrettierFileDetect | |||
autocmd BufNewFile,BufReadPost *.js,*jsx setfiletype javascript | |||
autocmd BufNewFile,BufReadPost *.js setfiletype javascript | |||
autocmd BufNewFile,BufReadPost *.jsx setfiletype javascript.jsx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any specific reason for choosing javascript.jsx. If not can you change it to javascriptreact
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only that the jsx
/ tsx
types are more semantically correct. People can use jsx
/ tsx
for more than just React.
@@ -1,3 +1,4 @@ | |||
augroup PrettierFileDetect | |||
autocmd BufNewFile,BufReadPost *.ts,*.tsx setfiletype typescript | |||
autocmd BufNewFile,BufReadPost *.ts setfiletype typescript | |||
autocmd BufNewFile,BufReadPost *.tsx setfiletype typescript.tsx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any specific reason for choosing typescript.tsx. If not can you change it to typescriptreact
It seems like #279 fixes the issue regardless. I'll close this PR for now. Thank you, all! |
Summary
coc-tsserver
has the following notice in its README:With the setting that
vim-prettier
uses (typescript
),tsx
files become an error-riddled mess withcoc-tsserver
.I've found that
vim-prettier
works better thancoc-prettier
, so I'd prefer to keepvim-prettier
installed rather than usecoc-prettier
.Test Plan