Fork me on GitHub
#lsp
<
2022-12-01
>
Martynas Maciulevičius10:12:29

Hey. I think it's needed to have {} around $0:references here: https://github.com/clojure-lsp/clojure-lsp/blob/01500c34e00efa2b4affc627bdc80e89af18f55d/lib/src/clojure_lsp/feature/completion_snippet.clj#L129 The starting { is missing and the insertion result is this:

(ns name
  :references})

ericdallo11:12:04

Makes sense! Willing to open a PR?

Martynas Maciulevičius11:12:55

This is one symbol xD

Martynas Maciulevičius11:12:43

I think it would be better if you would shove it into a next issue that you'll be doing without much process If you want I can do it, not a big deal

ericdallo11:12:16

I'll probably not work on lsp today, so there is a chance I just forget that, so a issue would help,.but since it's trivial, a direct PR is good enough, feel free to do it, otherwise please create a issue if possible 😅

Martynas Maciulevičius11:12:22

That was my link to the PR

ericdallo11:12:07

Oh I missed that message, sorry 😅

ericdallo11:12:40

Merged, thank you!

Patrick Sharp17:12:49

Does anyone know how clojure-lsp retrieves the clojure documentation for functions? I’m using the neovim clojure-lsp integration and it can show me examples from the online clojure docs. It works whether or not my computer is connected to the internet. Where does it look to find these docs? Does it download them itself or are they bundled with any local clojure install? The examples in the screenshot perfectly match the examples from http://clojuredocs.org (https://clojuredocs.org/clojure.core/vector_q)

ericdallo18:12:06

it's a one time request done when server start

ericdallo18:12:01

it's basically a edn that clojuredocs has for the whole examples on the site :)

Patrick Sharp18:12:07

ooh thank you!

ericdallo18:12:04

I confess this feature works so well that I was not expecting to work that well 😂

😂 2
skylize18:12:08

If you don't care about the examples, you should also find the same info as docstrings on each function in core. Could be useful if you want some sort of fallback mechanism.

👀 1
ericdallo18:12:22

yes, that part built from kondo analysis and is even more reliable/represents the docstring/arity of the function analyzed

👀 1