Fork me on GitHub
#emacs
<
2020-05-08
>
Cameron13:05:31

this isn't directly related to emacs but I figured anyone who'd know would more likely be here; is the LSP protocol 'extendible'? Or is it a very specific set of features its meant to answer to / wrap

Cameron13:05:19

there's no XY problem here, btw, I'm not fully sure why I'm curious myself

pesterhazy14:05:11

Is it just me or is MELPA very slow today?

pesterhazy14:05:55

I'm trying to get started with clojure-lsp for the nth time, and I think I may be failing once more

pesterhazy14:05:06

I always run into the weirdest issues

Snaffu14:05:38

@pesterhazy I did a sync with MELPA an hour ago and it was fine. I pretty much just followed the docs for clojure-lsp and it works pretty well in Linux. I'm running it alongside python-lsp and that works fine also. You can check /tmp/lsp.out once it tries to start for debugging.

pesterhazy14:05:18

@snaffu that log file is a useful hint

pesterhazy14:05:37

ok so I deleted my elpa directory to get a new version of lsp-mode

pesterhazy14:05:53

I also had to trash ~/.emacs.d/.lsp-session-v1

pesterhazy15:05:32

seems to be working a bit better now

Snaffu15:05:19

@pesterhazy Cool.. glad to hear its working for you now

pesterhazy15:05:55

The documentation is impossible to understand for me though

pesterhazy15:05:01

> It is possible to pass some options to clojure-lsp through clients' InitializationOptions. Options are a map with keys

pesterhazy15:05:20

Where does the configuration go?

Snaffu15:05:57

The only config I have is within my .emacs and pretty much what is mentioned on the clojure-lsp binary page here. https://github.com/snoe/clojure-lsp I just dropped those options in and commented out the ones I did not want to use.

pesterhazy15:05:53

ah, do you mean .lsp/config.edn?

dpsutton15:05:57

those were just updated as well i believe

pesterhazy15:05:43

@dpsutton do you mean the clojure-lsp package has been updated?

dpsutton15:05:09

no i mean specifically the emacs instructions on the repo changed the other day

dpsutton15:05:27

it was my config and someone updated them i believe. to be a bit more idiomatic with use-package

dpsutton15:05:59

it was more for @snaffu to check what the updates were as i'm assuming you are seeing the updates

pesterhazy15:05:20

so my understanding now is that there's a .lsp/config.edn that can be used to configure source paths etc

pesterhazy15:05:09

I'm trying it on a simple project, and even there it seems I need to do some configuration

pesterhazy15:05:17

this seems to work for me

cat .lsp/config.edn
{"source-paths" ["src"]
 "ignore-classpath-directories" true}

pesterhazy15:05:14

do you all use clojure-lsp extensively? What are the features you're using the most?

Snaffu15:05:38

I like the linting capabilities for clj and python. I prefer emacs over the jetbrains tools personally but the linting was something that I couldn't get easily. This handles that use case really well for me.

pesterhazy15:05:35

hm yeah. joker already does that in a much simpler way though no?

Snaffu15:05:52

I haven't tried joker, heard it was very nice but i hit an issue with installing it on BSD. Didn't know at the time LSP-Clojure would have that same issue, so I tried LSP. Plus I work in multiple languages, so having a unified top level methodology is appealing. The lsp-python works fine in BSD, it uses a pip.

pesterhazy15:05:22

I think I was able to configure lsp for my CLJS work project now

pesterhazy15:05:39

Emacs crashed a few times during the process so that's not too encouraging

pesterhazy15:05:46

But let's see ­čÖé

Snaffu16:05:19

Good luck ­čÖé I havent seen any crashes myself so hopefully it stabilizes for you.

pesterhazy18:05:03

Alright! Seems like it's working pretty nicely!

pesterhazy18:05:45

Different topic, how do I copy something from a helm window?

pesterhazy18:05:33

E.g. I want to copy the name of a command. I can find the command using helm-M-x But then how do I copy that symbol?

pesterhazy18:05:28

Found it: C-c <tab>

pesterhazy18:05:33

Even better: C-u C-c C-k

pesterhazy18:05:41

Or rather C-c C-k

Eric Ihli19:05:09

Anyone know how I can view a list of keyboard shortcuts while in a minibuffer? I'm using Doom and SPC s p runs projectile-ripgrep and I want to know how I can, for example, visit a result without losing the minibuffer, or persist the minibuffer in a new buffer, etc...

hindol05:05:58

C-Space opens a preview while remaining in the mini buffer.

pesterhazy20:05:51

In helm C-j usually works for that

Eric Ihli20:05:18

In Doom, with evil bindings, C-j moves down to the next line. I see describe-buffer takes an optional buffer argument, and C-x o works when in the minibuffer to switch buffers. So I thought I could C-x o to get out of the minibuffer and then (describe-buffer <name-of-minibuffer>) to get the description, but when I do a list-buffers while the minibuffer is open, I don't see the name of the minibuffer in the list.

Eric Ihli20:05:54

Ah. C-h m. Of course.