Closed jacksonludwig closed 3 years ago
Should be problem of your tsserver, checkout https://github.com/neoclide/coc.nvim/wiki/Debug-language-server#using-output-channel
Can't reproduce with typescript 4.2.x.
Use <C-n>
to insert word of complete item which avoid snippet insert.
In react/tsx/jsx, components can be functions like this:
When trying to use this component inside another, you should write it like this:
However, when using completion to select
ExampleComponent
, it is completed asExampleComponent()
instead. It seems that tsserver is mistakingExampleComponent
for a normal function instead of a react component.I'm using the latest release branch of COC, and the most updated version of coc-tsserver. I'm on neovim nightly.
Setting
"typescript.suggest.completeFunctionCalls"
tofalse
is a workaround for this issue, but of course disables parens in all completions.