Skip to content

Commit

Permalink
rename command name, make it more consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
Civitasv committed Dec 10, 2022
1 parent ed7776f commit a059ec0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions lua/cmake-tools/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function cmake.generate(opt, callback)
if presets_file and not config.configure_preset then
-- this will also set value for build type from preset.
-- default to be "Debug"
return cmake.select_cmake_configure_preset(function()
return cmake.select_configure_preset(function()
cmake.generate(opt, callback)
end)
end
Expand Down Expand Up @@ -82,7 +82,7 @@ function cmake.generate(opt, callback)
-- environmental variables and args.
local kits_config = kits.parse()
if kits_config and not config.kit then
return cmake.select_cmake_kit(function()
return cmake.select_kit(function()
cmake.generate(opt, callback)
end)
end
Expand Down Expand Up @@ -401,7 +401,7 @@ function cmake.select_build_type(callback)
end)
end

function cmake.select_cmake_kit(callback)
function cmake.select_kit(callback)
if not utils.has_active_job() then
return
end
Expand Down Expand Up @@ -436,7 +436,7 @@ function cmake.select_cmake_kit(callback)
end
end

function cmake.select_cmake_configure_preset(callback)
function cmake.select_configure_preset(callback)
if not utils.has_active_job() then
return
end
Expand Down Expand Up @@ -469,7 +469,7 @@ function cmake.select_cmake_configure_preset(callback)
end
end

function cmake.select_cmake_build_preset(callback)
function cmake.select_build_preset(callback)
if not utils.has_active_job() then
return
end
Expand Down
8 changes: 4 additions & 4 deletions plugin/cmake-tools.lua
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ vim.api.nvim_create_user_command(
--- CMake select kit
vim.api.nvim_create_user_command(
"CMakeSelectKit", -- name
cmake_tools.select_cmake_kit, -- command
cmake_tools.select_kit, -- command
{ -- opts
nargs = 0,
desc = "CMake select cmake kit",
Expand All @@ -118,7 +118,7 @@ vim.api.nvim_create_user_command(
--- CMake select configure preset
vim.api.nvim_create_user_command(
"CMakeSelectConfigurePreset", -- name
cmake_tools.select_cmake_configure_preset, -- command
cmake_tools.select_configure_preset, -- command
{ -- opts
nargs = 0,
desc = "CMake select cmake configure preset",
Expand All @@ -127,8 +127,8 @@ vim.api.nvim_create_user_command(

--- CMake select build preset
vim.api.nvim_create_user_command(
"CMakeSelectCBuildPreset", -- name
cmake_tools.select_cmake_build_preset, -- command
"CMakeSelectBuildPreset", -- name
cmake_tools.select_build_preset, -- command
{ -- opts
nargs = 0,
desc = "CMake select cmake kit",
Expand Down

0 comments on commit a059ec0

Please sign in to comment.