this post was submitted on 17 Oct 2023
1 points (100.0% liked)

Emacs

313 readers
3 users here now

A community for the timeless and infinitely powerful editor. Want to see what Emacs is capable of?!

Get Emacs

Rules

  1. Posts should be emacs related
  2. Be kind please
  3. Yes, we already know: Google results for "emacs" and "vi" link to each other. We good.

Emacs Resources

Emacs Tutorials

Useful Emacs configuration files and distributions

Quick pain-saver tip

founded 1 year ago
MODERATORS
 

Hello, I'm currently experiencing a lot of input lag and slowness when working on javascript projects. May I ask what extra configuration I'm missing in order to fix this issue? I'm using doom emacs. My configuration looks as follows:

(use-package! lsp-mode
  :hook
  (rustic-mode . lsp)
  (json-mode . lsp)
  (sh-mode . lsp)
  (typescript-mode . lsp)
  (javascript-mode . lsp)
  (js2-mode . lsp)
  (rjsx-mode . lsp)
  :commands lsp
  :config
  (setq lsp-log-io nil)
  (setq lsp-eldoc-render-all nil)
  (setq lsp-inlay-hint-enable nil)
  (setq lsp-lens-enable nil)
  (setq lsp-signature-render-documentation nil)
  (setq lsp-signature-auto-activate nil)
  (setq lsp-eldoc-enable-hover nil)
  (setq lsp-modeline-code-actions-enable nil))

(use-package! lsp-ui
  :hook (lsp-mode . lsp-ui-mode)
  :config
  (setq lsp-eldoc-enable-hover nil)
  (setq eldoc-documentation-functions nil)
  (setq lsp-ui-sideline-enable nil)
  (setq lsp-ui-sideline-show-diagnostics nil)
  (setq lsp-ui-sideline-show-hover nil)
  (setq lsp-ui-peek-always-show nil)
  (setq lsp-eldoc-render-all nil)
  (setq lsp-eldoc-enable-hover nil)
  (setq lsp-ui-doc-enable nil))

As you can see, I have most lsp features disabled to improve performance, but yet I'm having a bad experience while working on JS files. I'd kindly appreciate any suggestion.

top 1 comments
sorted by: hot top controversial new old
[–] Qudit314159@alien.top 1 points 1 year ago

I haven't usedlsp-mode with JavaScript. However, the first thing to try is to check if there is an alternative server that might be faster. This makes a big difference for some languages.