Skip to content
This repository has been archived by the owner on Oct 25, 2023. It is now read-only.

feat: create .ilean files #46

Closed
wants to merge 1 commit into from
Closed

feat: create .ilean files #46

wants to merge 1 commit into from

Conversation

Kha
Copy link
Member

@Kha Kha commented Jan 18, 2022

Together with leanprover/vscode-lean4#97, this should be sufficient to get find-all-references working. I didn't want to recompile the extension, so I tested it using LEAN_PATH=build/lib LEAN_SRC_PATH=. code instead.

Since .ileans are "incidental" files (and basically always desirable) that are never depended on, I assume this simple setup is sufficient. I also deduplicated the affected code a little.

@Kha
Copy link
Member Author

Kha commented Jan 18, 2022

/cc @Garmelon

@Kha
Copy link
Member Author

Kha commented Jan 28, 2022

AFAIR there was no opposition to this change, in which case I'll merge it soon.

@tydeu tydeu added the enhancement New feature or request label Jan 31, 2022
@tydeu
Copy link
Member

tydeu commented Jan 31, 2022

Apparently my method of merging this in 678863c was messy and did not get automatically caught by GitHub. Oops!

@tydeu tydeu closed this Jan 31, 2022
@gebner
Copy link
Member

gebner commented Feb 3, 2022

@Kha Did this actually work for you? Lake now generates ilean files for mathlib4, but those don't seem to be picked up by lean at all. It doesn't even find symbols or references from the current file (neither in vscode nor neovim).

@Garmelon
Copy link

Garmelon commented Feb 3, 2022

As far as I know, the watchdog does not ask lake for the proper src search path (only the workers do), so I wouldn't expect it to find lake's ilean files. This would also explain why it can't find references from the current file as it can't convert the LSP file URL into a module name.

@Kha
Copy link
Member Author

Kha commented Feb 3, 2022

Yes, see

Together with leanprover/vscode-lean4#97, this should be sufficient to get find-all-references working. I didn't want to recompile the extension, so I tested it using LEAN_PATH=build/lib LEAN_SRC_PATH=. code instead.

@Kha Kha deleted the ilean branch February 3, 2022 13:19
@gebner
Copy link
Member

gebner commented Feb 3, 2022

Ah, so this depends on lake serve! Didn't realize that.

Julian added a commit to Julian/nvim-lspconfig that referenced this pull request Feb 5, 2022
Enables workspace symbols for the Lean 4 LSP.

Older versions of Lake (and Lean 4) lack a serve command,
so on those we fallback to the old behavior by directly starting
the LSP.

Closes: Julian/lean.nvim#229
Refs: leanprover/lake#46
Julian added a commit to Julian/nvim-lspconfig that referenced this pull request Feb 5, 2022
Enables workspace symbols for the Lean 4 LSP.

Older versions of Lake (and Lean 4) lack a serve command,
so on those we fallback to the old behavior by directly starting
the LSP.

Closes: Julian/lean.nvim#229
Refs: leanprover/lake#46
mjlbach pushed a commit to neovim/nvim-lspconfig that referenced this pull request Feb 6, 2022
Enables workspace symbols for the Lean 4 LSP.

Older versions of Lake (and Lean 4) lack a serve command,
so on those we fallback to the old behavior by directly starting
the LSP.

Closes: Julian/lean.nvim#229
Refs: leanprover/lake#46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants