lsp

:clojure-lsp: Clojure implementation of the Language Server Protocol: https://clojure-lsp.io/
borkdude 2021-02-04T13:18:05.279800Z

For the longest time I didn't have navigation in CLJS code since I'm always too lazy to setup a REPL. But now I have thanks to LSP!

4
ā¤ļø 2
borkdude 2021-02-04T13:19:06.281300Z

One issue though: when indexing my project it (= lsp-mode?) complains about too many files and then I think it quits. As long as I visit the "other" file, the navigation to the "other" file works. But can't I just tell clojure-lsp to index my own sources without all the other shit it finds "too many to watch" ?

ericdallo 2021-02-04T13:19:43.281700Z

yes you can

ericdallo 2021-02-04T13:19:49.281900Z

this is the file watch system

ericdallo 2021-02-04T13:20:08.282100Z

I tweaked it on lsp-mode for clojure to ignore some dirs/files

ericdallo 2021-02-04T13:20:23.282300Z

but I think you may know more things to hide/ignore šŸ˜›

ericdallo 2021-02-04T13:20:34.282500Z

or you could customize it just for you

borkdude 2021-02-04T13:20:39.282700Z

it may be the target folder it finds "too much", I'm not sure, it doesn't say

ericdallo 2021-02-04T13:21:00.282900Z

it's a regex variable: lsp-file-watch-ignored

ericdallo 2021-02-04T13:21:30.283100Z

you can disable the warning too with: lsp-file-watch-threshold nil

borkdude 2021-02-04T13:22:06.283300Z

I'd rather find out what the problem is

borkdude 2021-02-04T13:22:58.283800Z

can I see what it is trying to watch?

ericdallo 2021-02-04T13:23:53.284Z

There is a hack, let me find it Also, the file watch means: watch for changes on this file, doesn't mean that it'll not use LSP on that file

borkdude 2021-02-04T13:24:20.284200Z

I don't watch these files, I just want LSP to have them analyzed once. This seems to be conflated.

ericdallo 2021-02-04T13:24:34.284400Z

https://github.com/emacs-lsp/lsp-mode/blob/master/lsp-mode.el#L1718 Probably eval: (lsp--directory-files-recursively (file-truename dir) ".*" t)

ericdallo 2021-02-04T13:26:07.284800Z

change dir with your project path

borkdude 2021-02-04T13:28:24.285100Z

Never mind, I this is getting too complex for me

ericdallo 2021-02-04T13:29:09.285300Z

probably is the target folder

ericdallo 2021-02-04T13:29:21.285500Z

adding something like this for target show work: https://github.com/emacs-lsp/lsp-mode/blob/master/lsp-mode.el#L336

borkdude 2021-02-04T13:29:37.285800Z

but the target folder was already in that ignore list

ericdallo 2021-02-04T13:30:22.286300Z

oh, indeed

borkdude 2021-02-04T13:30:23.286500Z

I just want to be able to say: just watch src and src-cljs, ignore all the rest

ericdallo 2021-02-04T13:30:38.286700Z

Hum, still shows me the target folder

borkdude 2021-02-04T13:30:40.286900Z

somehow it's trying to watch 4000 files, while I have only 500 or so

ericdallo 2021-02-04T13:31:24.287100Z

try this and check what is the result: M-x eval-expression

(lsp--directory-files-recursively (file-truename "/path/to/project") ".*" t)

borkdude 2021-02-04T13:32:33.287700Z

I tries this with eval-expression, but I get a blurp of errors, this is where I gave up

ericdallo 2021-02-04T13:32:49.287900Z

:thinking_face:

borkdude 2021-02-04T13:33:39.288100Z

Ah now it somehow works.

borkdude 2021-02-04T13:33:45.288300Z

Maybe your initial version wasn't working

borkdude 2021-02-04T13:33:49.288500Z

("/Users/borkdude/dre/DocSearch/app/asco/updates/AM18-Abstracts-LBAs-Final-XML.zip" "/Users/borkdude/dre/DocSearch/app/asco/updates/AM18-Abstracts-PubOnlyAndPresented-Final-XML.zip" "/Users/borkdude/dre/DocSearch/app/asco/updates/CSS18-Abstracts-Final-XML.zip" "/Users/borkdude/dre/DocSearch/app/asco/updates/GI18-Abstracts-for-Atypon.zip" "/Users/borkdude/dre/DocSearch/app/asco/updates/GI19-Abstracts-Final-XML.zip" "/Users/borkdude/dre/DocSearch/app/asco/updates/GU18-Abstracts-Atypon.zip" "/Users/borkdude/dre/DocSearch/app/asco/updates/GU19-Abstracts-Final-XML.zip" "/Users/borkdude/dre/DocSearch/app/asco/updates/IOS18-Abstracts-for-Atypon.zip" "/Users/borkdude/dre/DocSearch/app/asco/updates/IOS19-XML-Final.zip" "/Users/borkdude/dre/DocSearch/app/asco/updates" "/Users/borkdude/dre/DocSearch/app/asco" "/Users/borkdude/dre/DocSearch/app/clinicaltrials/clinicaltrials-sample/.gitignore" ...)

borkdude 2021-02-04T13:34:01.288700Z

It's watching zip files... and all kinds of directories that aren't source dirs

ericdallo 2021-02-04T13:36:40.288900Z

you could add updates folder to ignored list

ericdallo 2021-02-04T13:36:46.289100Z

AFAIK there is no allow-list šŸ˜•

borkdude 2021-02-04T13:37:20.289300Z

this isn't working for my use case. why aren't the watched dirs inferred from the classpath that clojure-lsp uses?

ericdallo 2021-02-04T13:38:06.289900Z

yeah, sadly those are 2 different things, the LSP client that should say to server what should be watched

borkdude 2021-02-04T13:38:38.290500Z

Maybe the clojure-lsp server can just ignore things it can't analyze anyway?

borkdude 2021-02-04T13:38:46.290800Z

or doesn't that help?

erwinrooijakkers 2021-02-04T13:39:03.291300Z

Hi all, I am using lsp layer in spacemacs and added clojure-backend ā€™lsp to clojure variables, I get this error in *clojure-lsp::stderr*:

Error: Invalid or corrupt jarfile /Users/erooijak/.emacs.d/.cache/lsp/clojure/clojure-lsp

erwinrooijakkers 2021-02-08T10:42:21.379700Z

thank you

erwinrooijakkers 2021-02-08T13:59:44.389700Z

okay this works, also had to remove xattr -d com.apple.quarantine ./clojure-lsp

ericdallo 2021-02-08T14:00:30.390500Z

oh, good to know, BTW latest release already makes it executable

erwinrooijakkers 2021-02-04T13:39:07.291500Z

Any idea how to fix?

borkdude 2021-02-04T13:39:10.291600Z

Can I put a .lsp-ignore?

ericdallo 2021-02-04T13:39:16.291800Z

we already do that, we drop things we don't know

borkdude 2021-02-04T13:39:29.292300Z

or maybe maybe lsp-mode can look in .gitignore? I think that should work for me

borkdude 2021-02-04T13:40:25.292500Z

lsp-file-watch-ignored <<< .gitignore

ericdallo 2021-02-04T13:40:44.292700Z

I think these are valid ideas, but lsp-mode does not support it, you should raise an issue there, or ask here: https://discord.gg/swuxy5AAgT

ericdallo 2021-02-04T13:40:55.293Z

the gitignore idea seems valid

borkdude 2021-02-04T13:41:17.293200Z

ok, I might do it later. Have to get on with work now

šŸ‘ 1
ericdallo 2021-02-04T13:44:48.293900Z

Hey @erwinrooijakkers, where did you download the clojure-lsp binary? I suggest you download it from the latest release on clojure-lsp

ericdallo 2021-02-04T13:44:56.294100Z

https://github.com/clojure-lsp/clojure-lsp/releases

ericdallo 2021-02-04T13:45:17.294300Z

Not sure from where spaceemacs is downloading

ericdallo 2021-02-04T13:45:24.294500Z

or what version

dpsutton 2021-02-04T14:16:01.295800Z

I made a PR for this that was rejected. A way to specify the source paths. I also ran into this and havenā€™t used lsp in a while because of it

borkdude 2021-02-04T14:16:32.296Z

Yeah, this sucks

borkdude 2021-02-04T14:17:38.296200Z

@dpsutton Do you still have the issue number / link? I'll make a comment that this is exactly what I want as opposed to "add everything except"

dpsutton 2021-02-04T14:18:16.296600Z

Iā€™ll look it up. One second

borkdude 2021-02-04T14:21:28.297100Z

@dpsutton I don't see it being rejected, it's just stalled on some discussion?

borkdude 2021-02-04T14:21:55.297300Z

Maybe start with an issue rather than a PR, to verify what is the desired implementation?

ericdallo 2021-02-04T14:22:01.297500Z

the gitignore idea seems valid:

ericdallo 2021-02-04T14:22:19.297900Z

is just that is not that trivial to support all gitignore syntax

borkdude 2021-02-04T14:22:44.298100Z

maybe git itself can be leveraged to list files that are not ignored?

borkdude 2021-02-04T14:23:20.298300Z

as in "watch only what is part of my git index"

borkdude 2021-02-04T14:23:57.298500Z

git ls-tree --full-tree -r --name-only HEAD

borkdude 2021-02-04T14:24:12.298700Z

this seems like a no-brainer option to me

ericdallo 2021-02-04T14:24:49.298900Z

I don't see a problem, but it'd need lsp-mode depend on git installed for that feature

ericdallo 2021-02-04T14:24:54.299100Z

but I agree it makes sense

borkdude 2021-02-04T14:25:13.299300Z

yes, it can be an option: lsp-watch-only-git-index or something

ericdallo 2021-02-04T14:25:14.299500Z

I think it's the easiest way to get done indeed

borkdude 2021-02-04T14:25:56.299700Z

and for mono-repos: only watch the files that are actually part of the project root, not the entire index

borkdude 2021-02-04T14:26:11.299900Z

e.g. project/.git, project/subproject

ericdallo 2021-02-04T14:26:54.300100Z

yes, would you mind bring these ideas to the discord server?

ericdallo 2021-02-04T14:27:05.300300Z

so we can discuss the possibilities

borkdude 2021-02-04T14:27:14.300500Z

I'm not on discord a lot

borkdude 2021-02-04T14:27:36.300700Z

which server is this

ericdallo 2021-02-04T14:27:49.300900Z

https://discord.gg/swuxy5AAgT

ericdallo 2021-02-04T14:27:52.301100Z

#development

borkdude 2021-02-04T14:53:03.301700Z

@ericdallo I think my classpath isn't properly lsp-analyzed in this project. How can I fix this?

borkdude 2021-02-04T14:53:15.301900Z

can I set the classpath manually or ..?

borkdude 2021-02-04T14:53:47.302400Z

it's a boot project and deps.edn project at the same time (one for backend and one for front-end, so it's complicated)

ericdallo 2021-02-04T14:54:22.302500Z

Check project specs: https://clojure-lsp.github.io/clojure-lsp/settings/

ericdallo 2021-02-04T14:54:28.302800Z

but I think it should work

borkdude 2021-02-04T14:55:48.303Z

I don't think I see any docs of how to influence the classpath. "it works" -> how can you verify this

borkdude 2021-02-04T14:56:06.303200Z

I can't navigate to anything I haven't visited before in my editor

borkdude 2021-02-04T14:56:20.303400Z

e.g. navigation to libs don't work

ericdallo 2021-02-04T14:56:30.303600Z

check /tmp/clojure-lsp.out

ericdallo 2021-02-04T14:56:48.303800Z

it should tell during the initialize if something gone wrong

borkdude 2021-02-04T14:57:34.304Z

2021-02-04T14:57:13.936Z MBP2019.local INFO [clojure-lsp.crawler:165] - Paths analyzed, took 3.5609107 secs. Caching for next startups...

borkdude 2021-02-04T14:57:43.304200Z

That doesn't seem like it really did anything

borkdude 2021-02-04T14:57:51.304400Z

considering the amount of deps we have

borkdude 2021-02-04T14:58:19.304600Z

I get a ton of warnings like:

2021-02-04T14:57:13.955Z MBP2019.local ERROR [clojure-lsp.crawler:149] - Cannot find position for: generate-drugbank-nq {:end-row nil, :name-end-col nil, :name-end-row nil, :name-row nil, :ns dre.task.populate, :name generate-drugbank-nq, :filename "/Users/borkdude/dre/DocSearch/app/src/dre/task/populate.clj", :col nil, :name-col nil, :end-col nil, :bucket :var-definitions, :row nil} nil

borkdude 2021-02-04T14:58:54.304800Z

like hundreds, maybe thousands

borkdude 2021-02-04T14:59:35.305Z

I think that may not be the issue though

borkdude 2021-02-04T14:59:41.305200Z

it doesn't specify what paths it analyzed

ericdallo 2021-02-04T14:59:44.305400Z

yeah, is not the issue

ericdallo 2021-02-04T15:00:08.305600Z

any Error while looking up classpath info error on logs?

borkdude 2021-02-04T15:01:00.306100Z

no. but I don't trust any logic which tries to do this automatically because our build is pretty custom

ericdallo 2021-02-04T15:01:15.306300Z

@borkdude remove .lsp/sqlite.db and restart the project and check the logs

borkdude 2021-02-04T15:01:33.306500Z

ok

ericdallo 2021-02-04T15:02:04.306700Z

You can configure custom project specs : https://clojure-lsp.github.io/clojure-lsp/settings/

ericdallo 2021-02-04T15:02:22.306900Z

on how to get the classpath

borkdude 2021-02-04T15:03:51.307100Z

2021-02-04T15:02:04.946Z MBP2019.local INFO [clojure-lsp.crawler:111] - Analyzing 2 paths with clj-kondo with batch size of 1 ...

borkdude 2021-02-04T15:04:14.307300Z

ah thanks

ericdallo 2021-02-04T15:04:34.307500Z

so go to external deps worked?

borkdude 2021-02-04T15:04:54.307700Z

I will try

borkdude 2021-02-04T15:05:52.307900Z

I think I'll make a babashka script to produce the classpath :P

ericdallo 2021-02-04T15:06:11.308100Z

hahah looks helpful

borkdude 2021-02-04T15:07:10.308300Z

I mean, to append the clojure -Spath and the boot one

ericdallo 2021-02-04T15:07:55.308500Z

oh, for your project only seems ok

ericdallo 2021-02-04T15:08:05.308700Z

but you could have 2 project specs

borkdude 2021-02-04T15:08:35.308900Z

this is better:

2021-02-04T15:08:00.235Z MBP2019.local INFO [clojure-lsp.crawler:111] - Analyzing 115 paths with clj-kondo with batch size of 3 ...
Oh I can have 2? nice

ericdallo 2021-02-04T15:08:56.309100Z

yep, this should already work: https://github.com/clojure-lsp/clojure-lsp/blob/master/src/clojure_lsp/crawler.clj#L53-L60

ericdallo 2021-02-04T15:09:08.309400Z

those are the default that clojure-lsp try

borkdude 2021-02-04T15:09:41.309600Z

nice. we have a custom clojure runner which I have to hook in here

šŸ‘ 1
borkdude 2021-02-04T15:10:39.309900Z

our boot stuff is so custom and slow

borkdude 2021-02-04T15:10:49.310100Z

it first tries to download deps from s3 for a minute

ericdallo 2021-02-04T15:10:59.310300Z

šŸ˜®

ericdallo 2021-02-04T15:11:43.310500Z

this is something I want to improve on clojure-lsp somehow, getting classpath could be slow, using lein you need to wait some secs

ericdallo 2021-02-04T15:11:51.310700Z

for your case, is way worst šŸ˜‚

borkdude 2021-02-04T15:11:55.310900Z

but this is exactly what I wanted, this config, so thanks

šŸ‘ 1
borkdude 2021-02-04T15:12:36.311200Z

This is my final config:

{:project-specs [{:project-path "deps.edn"
                  :classpath-cmd ["./clojure" "-Spath"]}
                 {:project-path "build.boot"
                  :classpath-cmd ["./boot" "show" "--fake-classpath""-Spath"]}]}

borkdude 2021-02-04T15:12:54.311400Z

does it invoke this every time I visit this project... I hope not?

ericdallo 2021-02-04T15:13:04.311600Z

it caches on sqlite

borkdude 2021-02-04T15:13:06.311800Z

maybe it can keep a sha of the files ?

borkdude 2021-02-04T15:13:27.312100Z

I mean, does it also skip the invocation of these commands then?

borkdude 2021-02-04T15:13:43.312300Z

2021-02-04T15:13:11.168Z MBP2019.local INFO [clojure-lsp.crawler:111] - Analyzing 123 paths with clj-kondo with batch size of 3 ...

borkdude 2021-02-04T15:14:02.312500Z

and does it deduplicate the paths?

ericdallo 2021-02-04T15:14:09.312700Z

yes, it uses a digest/md5 on the project-file

borkdude 2021-02-04T15:14:27.312900Z

excellent

ericdallo 2021-02-04T15:14:30.313100Z

Hum, not sure, probably don't deduplicate

ericdallo 2021-02-04T15:14:51.313300Z

oh, we create a set

ericdallo 2021-02-04T15:14:55.313500Z

so it should remove duplicates

borkdude 2021-02-04T15:15:29.313700Z

excellent, now it can find even things from cljs.core

borkdude 2021-02-04T15:15:33.313900Z

problems solved!

borkdude 2021-02-04T15:16:02.314100Z

what is your general gitignore recommendation for .lsp?

borkdude 2021-02-04T15:16:07.314300Z

.lsp/sql* ?

ericdallo 2021-02-04T15:16:37.314500Z

yep

ericdallo 2021-02-04T15:16:52.314700Z

actually, I use a global gitignore for that

ericdallo 2021-02-04T15:17:01.314900Z

since nubank has hundred of services

borkdude 2021-02-04T15:17:15.315100Z

ok

ericdallo 2021-02-04T15:17:16.315300Z

and is not everybody that uses clojure-lsp šŸ˜¢

borkdude 2021-02-04T15:17:25.315500Z

because I want to commit my config now

ericdallo 2021-02-04T15:18:09.315700Z

this is my config if you wanna copy something: https://github.com/ericdallo/dotfiles/blob/master/.lsp/config.edn

2021-02-04T20:51:34.319600Z

Does lsp-find-definition or find reference works with namespaced keywords? I am thinking about re-frame where I always struggle to navigate to the definition of the event/subscription.

ericdallo 2021-02-04T20:52:14.319700Z

Not yet, that's exactly what I'm WIP right now šŸ™‚

ericdallo 2021-02-04T20:52:21.319900Z

https://github.com/clojure-lsp/clojure-lsp/issues/288

ericdallo 2021-02-04T20:52:31.320200Z

Should be ready by tomorrow

1
ericdallo 2021-02-04T20:52:56.320400Z

Related: https://clojurians.slack.com/archives/CPABC1H61/p1612348768252400

borkdude 2021-02-04T20:56:28.320800Z

:bananadance:

pez 2021-02-04T21:54:05.321Z

You two are my heroes, @borkdude, @ericdallo. There are so many re-frame subs and handlers in my work project, I get dizzy.

2021-02-04T21:55:58.321900Z

Yeah!!!! Thanks a lot :) I was waiting for this for soooo long haha :)

borkdude 2021-02-04T21:57:17.322100Z

This will be so good. And I think this is something that wasn't available in REPL-based tooling either

borkdude 2021-02-04T21:57:35.322300Z

Maybe Cursive has something like this? I wouldn't know

ericdallo 2021-02-04T21:58:48.322500Z

hahah thanks, but not sure it will work for re-frame as you expect šŸ˜• since it's pretty common to use something like: (dispatch [:foo/bar ...]) There is no way to know what is the definition of foo/bar, it's not relate to a require or something like this

ericdallo 2021-02-04T21:59:35.322800Z

the support we are adding is for aliased namespaces like:

[my-foo :as foo]

::foo/bar

ericdallo 2021-02-04T21:59:42.323Z

then we know where is the definition

borkdude 2021-02-04T21:59:44.323200Z

@ericdallo Actually there will be something like this. The keyword "definition" is already support for clojure.spec.alpha/def

borkdude 2021-02-04T22:00:17.323500Z

Auto-resolving keywords doesn't make it a "definition"

ericdallo 2021-02-04T22:01:55.323800Z

does clj-kondo provides the :def for those cases?

ericdallo 2021-02-04T22:02:04.324Z

I think it'd be possible

borkdude 2021-02-04T22:02:16.324200Z

What I already find a win is that you could do find references and you will get all the occurrences of :foo/bar regardless of alias

ericdallo 2021-02-04T22:02:33.324400Z

on the same namespace, you mean?

borkdude 2021-02-04T22:02:51.324600Z

clj-kondo provides :def for clojure.spec.alpha/def currently, but hooks will be extended with the possibility of registering your own def'ed keywords

šŸ‘ 1
borkdude 2021-02-04T22:03:49.324900Z

What I personally want is, regardless of :def just have a list of all :foo/bar whether they occurs as ::f/bar or :foo/bar

ericdallo 2021-02-04T22:04:38.325100Z

Hum, we can do that I think, will confirm tonight šŸ™‚

borkdude 2021-02-04T22:04:50.325300Z

I think I would want the same for find-references, I want the definition in there too and not have to do a separate search, but this might be a bigger change / option

borkdude 2021-02-04T22:04:57.325500Z

I mean for normal fns

ericdallo 2021-02-04T22:05:30.325700Z

yeah, we'd need to know what is the keyword that defines it

borkdude 2021-02-04T22:05:44.325900Z

Note that there can be multiple :defs for the same keyword. E.g. (reg-event-fx [::foo]) and (reg-sub [::foo]).

borkdude 2021-02-04T22:06:06.326100Z

but personally I'm not interested in :def at all, I just want to see them all - good enough for me

pez 2021-02-04T22:10:08.326400Z

I doubt you two will be less of my heroes when I see how this will work. Iā€™m already super boosted in my editing by these amazing tools.

borkdude 2021-02-04T22:11:33.326600Z

what I think I am trying to say: instead of choosing between find-definition(s?) and find-references, I want both in one overview. maybe that's a third option: find-defs-and-refs

ericdallo 2021-02-04T22:13:44.326800Z

this already works if client provides includeDeclaration on find-references @borkdude šŸ™‚ Calva use with this flag on already

ericdallo 2021-02-04T22:14:05.327Z

if we make definition work, that will work too

borkdude 2021-02-04T22:15:10.327300Z

nice. can I put this in my .lsp/config.edn?

ericdallo 2021-02-04T22:15:23.327500Z

yep šŸ˜„

borkdude 2021-02-04T22:16:17.327700Z

how and where? config.edn:

{:include-declaration true}
or something?

borkdude 2021-02-04T22:16:57.327900Z

I don't see it here: https://clojure-lsp.github.io/clojure-lsp/settings/

ericdallo 2021-02-04T22:17:15.328200Z

oh, just realized it's only available via initializationOptions, so only changing the client šŸ˜ž we need to make the code check for the config too

ericdallo 2021-02-04T22:17:24.328400Z

it's easy, but need code changes

borkdude 2021-02-04T22:19:22.329Z

@ericdallo it's not clear to me what the alternative to .lsp/config.edn is. > "initializationOptions" where do these go?

borkdude 2021-02-04T22:19:34.329200Z

and are these merged with config.edn?

ericdallo 2021-02-04T22:19:47.329400Z

yes, they are sent from client, in this case, lsp-mode

borkdude 2021-02-04T22:20:15.329900Z

so I can set them in elisp?

ericdallo 2021-02-04T22:20:23.330100Z

yes hahah

ericdallo 2021-02-04T22:21:12.330300Z

there is no defcustom for that, but is something that we could change too on lsp-mode

borkdude 2021-02-04T22:22:01.330500Z

not sure what to do in elisp to be honest

borkdude 2021-02-04T22:22:20.330700Z

lsp-include-declaration t ?

ericdallo 2021-02-04T22:24:25.330900Z

oh, it won't work, now I remember why I didn't create a config for that

ericdallo 2021-02-04T22:24:46.331100Z

is not something that is configurable, it comes from the references request

ericdallo 2021-02-04T22:25:00.331300Z

and ATM lsp-mode just hard code to false šŸ˜•

ericdallo 2021-02-04T22:26:48.331900Z

it'd be necessary just to include a defcustom as the first arg of this function https://github.com/emacs-lsp/lsp-mode/blob/master/lsp-mode.el#L5535 , something like lsp-include-declaration-on-references

borkdude 2021-02-04T22:27:14.332300Z

yeah, I looked at that code

borkdude 2021-02-04T22:27:22.332500Z

anyway, I'll bug the other guy on discord

šŸ˜‚ 1
ericdallo 2021-02-04T22:27:27.332700Z

also in lsp-ui for ls-ui users

borkdude 2021-02-04T22:27:56.333Z

lsp-ui?

ericdallo 2021-02-04T22:28:20.333200Z

https://emacs-lsp.github.io/lsp-ui/

ericdallo 2021-02-04T22:28:25.333400Z

:catjam:

ericdallo 2021-02-04T22:29:21.333600Z

overall there are a lot of features, bt you can disable all of them, my favorite is the lsp-ui-find-references which shows a window just like vscode for finding references

borkdude 2021-02-04T22:33:00.333800Z

is lsp-ui a package you have to install?

ericdallo 2021-02-04T22:34:39.334700Z

yep

ericdallo 2021-02-04T22:35:08.334900Z

just like lsp-treemacs lsp-ivy etc

borkdude 2021-02-04T22:36:18.335100Z

holy crap, I think this is too fancy for me

borkdude 2021-02-04T22:37:37.335500Z

thanks for another distracting feature!

borkdude 2021-02-04T22:38:43.335700Z

The box on the right top that shows the docs of every var. It's nice, but also quite distracting, every time you move your cursor there's docstrings

ericdallo 2021-02-04T22:39:32.335900Z

HAHAHAH

ericdallo 2021-02-04T22:39:35.336100Z

yeah, i disable that

ericdallo 2021-02-04T22:39:44.336300Z

Actually almost all users disable that šŸ˜…

borkdude 2021-02-04T22:39:52.336500Z

can I borrow you settings?

ericdallo 2021-02-04T22:39:53.336700Z

it's something that needs to change the default

borkdude 2021-02-04T22:40:35.337200Z

šŸ™

ericdallo 2021-02-04T22:40:53.337400Z

Did you test the lens feature?

ericdallo 2021-02-04T22:41:21.337900Z

clojure-lsp shows references code lens šŸ˜Ž

borkdude 2021-02-04T22:41:49.338100Z

yes, about the number of usages right?

borkdude 2021-02-04T22:42:27.338300Z

darn, the doc still is on after your config. isn't it this thing you commented out?

;; lsp-ui-doc-enable nil

borkdude 2021-02-04T22:43:19.338500Z

yeah, that's it

borkdude 2021-02-04T22:44:03.338700Z

thanks

borkdude 2021-02-04T22:44:25.338900Z

šŸ˜“

ericdallo 2021-02-04T22:45:14.339100Z

Yeah, doom-emacs already disable it by default. šŸ‘‹

ericdallo 2021-02-04T22:59:58.339300Z

Oh, just tested and the find references on a :foo/bar already works as you expect šŸ™‚