Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clojure completion of aliased dependencies only works in the REPL #4526

Open
3 tasks done
larrasket opened this issue Aug 11, 2024 · 5 comments
Open
3 tasks done

Clojure completion of aliased dependencies only works in the REPL #4526

larrasket opened this issue Aug 11, 2024 · 5 comments
Labels

Comments

@larrasket
Copy link

Thank you for the bug report

  • I am using the latest version of lsp-mode related packages.
  • I checked FAQ and Troubleshooting sections
  • You may also try reproduce the issue using clean environment using the following command: M-x lsp-start-plain

Bug description

Clojure completion of aliased dependencies only works in the REPL. Like in :

(ns hr
  (:require
   [clojure.string :as str]
   [clojure.edn :as edn]
   [clojure.pprint :as pp]))

Steps to reproduce

  • Open Clojure file
  • LPS starts
  • Have an aliased dependency
  • Write a line that starts with the alias

Expected behavior

Completion to work

Which Language Server did you use?

clojure-lsp

OS

Linux

Error callstack

No response

Anything else?

No response

@larrasket larrasket added the bug label Aug 11, 2024
@larrasket
Copy link
Author

Example:
In the REPL
image

Code:

image

@larrasket
Copy link
Author

I fixed it temporarily with:

(add-hook 'clojure-mode-hook
          (lambda ()
            (setq-local completion-at-point-functions
                        (list #'cider-complete-at-point
                              #'lsp-completion-at-point
                              #'lispy-clojure-complete-at-point))))

@dgutov
Copy link

dgutov commented Sep 11, 2024

Could it be a bug in the language server? You can double-check with some other editor as well.

@larrasket
Copy link
Author

I did with vscode. It works fine with cider-complete-at-point (it gets it from the language server too)

@dgutov
Copy link

dgutov commented Sep 12, 2024

CIDER uses a different kind of language server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants