From 75abc91c93dd89b1f9dee4b6aeba284009ae0b93 Mon Sep 17 00:00:00 2001 From: Daniil Rozanov Date: Fri, 3 May 2024 02:38:09 +0300 Subject: fix: delete unused option --- lua/cmake/commands.lua | 68 +++++++++++++++++++++++++++++++++++++++++++++++++- lua/cmake/config.lua | 2 -- 2 files changed, 67 insertions(+), 3 deletions(-) diff --git a/lua/cmake/commands.lua b/lua/cmake/commands.lua index d763958..72fe4b9 100644 --- a/lua/cmake/commands.lua +++ b/lua/cmake/commands.lua @@ -1,5 +1,6 @@ local commandline = require("cmake.commandline") local actions = require("cmake.actions") +local project = require("cmake.project") local M = {} @@ -7,6 +8,72 @@ local cmd = vim.api.nvim_create_user_command local prefix = "CMake" +-- local _commands = { +-- generate = { +-- options = { +-- fresh = {}, +-- }, +-- action = actions.generate, +-- }, +-- build = { +-- options = { +-- target = { +-- type = "table", +-- subtype = "string", +-- delimiter = ",", +-- source = function() +-- return vim.iter(project.current_targets()) +-- :map(function(target) +-- return target.name +-- end) +-- :totable() +-- end, +-- }, +-- clean = {}, +-- j = { type = "number" }, +-- }, +-- action = actions.build, +-- }, +-- select = { +-- commands = { +-- generate = { +-- action = actions.generate_select, +-- }, +-- build = { +-- action = actions.build_select, +-- }, +-- run = { +-- action = actions.run_target_select, +-- }, +-- }, +-- }, +-- explain = { +-- commands = { +-- generate = { +-- action = actions.generate_select, +-- }, +-- build = { +-- action = actions.build_select, +-- }, +-- }, +-- }, +-- run = { +-- options = {}, -- any options are possible. passed to action as a single string +-- action = actions.run_target, +-- }, +-- edit = { +-- commands = { +-- variants = { +-- action = actions.edit_variants, +-- }, +-- -- settings = {}, +-- }, +-- }, +-- toggle = { +-- action = actions.toggle, +-- }, +-- } + local commands = { ["Generate"] = { command = actions.generate, @@ -54,7 +121,6 @@ local commands = { command = actions.build_select, cmd_opts = { desc = "Select build configuration" }, }, - -- ["Install"] = {}, ["Run"] = { command = actions.run_target, cmd_opts = { desc = "Run current executable target", nargs = "*" }, diff --git a/lua/cmake/config.lua b/lua/cmake/config.lua index 0392319..4bf49ba 100644 --- a/lua/cmake/config.lua +++ b/lua/cmake/config.lua @@ -4,7 +4,6 @@ ---@field generate_after_save boolean Generate after saving `CMakeLists.txt` file ---@field cmake_terminal CMakeConfigCMakeTerminal Settings for terminal where cmake will be executed ---@field target_terminal CMakeConfigTargetTerminal Settings for terminal where executable targets will be executed ----@field disabled_commands string[] List of commands that will not be initialized ---@class CMakeConfigCMake ---@field cmake_path string Path to `cmake` executable @@ -97,7 +96,6 @@ local default_config = { long = { sep = " ❄ ", show = false }, }, keybinds = {}, - disable_commands = {}, } local M = vim.deepcopy(default_config) -- cgit v1.2.3