doomemacs / doomemacs/core

Clojure w/ LSP & Cider does not autocomplete in source buffers

Open
#7,381 5 comments 1 reaction 0 assignees View on GitHub
is:bug needs-triage
Dominant language
Emacs Lisp
Stars
22.7k
Forks
3.1k
Avg merge
10h 46m
Merged PRs (30d)
4

Description

### I confirm that...

- [X] I have searched the [issue tracker](https://github.com/doomemacs/doomemacs/issues), [documentation](https://docs.doomemacs.org), [FAQ](https://docs.doomemacs.org/-/faq), [Discourse](https://discourse.doomemacs.org), and [Google](https://google.com), in case this issue has already been reported/resolved.

- [X] I have read "[How to Debug Issues](https://doomemacs.org/d/how2debug)", and will use it to provide as much information about this issue as possible.

- [X] The issue can be reproduced on the **latest** available commit of Doom.

- [X] The issue can be reproduced on a stable release of Emacs, such as 27 or 28. *(Doom does not support development builds like 29+ or any version ending in .50 or .9x)*

### Expected behavior

When I type a symbol in my source buffer, a dropdown menu should display completion options as I type.

### Current behavior

When I type in the nrepl buffer I can see completion options in a dropdown. When my TAB is set to use `company-indent-or-complete-common` I can see completion options in my minibuffer after hitting tab.
When I type in a source buffer, I see no completion options at any point even if setting my TAB to use the `company-indent-or-complete-common` function. The message I see is "No Completion" even when I know one exists.

When enabling `nrepl-toggle-message-logging`, I see that when I'm typing in the repl. I get these messages:
```
(-->
id "183"
op "complete"
session "f96cd993-b963-445a-a91b-1ed72abc0ef6"
time-stamp "2023-08-29 06:07:33.562218426"
context ":same"
enhanced-cljs-completion? "t"
ns "io.testproj"
prefix "gr"
)
(<--
id "183"
session "f96cd993-b963-445a-a91b-1ed72abc0ef6"
time-stamp "2023-08-29 06:07:33.585709800"
completions ((dict "candidate" "greet" "ns" "io.testproj" "type" "function")
(dict "candidate" "group-by" "ns" "clojure.core" "type" "function"))
status ("done")
)
```

However, when I type in a source buffer, I never see these `complete` ops and only see `eldoc` ops.

No backtrace is available because there are no error messages.
No concerning output in `*Messages*`.

After reading through some additional online posts today, I did see that folks were saying that lsp mode loads some stuff that overrides the cider-mode completion so I went ahead and removed the +lsp from my init.el and re-sync'ed my doom and that did solve the issue.

### Steps to reproduce

1. Set up doom config to only have lsp & clojure +lsp enabled.
2. Open a clojure project
3. cider-jack-in
4. visit the repl and type some function/namespace name.
5. Visit a source buffer and type some function/namespace name.

### System Information

https://pastebin.com/3ecvdGmx

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.