Fork me on GitHub
#lsp
<
2021-04-17
>
ribelo08:04:03

I guess something changed recently, and trying to go to the definition of something from an external library, like clojure.core, causes lsp and emacs to freeze for a long while. The C-g interrupts some process and momentarily everything starts working. I might be misremembering, but I think lsp used to ask if to import a project, now it seems to try to lint everything and always

ribelo08:04:19

When working with other people's code and frequently jumping around large projects/libraries, it is very cumbersome.

ribelo08:04:19

it is possible that this is a problem with the lsp implementation in emacs and not with clojure-lsp itself, but I don't know how to check

ericdallo14:04:24

Yes, it was probably related with a change on lsp-mode to improve clojure go to libs

ericdallo14:04:04

I can say it improved a lot the go to definition since now we use library folders instead of considering the new file as a new project

ericdallo14:04:20

It's the same behaviour of vscode

ericdallo14:04:32

Does it becomes slow or unusable if you go to a clojure.core definition?

ericdallo14:04:41

That works fine to me

ribelo17:04:22

I did not notice that you had written back. So basically emacs is unusable. Jump using go to definition results in 100% professor usage. Killing the clojure-lsp process helps.

ericdallo17:04:15

are you using latest lsp-mode as well?

ribelo18:04:09

clojure-lsp-bin-1:2021.04.13_12.47.33-1

ericdallo18:04:52

no clojure-lsp, lsp-mode from emacs

ribelo18:04:44

lsp-version returns err, maybe some problem with doom-emacs

ribelo18:04:05

Package: lsp-mode
     Source: Straight
     Pinned: eda51c21662253fd05b4f3f20ad7b029d9c2aff7
      Build: HEAD -> master, replaced, origin/master eda51c216 2021-03-27 19:55:40 +0200
             Build location: ~/.emacs.d/.local/straight/build-28.0.50/lsp-mode/
             Repo location: ~/.emacs.d/.local/straight/repos/lsp-mode/
     Recipe: (:type git :flavor melpa :files
                    (:defaults "clients/*.el" "lsp-mode-pkg.el")
                    :host github :repo "emacs-lsp/lsp-mode" :package "lsp-mode" :local-repo "lsp-mode")
                Homepage: 
    Modules: Declared by the following Doom modules:
             :tools lsp (readme)
    Configs: This package is configured in the following locations:
             modules/lang/cc/config.el:288:  (after! lsp-mode (require 'ccls))
             modules/tools/debugger/config.el:117:  (after! lsp-mode (require 'dap-mode))
             modules/tools/lsp/+lsp.el:19:(use-package! lsp-mode

ribelo18:04:25

this is the version from 23 days ago

ribelo18:04:36

I'm going to unpin the version, update it and see if anything changes

ribelo18:04:40

thx for your time

ericdallo19:04:43

Yes, it doesn't work for doom-emacs

ribelo21:04:02

Unfortunately update lsp-mode did not help

ericdallo22:04:01

Looks correct, is the file you are opening too big?

ericdallo22:04:11

Did you try with clojure.core functions?

ribelo22:04:12

I have the same line 1195x

ribelo22:04:09

Sorry, not the same one, because there are several hundred times the same error concerning different functions

ericdallo22:04:18

That could be improved on clojure-lso to avoid the log, but is not related with the performance

ribelo22:04:04

open file alone has 3000 loc, entire project 40 000 loc

ericdallo23:04:26

Hum feel free to open an issue on clojure-lsp, but for now I'm out of ideas :/