FIrstly thank you for the coc.nvim project! I've been using this coc-tsserver for a long time, but just now I found something unexpected when working on my secondary computer. Not sure whether this is coc-tsserver feature or from tsserver itself, here're the cases:
Case-1: type the code sequentially, no autocompletion here.
const foo = () => {
let i = 42;
if (i > 42) {
Case-2: finish the function block first without ";", autocompletion ends if block with }
const bar = () => {
} // manually typed
And then insert between:
const bar = () => {
let i = 42;
if (i > 42) {
// cursor here
} // inserted by autocompletion
} // manually typed
Case-3: finish the function block first with ";", autocopletion ends if block with );
const baz = () => {
}; // manually typed
And then insert between:
const baz = () => {
let i = 42;
if (i > 42) {
// cursor here
}; // inserted by autocompletion
}; // manually typed
These situations also occur with function callbacks, such as
foo(() => {
});
I've seen unnecessary }); many times especially when I've closed the function call manually. My configuration file looks like this (edited with :CocConfig) but it doesn't work for typescript.
1.8.1: Everything seems fine on my primary computer.
1.8.6: Wired as explained above on my secondary computer.
I tried to downgrade coc-tsserver from 1.8.6 to 1.8.1 by editing package.json and running npm install, but the problem still occurs on my secondary computer. Both computers run self compiled vim 8.2 (included patches 1-2528) and coc.nvim-0.0.80. Is there anyway to turn off this feature?
FIrstly thank you for the coc.nvim project! I've been using this
coc-tsserver
for a long time, but just now I found something unexpected when working on my secondary computer. Not sure whether this is coc-tsserver feature or from tsserver itself, here're the cases:Case-1: type the code sequentially, no autocompletion here.
Case-2: finish the function block first without ";", autocompletion ends
if
block with}
And then insert between:
Case-3: finish the function block first with ";", autocopletion ends
if
block with);
And then insert between:
These situations also occur with function callbacks, such as
I've seen unnecessary
});
many times especially when I've closed the function call manually. My configuration file looks like this (edited with:CocConfig
) but it doesn't work for typescript.Versions:
1.8.1
: Everything seems fine on my primary computer.1.8.6
: Wired as explained above on my secondary computer.I tried to downgrade
coc-tsserver
from1.8.6
to1.8.1
by editingpackage.json
and runningnpm install
, but the problem still occurs on my secondary computer. Both computers run self compiled vim 8.2 (included patches 1-2528) and coc.nvim-0.0.80. Is there anyway to turn off this feature?