-
-
Notifications
You must be signed in to change notification settings - Fork 908
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
js2-mode and derived modes displays lag when typing in large files (300 lines of code or more) #588
Comments
The issue is caused by the fact that the typescript language synchronization is @shackra I would suggest switching to the other javascript language server which seems to be smarter and also supports partial updates(these lines will fix the perf issue).
|
// src/typescript-service.ts
public async textDocumentDidChange(params: DidChangeTextDocumentParams): Promise<void> {
const uri = normalizeUri(params.textDocument.uri)
let text: string | undefined
for (const change of params.contentChanges) {
if (change.range || change.rangeLength) {
throw new Error('incremental updates in textDocument/didChange not supported for file ' + uri)
}
text = change.text
}
if (!text) { |
Ah, indeed @yyoncho, the current typescript server is |
Hay un bug con el servidor actual, javascript-typescript-stdio, que releentiza la edición de código en rjsx-mode. Feliz año nuevo y feliz solemnidad de María madre de Dios :) - emacs-lsp/lsp-mode#588
@MaskRay IMO it is not server side issue since full sync is a valid option according to latest LSP spec and we should provide reasonable handling/performance. I am thinking about adding client-side debounce only for full sync text messages. |
Describe the bug
When lsp-mode is turned on in js2-mode and derived modes, like rjsx-mode, typing is a painful experience full of lag (1 or 2 seconds or even more depending on how fast you are writing code).
To Reproduce
Steps to reproduce the behavior:
emacs -q
fero.zip
src/components/Invoice/detalle.jsx
:disabled
under(use-package lsp
to disabled lsp-mode, then try to reproduce, you will see that typing is smooth again.Expected behavior
no lag at all like typing in large files with go-mode or python-mode and lsp-mode running.
Which Language Server did you use
this is included with the configuration.
OS
GNU/Linux (Arch)
This happens with lsp-mode version 20181228.819 and only on js2-mode derived modes.
The text was updated successfully, but these errors were encountered: