Zulip Chat Archive

Stream: lean4

Topic: unknown package 'CLI' in emacs


Simon Hudon (Jan 11 2022 at 17:30):

I have a lake package. My root directory is called CLI. If I call lake build it builds correctly. I load it in emacs and I get "unknown package 'CLI'" in emacs when I import one of my modules. No amount of restarting makes it go away. How do I solve this?

Sebastian Ullrich (Jan 11 2022 at 17:31):

The "in emacs" part is not actually part of the error, is it?

Simon Hudon (Jan 11 2022 at 17:32):

No, you're right. Haha! Let me move my quotes around

Sebastian Ullrich (Jan 11 2022 at 17:34):

What does M-x lsp-describe-session say?

Simon Hudon (Jan 11 2022 at 17:37):

[-] lean/sat
 `-[-] lean4-lsp:60470
    |-[-] Buffers
    |  |-[+] lakefile.lean
    |  `-[+] Args.lean
    `-[+] Capabilities

The lakefile is located in lean/sat/cmd-line-args/lakefile.lean

Sebastian Ullrich (Jan 11 2022 at 17:43):

I see. lsp-mode assumes that every repo is a single workspace by default. You will have to add the sub-package using lsp-workspace-folders-add and lsp-workspace-folders-open.

Simon Hudon (Jan 11 2022 at 17:44):

Ah! Thank you! Is there a way to override that default behavior?

Sebastian Ullrich (Jan 11 2022 at 17:45):

You mean if we could teach it to look for lakefiles instead? I don't know, would be nice though.

Simon Hudon (Jan 11 2022 at 17:46):

I think I'll write a bit of emacs code so that my setup does it. I can PR it if you like

Sebastian Ullrich (Jan 11 2022 at 17:47):

Sounds good to me

Simon Hudon (Jan 11 2022 at 17:52):

Thanks!


Last updated: Dec 20 2023 at 11:08 UTC