mlaursen / vim-react-snippets

Useful snippets for developing in React (Javascript and Typescript)
Apache License 2.0
238 stars 21 forks source link

JS fce being offered in a tsx file #7

Closed raph90 closed 3 years ago

raph90 commented 3 years ago

When I do 'fce' COC offers me the JS snippet for a functional component instead of the TS version. I'm not sure what the issue is, I have a tsconfig in the directory. I can share my init.vim and other config if required.

mlaursen commented 3 years ago

What's the output for set ft? in your .tsx file? The snippets will only use the TS version for typescript and typecriptreact file types which makes it seem as if it is still being set to javascript/javascriptreact.

Sharing your init.vim might help me offer some other ideas, but maybe you can try using using these syntax plugins which handle setting filetypes: .vimrc plugins