emacs-lsp / lsp-mode

Emacs client/library for the Language Server Protocol
https://emacs-lsp.github.io/lsp-mode
GNU General Public License v3.0
4.79k stars 890 forks source link

clojure lsp emacs : usage a of mount package is showing false compilation error. #3932

Closed rajcspsg closed 1 year ago

rajcspsg commented 1 year ago

Thank you for the bug report

Bug description

usage a of mount package is showing false compilation error.

I use the package mount in our codebase.

The code is compiling fine. and is on the github here. This code is chapter 2 of the book web development in clojure.

The compilation of the code works fine. But the emacs IDE gives error like this

Steps to reproduce

  1. clone the code
  2. use the emacs config https://github.com/rajcspsg/emacs.d. The conjure config is mostly in the file
  3. open the code in emacs editor
  4. open the file src/clj/guestbook/handler.clj
  5. Emacs will give you compilation errors wherever defstate is used.

Expected behavior

The code should compile fine and I should be able to go to definitions and references.

Which Language Server did you use?

clojure

OS

MacOS

Error callstack

No response

Anything else?

No response

ericdallo commented 1 year ago

This is not a lsp-mode bug, actually is not a bug anywhere, it's the clojure-lsp linter pointing that doesn't know those functions, that linter comes from clj-kondo and you can read here to understand why those macros are not listed properly

ericdallo commented 1 year ago

Probably the mount lib could deine default clj-kondo export configurations for clients don't need to do anything and just work out of the box, example

rajcspsg commented 1 year ago

Thanks @ericdallo

rajcspsg commented 1 year ago

There is an existing issue on mount lib https://github.com/tolitius/mount/issues/128