fannheyward / coc-deno

Deno extension for coc.nvim
MIT License
151 stars 9 forks source link

No hover, no intelligent suggestions #262

Closed xNaCly closed 4 weeks ago

xNaCly commented 4 weeks ago

TLDR

Problem

I have a singular typescript file (some details omitted for privacy, should still run):

async function lambda(): Promise<{ status: number; json: Record<string, any> }> {
    let body = { "hello": "world" };
    let req = await fetch("https://xnacly.me", {
        method: "POST",
        body: JSON.stringify(body),
    });
    return { status: req.status, json: {} };
}
console.log(await lambda());

I enable denols with CocCommand deno.initializeWorkspace (why is this required? Can't the plugin start upon noticing the .ts or .js extension?). After invoking vim.fn.CocActionAsync('doHover') i get the [coc.nvim] hover not found log, even when hovering over the function call and the function definition.

Am i doing something wrong or is the issue on your end?

Details:

CocInfo Output:

2024-10-16T09:43:08.194 INFO (pid:24377) [services] - LanguageClient deno state change: stopped => starting
2024-10-16T09:43:08.197 WARN (pid:24377) [commands] - Command deno.initializeWorkspace already registered
2024-10-16T09:43:08.204 INFO (pid:24377) [language-client-index] - Language server "deno" started with 25888
2024-10-16T09:43:08.448 INFO (pid:24377) [services] - LanguageClient deno state change: starting => running
2024-10-16T09:43:08.457 INFO (pid:24377) [services] - service deno started
2024-10-16T09:44:12.624 INFO (pid:24377) [attach] - receive notification: runCommand []
2024-10-16T09:44:20.262 INFO (pid:24377) [attach] - receive notification: runCommand []
2024-10-16T09:44:23.833 INFO (pid:24377) [attach] - receive notification: doHover []
2024-10-16T09:44:24.264 INFO (pid:24377) [attach] - receive notification: doHover []
2024-10-16T09:44:25.656 INFO (pid:24377) [attach] - receive notification: doHover []
2024-10-16T09:44:29.875 INFO (pid:24377) [provider-formatManager] - Format by: coc-deno
2024-10-16T09:44:54.018 INFO (pid:24377) [attach] - Request action: fillDiagnostics [ 1 ]
2024-10-16T09:45:00.277 INFO (pid:24377) [provider-formatManager] - Format by: coc-deno
2024-10-16T09:45:14.982 INFO (pid:24377) [attach] - receive notification: doHover []
2024-10-16T09:49:54.374 INFO (pid:24377) [attach] - receive notification: showInfo []

My coc and vim configuration

xNaCly commented 4 weeks ago

Well, this is akward, adding the deno.enabled: true to coc-settings.json fixed this, anyway - thanks for the great plugin, im loving deno :smile: