aboutsummaryrefslogtreecommitdiff
path: root/lua/cmake/init.lua
blob: d53e0740a6572a08bdf5489920700c18f07e36ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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