dotfiles/lua/helper/init.lua
Gered aaca74819e maybe sort of better rust and cmake buffer keymaps
this has still got a bunch of annoying gotchas. both the cmake-tools
and rustaceanvim plugins are buggy and limited in extremely annoying
ways
2024-09-04 23:54:43 -04:00

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