This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-02-24
Channels
- # announcements (5)
- # aws (24)
- # babashka (41)
- # beginners (130)
- # bristol-clojurians (2)
- # calva (39)
- # chlorine-clover (64)
- # cider (30)
- # clojure (202)
- # clojure-belgium (1)
- # clojure-dev (99)
- # clojure-europe (5)
- # clojure-hungary (4)
- # clojure-italy (10)
- # clojure-losangeles (8)
- # clojure-nl (11)
- # clojure-norway (6)
- # clojure-spec (7)
- # clojure-uk (12)
- # clojurescript (52)
- # core-typed (26)
- # cursive (19)
- # data-science (19)
- # datomic (19)
- # duct (10)
- # emacs (17)
- # fulcro (22)
- # graalvm (11)
- # jobs (3)
- # kaocha (28)
- # leiningen (6)
- # lumo (2)
- # malli (10)
- # nrepl (2)
- # off-topic (23)
- # pathom (2)
- # pedestal (7)
- # re-frame (3)
- # reagent (30)
- # reitit (2)
- # remote-jobs (2)
- # shadow-cljs (77)
- # sql (10)
- # test-check (22)
- # tools-deps (37)
- # vscode (1)
- # yada (3)
So, I’ve been trying to use lsp for a few weeks now. My main struggle with it - the speed. For a bunch of reasons connecting to a lsp server would make things laggy. Sometimes it would be just a bit slow, at times it would be totally awful. After a bunch of different attempts I was able to make it somewhat manageable. Here are my suggestions: - Use latest Emacs version >= 27, with jansson support - Try tweaking gc-cons-threshold - Follow tips listed in https://github.com/emacs-lsp/lsp-mode#performance - Try to minimize things, if you’re using Spacemacs, avoid official lsp layer (it includes too much stuff) - Don’t use lsp-ui - Disable everything you don’t need, here are my values:
(setq lsp-eldoc-enable-hover nil
company-lsp-cache-candidates 'auto
lsp-after-open-hook nil
company-lsp-enable-snippet nil
lsp-enable-symbol-highlighting nil
company-lsp-enable-recompletion nil
lsp-prefer-capf t
doom-modeline-lsp nil)
Hope this helpsprobably not, there's not even a release candidate for 27 tagged yet: http://git.savannah.gnu.org/cgit/emacs.git/refs/tags
It’s not, but afaik 26 can’t be patched to support jansson. Jansson is a C library for encoding, decoding and manipulating JSON. lsp with jansson is much more faster.
@yyoncho reports that elisp native compilation makes it even more faster (like 300% more). I can’t wait for it to be released. Sadly, it would probably take at least another year or so.
I believe that elips native compilation is a branch off Emacs 28 at the moment, so yes, a little while before that is generally available.
@deleted-user I've been using GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30, cairo version 1.15.10) of 2020-02-22
(updating from HEAD) weekly for months now without issues - using cider
and clojure-mode
pinned to MELPA stable
My cider particulars are:
;; Connected to nREPL server -
;; CIDER 0.24.0 (India), nREPL 0.6.0
;; Clojure 1.10.1, Java 11.0.5
;; Docs: (doc function-name)
;; (find-doc part-of-name)
;; Source: (source function-name)
;; Javadoc: (javadoc java-object-or-class)
;; Exit: <C-c C-q>
;; Results: Stored in vars *1, *2, *3, an exception in *e;
;; Startup: /usr/local/bin/clojure -Sdeps '{:deps {nrepl {:mvn/version "0.6.0"} cider/piggieback {:mvn/version "0.4.2"} refactor-nrepl {:mvn/version "2.4.0"} cider/cider-nrepl {:mvn/version "0.24.0"}}}' -A:dev:test:system-test:backend:frontend -m nrepl.cmdline --middleware '["refactor-nrepl.middleware/wrap-refactor", "cider.nrepl/cider-middleware", "cider.piggieback/wrap-cljs-repl"]'
;;
;; ClojureScript REPL type: figwheel-main
The Emacs team are working on a release for Emacs 27 and started discussing that back in November 2019. Not sure how long it will take (not as long as Emacs 21).
If you use Ubuntu Linux you can get nightly builds of Emacs 28 as via the emacs-snapshot package by adding the Ubuntu Emacs Lisp private package archive https://launchpad.net/~ubuntu-elisp/+archive/ubuntu/ppa I have been running Emacs 27 snapshot from there for a while. As it called a different name, you can have both Emacs stable and snapshot installed an run which ever version you want.
My understanding is Homebrew only provides the release. You could try creating your own tap though, but not sure if that overrides the usual brew.