dotfiles/lua/helper/init.lua

20 lines
353 B
Lua
Raw Normal View History

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