[ ] You may also try reproduce the issue using clean environment using the following command: M-x lsp-start-plain
Bug description
I just updated to lsp 9 and the latest typescript language server.
When I call "Extract to function in module scope" it hangs for about 10 seconds (which seems to be lsp-response-timeout) and shows
lsp-workspace-command-execute: ‘workspace/executeCommand’ with ‘_typescript.applyRefactoring’ failed.
(error "Timeout while waiting for response. Method: workspace/executeCommand")```
Note that refactoring is **working**. The bug is that it hangs and shows an error.
### Steps to reproduce
In a test script run via _npx tsx test.ts_
function log_add() {
const a = 1;
const b = 2;
const sum = a + b;
console.log('sum', sum);
}
- mark the the tree lines with const at the beginning
- Run lsp-execute-code-action
- Select "Extract to function in module scope"
- Type a 'add' in the prompt "Rename newFunction to:"
Result:
lsp-workspace-command-execute: ‘workspace/executeCommand’ with ‘_typescript.applyRefactoring’ failed.
(error "Timeout while waiting for response. Method: workspace/executeCommand")Invalid face referenc
If you wait 10 seconds in the prompt for a new name the error appears immediately
If a add a (message "DEBUG.. ") line at the top of the lsp-request function I see multiple requests
LSP :: Connected to [ts-ls:28236/starting c:/code/react/rproj4].
Prettier restart complete.
LSP :: ts-ls:28236 initialized successfully in folders: (c:/code/react/rproj4)
DEBUG lsp-request "textDocument/codeAction"
DEBUG lsp-request "workspace/executeCommand"
LSP :: Applying 2 edits to vproj4-vjtest.ts' ... Applying 2 edits tovproj4-vjtest.ts' ...done
DEBUG lsp-request "textDocument/prepareRename"
DEBUG lsp-request "textDocument/rename"
LSP :: Applying 2 edits to vproj4-vjtest.ts' ... Applying 2 edits tovproj4-vjtest.ts' ...done
lsp-workspace-command-execute: ‘workspace/executeCommand’ with ‘_typescript.applyRefactoring’ failed.
(error "Timeout while waiting for response. Method: workspace/executeCommand")Invalid face referenc
Thank you for the bug report
lsp-mode
related packages.M-x lsp-start-plain
Bug description
I just updated to lsp 9 and the latest typescript language server.
When I call "Extract to function in module scope" it hangs for about 10 seconds (which seems to be lsp-response-timeout) and shows
function log_add() { const a = 1; const b = 2; const sum = a + b; console.log('sum', sum); }
LSP :: Connected to [ts-ls:28236/starting c:/code/react/rproj4]. Prettier restart complete. LSP :: ts-ls:28236 initialized successfully in folders: (c:/code/react/rproj4) DEBUG lsp-request "textDocument/codeAction" DEBUG lsp-request "workspace/executeCommand" LSP :: Applying 2 edits to
vproj4-vjtest.ts' ... Applying 2 edits to
vproj4-vjtest.ts' ...done DEBUG lsp-request "textDocument/prepareRename" DEBUG lsp-request "textDocument/rename" LSP :: Applying 2 edits tovproj4-vjtest.ts' ... Applying 2 edits to
vproj4-vjtest.ts' ...done lsp-workspace-command-execute: ‘workspace/executeCommand’ with ‘_typescript.applyRefactoring’ failed. (error "Timeout while waiting for response. Method: workspace/executeCommand")Invalid face referencAnything else?
No response