diff --git a/nvim/coc-languages/javascript.vim b/nvim/coc-languages/javascript.vim index f5c88e9..e6b8c5a 100644 --- a/nvim/coc-languages/javascript.vim +++ b/nvim/coc-languages/javascript.vim @@ -1,7 +1,8 @@ let g:coc_global_extensions += ['coc-tsserver', 'coc-eslint', 'coc-prettier'] -let g:coc_filetypes += ['javascript', 'javascript.jsx', 'typescript', 'typescript.jsx'] +let s:filetypes = ['javascript', 'javascriptreact', 'typescript', 'typescriptreact'] +let g:coc_filetypes += s:filetypes let g:coc_user_config['eslint'] = { -\ 'filetypes': ['javascript', 'javascriptreact'], +\ 'filetypes': s:filetypes, \ 'autoFixOnSave': v:true, \ } let g:coc_user_config['prettier'] = {