Skip to content

Commit

Permalink
Add detection for lakefile.toml.
Browse files Browse the repository at this point in the history
This really only matters if a project has just a lakefile.toml
and no lean-toolchain which should basically never happen, but...
  • Loading branch information
Julian committed May 17, 2024
1 parent 2828898 commit 7219481
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ftdetect/lean.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ local function detect(filename)
filetype = 'lean3'
else
local find_project_root =
require('lspconfig.util').root_pattern('leanpkg.toml', 'lakefile.lean', 'lean-toolchain')
require('lspconfig.util').root_pattern('leanpkg.toml', 'lakefile.lean', 'lakefile.toml', 'lean-toolchain')
local project_root = find_project_root(abspath)
local succeeded, result
if project_root then
Expand Down
1 change: 1 addition & 0 deletions lua/lean/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ function lean.current_search_paths()

local executable = (
vim.loop.fs_stat(root .. '/' .. 'lakefile.lean')
or vim.loop.fs_stat(root .. '/' .. 'lakefile.toml')
or not vim.loop.fs_stat(root .. '/' .. 'leanpkg.toml')
)
and 'lake'
Expand Down

0 comments on commit 7219481

Please sign in to comment.