plugins.cmake-tools.settings

Options provided to the require('cmake-tools').setup function.

Type: attribute set of anything

Default: { }

Example:

{
  cmake_build_directory = "build/\${variant:buildtype}";
  cmake_dap_configuration = {
    cwd = "\${workspaceFolder}";
    name = "Launch file";
    program = {
      __raw = ''
        function()
          return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
        end
      '';
    };
    request = "launch";
    stopOnEntry = false;
    type = "codelldb";
  };
  cmake_executor = {
    name = "toggleterm";
  };
  cmake_notifications = {
    refresh_rate_ms = 80;
    spinner = [
      "▱▱▱▱▱▱▱"
      "▰▱▱▱▱▱▱"
      "▰▰▱▱▱▱▱"
      "▰▰▰▱▱▱▱"
      "▰▰▰▰▱▱▱"
      "▰▰▰▰▰▱▱"
      "▰▰▰▰▰▰▱"
      "▰▰▰▰▰▰▰"
    ];
  };
  cmake_regenerate_on_save = false;
  cmake_runner = {
    name = "toggleterm";
  };
  cmake_soft_link_compile_commands = false;
}

Declared by:

plugins.cmake-tools.settings.cmake_build_directory

This is used to specify generate directory for cmake, allows macro expansion, relative to vim.loop.cwd().

Type: null or string or raw lua code

Default: null

Plugin default: "out/\${variant:buildType}"

Declared by:

plugins.cmake-tools.settings.cmake_build_options

This will be passed when invoke CMakeBuild.

Type: null or (attribute set of (anything or raw lua code))

Default: null

Plugin default: { }

Declared by:

plugins.cmake-tools.settings.cmake_command

This is used to specify cmake command path.

Type: null or string or raw lua code

Default: null

Plugin default: "cmake"

Declared by:

plugins.cmake-tools.settings.cmake_compile_commands_from_lsp

This will automatically set compile commands file location using lsp, to use it, please set cmake_soft_link_compile_commands to false.

Type: null or boolean or raw lua code

Default: null

Plugin default: false

Declared by:

plugins.cmake-tools.settings.cmake_generate_options

This will be passed when invoke CMakeGenerate.

Type: null or (attribute set of (anything or raw lua code))

Default: null

Plugin default:

{
  "-DCMAKE_EXPORT_COMPILE_COMMANDS" = 1;
}

Declared by:

plugins.cmake-tools.settings.cmake_kits_path

This is used to specify global cmake kits path, see CMakeKits for detailed usage.

Type: null or string or raw lua code

Default: null

Plugin default: null

Declared by:

plugins.cmake-tools.settings.cmake_regenerate_on_save

Auto generate when save CMakeLists.txt.

Type: null or boolean or raw lua code

Default: null

Plugin default: true

Declared by:

This will automatically make a soft link from compile commands file to project root dir.

Type: null or boolean or raw lua code

Default: null

Plugin default: true

Declared by:

plugins.cmake-tools.settings.ctest_command

This is used to specify ctest command path.

Type: null or string or raw lua code

Default: null

Plugin default: "ctest"

Declared by: