-
-
Notifications
You must be signed in to change notification settings - Fork 860
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
Add a note how default lsp-enable-indentation
settings can hit performance and editing experience.
#3933
base: master
Are you sure you want to change the base?
Conversation
My JS editing was halting during editing with this in Messages buffer: `lsp-request: Timeout while waiting for response. Method: textDocument/rangeFormatting`. Disabling indentation in the config solved the problem. I think this has to be `nil` by default or correctly set based on server features. I used this gitter thread as a hint, although I couldn't find this issue mentioned anywhere in the docs
I also received complains about |
Can someone provide some callstack who is calling this range formatting? |
@yyoncho, here's what in my logs:
Give me an idea of what should I instrument for the stack trace you're looking for. |
Most likely |
For clojure users it's pretty common during use of parent manipulations: Debugger entered--entering a function:
* lsp-format-region(2367 2800)
apply(lsp-format-region (2367 2800))
#f(advice-wrapper :override clojure-indent-region lsp-format-region)(2367 2800)
indent-region(2367 2800 nil)
paredit-forward-and-indent(nil)
paredit-forward-barf-sexp(nil)
funcall-interactively(paredit-forward-barf-sexp nil)
command-execute(paredit-forward-barf-sexp)
|
@yyoncho, here we go: plugins/Debugger entered--entering a function:
* lsp-format-region(883 1013)
apply(lsp-format-region (883 1013))
#f(advice lsp-format-region :override #f(compiled-function (&rest args) #<bytecode -0x1d384fe0445d58b6>))(883 1013)
indent-region(883 1013 nil)
sp--indent-region(883 1013)
sp--cleanup-after-kill()
sp-backward-kill-symbol(1 t)
sp-backward-delete-symbol(1 t)
sp-backward-delete-word(1)
funcall-interactively(sp-backward-delete-word 1)
call-interactively(sp-backward-delete-word nil nil)
command-execute(sp-backward-delete-word) |
Can you fix the wording that the issue can happen only in combination with smartparens? |
My JS editing was halting during editing with this in Messages buffer:
lsp-request: Timeout while waiting for response. Method: textDocument/rangeFormatting
. Disabling indentation in the config solved the problem. I think this has to benil
by default or correctly set based on server features. I used this gitter thread as a hint, although I couldn't find this issue mentioned anywhere in the docs