From 93945a96daad5db8f91b07d1aef65b3ec6f758fb Mon Sep 17 00:00:00 2001 From: Daniil Rozanov Date: Fri, 26 Apr 2024 02:09:30 +0300 Subject: feat: autocommands to regenerate and reset project One autocommand generates project after saving CMakeLists.txt, and other sets up all project after saving variants --- lua/cmake/variants.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lua/cmake/variants.lua') diff --git a/lua/cmake/variants.lua b/lua/cmake/variants.lua index 289d0e4..0d54a79 100644 --- a/lua/cmake/variants.lua +++ b/lua/cmake/variants.lua @@ -1,13 +1,15 @@ local config = require("cmake.config") local utils = require("cmake.utils") +local uv = vim.uv or vim.loop + local VariantConfig = {} VariantConfig.__index = VariantConfig local global_variant_subs = { - ["${workspaceFolder}"] = vim.loop.cwd(), - ["${userHome}"] = vim.loop.os_homedir(), + ["${workspaceFolder}"] = uv.cwd(), + ["${userHome}"] = uv.os_homedir(), } local _configure_args = function(obj, build_directory) -- cgit v1.2.3