Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuring deno.enable = false always show the error. #184

Closed
LumaKernel opened this issue Oct 10, 2022 · 6 comments
Closed

Configuring deno.enable = false always show the error. #184

LumaKernel opened this issue Oct 10, 2022 · 6 comments

Comments

@LumaKernel
Copy link
Contributor

LumaKernel commented Oct 10, 2022

Hi 💫

import { workspace } from 'coc.nvim';

// ...
  workspace.getConfiguration('deno').update('enable', false);
// ...

Firing above anyway after running coc-deno, it shows always the error. I checked this by registering as command including just this line like following, and just fire it with CocCommand myext.test.

// ...
  commands.registerCommand(`${EXTENSION_NS}.test`, () => {
    workspace.getConfiguration('deno').update('enable', false);
  });
// ...

Error

image

[coc.nvim]: UnhandledRejection: Starting server failed
Error: Starting server failed
    at LanguageClient.$start (/home/luma/.cache/dein/nvim-huge--coc--coc--lsp/repos/github.com/neoclide/coc.nvim_master/build/index.js:54056:17)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async LanguageClient.sendNotification (/home/luma/.cache/dein/nvim-huge--coc--coc--lsp/repos/github.com/neoclide/coc.nvim_master/build/index.js:53769:30)
Press ENTER or type command to continue

Workaround

I confirmed it cannot occur after commenting out restart on change configuration.

https://github.com/fannheyward/coc-deno/compare/master...LumaKernel:coc-deno-pruned:master?expand=1

Suggestions

  • Restart only after enabling.
  • Suppress restarting by configuration.
    • I may prefer this one. maybe both would work, but I want to control restarting timing by my side.

Versions

  • coc.nvim : recent (Oct 1) master 354c751a6d767ff62cb2774df7d50d8ab1fb81e1
  • coc-deno : latest from npm (3.10.1)

Thanks in advance.

@LumaKernel
Copy link
Contributor Author

And I couldn't workaround by CocDisable -> (configure time) -> CocEnable.

@fannheyward
Copy link
Owner

Reproduced.

@LumaKernel LumaKernel changed the title Configuring deno.enabled = false always show the error. Configuring deno.enable = false always show the error. Oct 10, 2022
@fannheyward
Copy link
Owner

fannheyward commented Oct 10, 2022

vscode-deno only restart LS on deno.path changed.

https://github.com/denoland/vscode_deno/blob/8581e36920cc5c21cd3e43e2e94396b67b412b19/client/src/extension.ts#L141-L145

Suppress restarting by configuration.

I prefer to this too.

Updated: try to restart on deno.path only, same error.

@fannheyward
Copy link
Owner

Maybe we can fire CocRestart on configurations changed. The question is: is the restarting must have?

@fannheyward
Copy link
Owner

Suppress the restarting on configurations changed.

@fannheyward
Copy link
Owner

Suppress the restarting on configurations changed.

Released in v3.10.2

LumaKernel added a commit to LumaKernel/vim-tsdetect that referenced this issue Oct 10, 2022
- Support 0.0.82
- Drop support for old coc.nvim versions. (prior to 0.0.82)
- Drop Node.js v10 because coc.nvim also drops.
- Fix for errors on switching to node but you should use patched
  version. Refer to fannheyward/coc-deno#184
LumaKernel added a commit to LumaKernel/vim-tsdetect that referenced this issue Oct 10, 2022
- Use Vitest istead of Jest
- Update lint rules
- Drop husky and commitlint
- Remove README "to suppress erros on switching to node" (fannheyward/coc-deno#184)
LumaKernel added a commit to LumaKernel/vim-tsdetect that referenced this issue Oct 10, 2022
- Support 0.0.82
- Drop support for old coc.nvim versions. (prior to 0.0.82)
- Drop Node.js v10 because coc.nvim also drops.
- Fix for errors on switching to node but you should use patched
  version. Refer to fannheyward/coc-deno#184
LumaKernel added a commit to LumaKernel/vim-tsdetect that referenced this issue Oct 10, 2022
- Use Vitest istead of Jest
- Update lint rules
- Drop husky and commitlint
- Remove README "to suppress erros on switching to node" (fannheyward/coc-deno#184)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants