diff options
Diffstat (limited to 'lua/cmake/init.lua')
-rw-r--r-- | lua/cmake/init.lua | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lua/cmake/init.lua b/lua/cmake/init.lua new file mode 100644 index 0000000..d53e074 --- /dev/null +++ b/lua/cmake/init.lua @@ -0,0 +1,19 @@ +local config = require("cmake.config") +local commands = require("cmake.commands") + +local M = {} + +function M.setup(opts) + opts = opts or {} + config.setup(opts) + if vim.fn.executable(config.cmake.cmake_path) then + commands.register_commands() + require("cmake.capabilities").setup(function() + require("cmake.project").setup(opts) + end) + else + vim.notify("CMake: " .. config.cmake.cmake_path .. " is not executable", vim.log.levels.WARN) + end +end + +return M |