From f9b36bf730fda5488be87b91fd03a6f7cbf64e73 Mon Sep 17 00:00:00 2001 From: Daniil Rozanov Date: Wed, 24 Apr 2024 03:34:52 +0300 Subject: refactor: full rewrite --- lua/cmake/init.lua | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 lua/cmake/init.lua (limited to 'lua/cmake/init.lua') 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 -- cgit v1.2.3