0

lsp-clojure is executed 3 times when I start emacs so it ends up using about 2.5G of memory.

$ ps aux | fgrep java
benwiz      7920 82.8  8.7 6107672 1068712 ?     Ssl  08:11   1:18 java -Xmx2g -server -Dclojure-lsp.version=release-20200828T065654 -jar /home/benwiz/bin/clojure-lsp
benwiz      8033 92.5  8.6 6440492 1057176 ?     Ssl  08:11   1:27 java -Xmx2g -server -Dclojure-lsp.version=release-20200828T065654 -jar /home/benwiz/bin/clojure-lsp
benwiz      8141 20.9  2.9 6172188 365572 ?      Ssl  08:11   0:19 java -Xmx2g -server -Dclojure-lsp.version=release-20200828T065654 -jar /home/benwiz/bin/clojure-lsp

My entire lsp-related config

(setq lsp-keymap-prefix "C-l")
(use-package lsp-mode
  :hook ((clojure-mode . lsp)
         (clojurec-mode . lsp)
         (clojurescript-mode . lsp)
         (c++-mode . lsp)
         ;; (python-mode . lsp)
         ;; (javascript-mode . lsp)
         ;; (java-mode . lsp)
         ;; (c++-mode . lsp)
         )
  :commands lsp
  :config
  (setq lsp-modeline-code-actions-segments '(icon)
        lsp-modeline-diagnostics-enable nil
        lsp-enable-file-watchers nil
        lsp-enable-indentation nil
        lsp-enable-on-type-formatting nil
        ;; Optimiazations lsp-mode https://emacs-lsp.github.io/lsp-mode/page/performance/
        gc-cons-threshold 100000000
        read-process-output-max (* 1024 1024)
        lsp-completion-provider :capf))
(use-package lsp-ui
  :commands lsp-ui-mode
  :config
  (setq lsp-ui-doc-enable nil
        lsp-ui-sideline-show-code-actions nil))
(use-package lsp-ivy
  :commands lsp-ivy-workspace-symbol
  :config
  (define-key lsp-command-map "i"
    (lambda ()
      (interactive)
      (setq current-prefix-arg '(4))
      (call-interactively 'lsp-ivy-workspace-symbol))))
(use-package company-lsp
  :commands company-lsp)

Are there supposed to be 3 instances of clojure-lsp? If not how do I go about debugging this.

3
  • Is there a question? – Stefan Sep 24 '20 at 14:32
  • Are there supposed to be 3 instances of clojure-lsp? If not how do I go about debugging this. – benwiz Sep 24 '20 at 18:40
  • You might want to clarify also what you do before seeing those 3 processes. Just starting Emacs is not supposed to start any such thing at all, but it depends on what you mean by "start Emacs". – Stefan Sep 24 '20 at 20:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.