This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-02-25
Channels
- # announcements (6)
- # asami (1)
- # babashka (80)
- # beginners (89)
- # bitcoin (1)
- # calva (30)
- # cider (33)
- # clj-kondo (1)
- # cljsrn (45)
- # clojars (5)
- # clojure (60)
- # clojure-australia (1)
- # clojure-dev (9)
- # clojure-europe (133)
- # clojure-italy (7)
- # clojure-nl (6)
- # clojure-uk (44)
- # clojurescript (11)
- # conjure (1)
- # data-oriented-programming (2)
- # datahike (13)
- # datascript (4)
- # datomic (19)
- # deps-new (29)
- # depstar (5)
- # duct (39)
- # fulcro (8)
- # girouette (1)
- # helix (10)
- # honeysql (17)
- # jobs (5)
- # jobs-discuss (2)
- # leiningen (6)
- # lsp (51)
- # malli (60)
- # meander (37)
- # membrane (8)
- # off-topic (31)
- # overtone (3)
- # pathom (36)
- # re-frame (8)
- # reagent (30)
- # remote-jobs (2)
- # sci (1)
- # sql (32)
- # startup-in-a-month (3)
- # testing (3)
- # tools-deps (7)
- # xtdb (7)
Hi! I used Calva for about. week now. Worked fine with refactorings, references search and other Clojure features for somedays, but last few days the message “Initializing clojure language features via clojure-lsp” is spinning in the bottom bar, and things like references search don’t work. I’ve tried restarting VS code and my mac. Any ideas?
This is also posted in #calva channel, @U0ETXRFEW thought it was a good idea to ask for help here as well. I tried different versions of calva from february, no luck so far.
2021-02-25T11:27:54.356Z UnknownHost DEBUG [clojure-lsp.crawler:150] - Cannot find position for: fn* {:name fn*, :filename “/Users/…/util.clj”, :from myns.util, :col nil, :from-var group-and-count, :arity 2, :bucket :var-usages, :row nil, :to clojure.core} nil
Oh wait, maybe it actually completed this time? I suspect (embarrassingly) that it was a bad hook I wrote for clj-kondo
Is there a config to set a delay on symbol highlighting?
I can switch highlighting off with lsp-symbol-highlighting-skip-current nil
it seems, however, it would be more useful to me for a delay of a few seconds, so it only highlights when I linger on a symbol. This would be in the same way I can add a delay to the docstring popup with lsp-ui-doc-delay
I can use the function lsp-toggle-symbol-highlighting
as a work around, toggling the highlighting on when I am most interested.
Yeah, could not find nothing, but I asked here: https://discordapp.com/channels/789885435026604033/789891051644911627/814521532809871411
@U05254DQM it seems it follows the lsp-idle-delay
, but increasing that will cause other lsp features to delay too
trying to figure out how to get this to work for M-.
w/o doom emacs
(define-key lsp-ui-mode-map [remap xref-find-definitions] #'lsp-ui-peek-find-definitions)
(define-key lsp-ui-mode-map [remap xref-find-references] #'lsp-ui-peek-find-references)
searching for M-. is hard 😄I think lsp-find-definition
and lsp-find-references
or lsp-ui-pee-find-references
are enough indeed
yep, got that bit. Just failing on finding the right thing to do the rebinding just in clojure modes (or I suppose cider). Tho as it is a general lsp-ui-* thing it isn't just for clojure so I suppose I could tweak the global-key-map
ah, looks like I should have a lambda in the cider-hook that does a local-set-key (cribbing from other code)
Yes, for your case using a cider-hook should be the best to add keybindings just for that
Hey LSPeople, What do you think about a Create private 'foo' function
code action when hovering in a foo
symbol that linter warn as unresolved-symbol
?
yes! https://github.com/clojure-emacs/clj-refactor.el/wiki/cljr-create-fn-from-example
IMO, clojure-lsp makes users don't need cljr anymore 🙂 So having those functions on lsp would make new users agree in migrate from cljr to clojure-lsp
we could improve that later to create functions on other ns if aliased, it's pretty common to me want something like that
we should definitely be naming our actions the same as cljr they put a lot of thought into the namings and it'll be familiar to people making the jump
I agree, we can use the refactoring name the same, for the command, but maybe improve the name for code action tittle, like create private function
looks better to me than create-fn-from-example
@ericdallo I sometimes copy functions to a new namespace but then my namespace form naturally is broken. Can LSP fix this?
There was a project like that, but it's deprecated: https://github.com/technomancy/slamhound Maybe this can be done by inferring this from the clj-kondo aliases, etc
A single emacs command to that makes sense, but a code action not sure, since there is already the add-missing-require code action
I think cider refactor has something like that... that's really a good source of actions before making up our own too
I didn't find on examples: https://github.com/clojure-emacs/clj-refactor.el/tree/master/examples