Add support for the Lean 4 LSP, served by lake. (#4952)

This commit is contained in:
Benjamin Block
2025-04-25 21:48:39 -04:00
committed by GitHub
parent baaca9a5d7
commit d0cdde7516
10 changed files with 90 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
Before:
call ale#assert#SetUpLinterTest('lean', 'lake')
After:
call ale#assert#TearDownLinterTest()
Execute(The default executable path should be correct):
AssertLinter 'lake', ale#Escape('lake') . ' serve'
Execute(The project root should be detected correctly without a lakefile):
AssertLSPProject '.'
Execute(The project root should be detected correctly from .toml):
call ale#test#SetFilename('../test-files/lean/lakefile_toml/lakefile.toml')
AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/lean/lakefile_toml')
Execute(The project root should be detected correctly from .lean):
call ale#test#SetFilename('../test-files/lean/lakefile_lean/lakefile.lean')
AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/lean/lakefile_lean')
Execute(The LSP values should be set correctly):
call ale#test#SetFilename('../test-files/lean/lakefile_lean/Main.lean')
AssertLSPLanguage 'lean'
AssertLSPOptions {}
AssertLSPConfig {}
AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/lean/lakefile_lean')