diff options
author | Daniil Rozanov <daniilrozzanov@gmail.com> | 2024-04-24 03:34:52 +0300 |
---|---|---|
committer | Daniil Rozanov <daniilrozzanov@gmail.com> | 2024-04-24 03:34:52 +0300 |
commit | f9b36bf730fda5488be87b91fd03a6f7cbf64e73 (patch) | |
tree | d8a7da573111d40c0e51c9e9954a3bb1977dd39c /lua/cmake/init.lua | |
parent | 672f0d32e322b79661b5d7959887adaa9e41ad98 (diff) |
refactor: full rewrite
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 |