This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-11-16
Channels
- # adventofcode (1)
- # announcements (16)
- # babashka (7)
- # beginners (77)
- # calva (31)
- # cider (18)
- # clj-commons (16)
- # cljfx (5)
- # clojars (5)
- # clojure (33)
- # clojure-europe (15)
- # clojure-nl (1)
- # clojure-norway (15)
- # clojure-uk (4)
- # clojurescript (1)
- # conjure (1)
- # core-logic (7)
- # cursive (16)
- # data-science (4)
- # datalevin (6)
- # emacs (20)
- # events (5)
- # fulcro (15)
- # holy-lambda (1)
- # introduce-yourself (1)
- # jobs (2)
- # lsp (30)
- # luminus (3)
- # malli (3)
- # membrane-term (19)
- # missionary (62)
- # off-topic (39)
- # pathom (24)
- # polylith (5)
- # portal (9)
- # practicalli (3)
- # re-frame (16)
- # reagent (5)
- # remote-jobs (1)
- # reveal (21)
- # rewrite-clj (8)
- # shadow-cljs (13)
- # spacemacs (23)
- # sql (12)
- # timbre (2)
- # tools-deps (1)
- # xtdb (4)
Given i'm in a clojure file, with shadow-cljs running, and a require [re-frame.core :as re-frame] if i type
re-frame/` then hit tab i would want it to suggest all fpublic unctions in the re-frame namespace. I feel like in some contexts, such as my small clj projects, this works constantly. In others, work cljs projects, i see it once and a while. I'm trying to imagine what set of functionality (cider, lsp, emacs) is involved to know if i can get it working more often then not
usually the completion comes from cider (runtime) or lsp (static), you need to check which one you have enabled
My thought would be to focus on getting it to work consistently with LSP, although I do not know how
I have this workaround on my config:
(add-hook 'cider-mode-hook (lambda () (remove-hook 'completion-at-point-functions #'cider-complete-at-point)))
it forces remove cider completion, not sure there is a better way thoughI added that to my spaceamcs init file user-config section and still get "no matches". Do i need to enable it somehow? I'm trying to figure out what gets run when i it tab to try to get matches.
completion-at-point-functions is a variable defined in 'minibuffer.el'.
Its value is
(forge-topic-completion-at-point elisp-completion-at-point t)
Local in buffer minibuffer.el.gz; global value is
(tags-completion-at-point-function)
lsp-completion-mode is a variable defined in ‘lsp-completion.el’. Its value is t Local in buffer learning_stream_card.cljs; global value is nil Automatically becomes buffer-local when set.
@UKFSJSM38 here is the output from company-diag, is that the correct place to look?
Emacs 27.2 (x86_64-pc-linux-gnu) of 2021-11-05 on lgw01-amd64-028
Company 0.9.13
company-backends: ((company-capf :with company-yasnippet)
(company-semantic company-dabbrev-code company-gtags company-etags company-keywords :with company-yasnippet)
(company-files :with company-yasnippet)
(company-dabbrev :with company-yasnippet))
Used backend: (company-semantic company-dabbrev-code company-gtags company-etags company-keywords :with company-yasnippet)
Major mode: clojurescript-mode
Prefix: stop
Completions: none
I'm no emacs completion expert but this is not related with company I think but the completion-at-point-functions
which tell what are the completion source
your company config looks correct to me, what we need to know is the completion-at-point-functions
variable value in a clojure buffer with lsp and cider connected
i pasted that to, above, though i'm still learning how to read the output. it's not simple
from your output it seems to me you were not in a clojure buffer:
(forge-topic-completion-at-point elisp-completion-at-point t)
what emacs setup do you use?
why did everyone jump on that banwagon lol
Yea, i might make the switch if it ends up getting more support. I'll wait for practicalli to go first though 🙂