this has still got a bunch of annoying gotchas. both the cmake-tools and rustaceanvim plugins are buggy and limited in extremely annoying ways
20 lines
353 B
Lua
20 lines
353 B
Lua
local M = {}
|
|
|
|
function M.get_cmake_project_file()
|
|
return vim.fn.findfile('CMakeLists.txt', '.;')
|
|
end
|
|
|
|
function M.in_cmake_project()
|
|
return M.get_cmake_project_file() ~= ''
|
|
end
|
|
|
|
function M.get_cargo_project_file()
|
|
return vim.fn.findfile('Cargo.toml', '.;')
|
|
end
|
|
|
|
function M.in_cargo_project()
|
|
return M.get_cargo_project_file() ~= ''
|
|
end
|
|
|
|
return M
|