From dbba9b6bc4dfdadb2c8b4c0631c9213433ae43aa Mon Sep 17 00:00:00 2001 From: Aotrix <9aotrix@protonmail.com> Date: Sat, 9 Aug 2025 19:45:57 +0200 Subject: changed maximum number of characters per line --- lua/aotrix/plugins/autoformat.lua | 12 ++-- lua/aotrix/plugins/cmake_tools.lua | 134 ++++++++++++++++--------------------- 2 files changed, 64 insertions(+), 82 deletions(-) (limited to 'lua/aotrix') diff --git a/lua/aotrix/plugins/autoformat.lua b/lua/aotrix/plugins/autoformat.lua index 05ae2f9..c4f008f 100644 --- a/lua/aotrix/plugins/autoformat.lua +++ b/lua/aotrix/plugins/autoformat.lua @@ -2,17 +2,17 @@ return { "stevearc/conform.nvim", opts = { notify_on_error = false, - format_on_save = {timeout_ms = 500, lsp_fallback = true}, + format_on_save = { timeout_ms = 500, lsp_fallback = true }, formatters_by_ft = { - lua = {"lua-format"}, - cpp = {"clang_format"}, - cmake = {"cmake_format"} + lua = { "lua-format" }, + cpp = { "clang_format" }, + cmake = { "cmake_format" } }, formatters = { clang_format = { - prepend_args = {'--style={BasedOnStyle: LLVM, IndentWidth: 4}'} + prepend_args = { '--style={BasedOnStyle: LLVM, IndentWidth: 4, ColumnLimit: 120}' } }, - shfmt = {prepend_args = {'-i', '4'}} + shfmt = { prepend_args = { '-i', '4' } } } } } diff --git a/lua/aotrix/plugins/cmake_tools.lua b/lua/aotrix/plugins/cmake_tools.lua index 3db14eb..415aaf2 100644 --- a/lua/aotrix/plugins/cmake_tools.lua +++ b/lua/aotrix/plugins/cmake_tools.lua @@ -1,76 +1,58 @@ -return { - 'Civitasv/cmake-tools.nvim', - opts = {}, - config = function() - local osys = require("cmake-tools.osys") - require("cmake-tools").setup { - cmake_command = "cmake", -- this is used to specify cmake command path - ctest_command = "ctest", -- this is used to specify ctest command path - cmake_use_preset = true, - cmake_regenerate_on_save = false, -- auto generate when save CMakeLists.txt - cmake_generate_options = {"-DCMAKE_EXPORT_COMPILE_COMMANDS=1"}, -- this will be passed when invoke `CMakeGenerate` - cmake_build_options = {}, -- this will be passed when invoke `CMakeBuild` - -- support macro expansion: - -- ${kit} - -- ${kitGenerator} - -- ${variant:xx} - cmake_build_directory = function() - if osys.iswin32 then - return "out\\${variant:buildType}" - end - return "out/${variant:buildType}" - end, -- this is used to specify generate directory for cmake, allows macro expansion, can be a string or a function returning the string, relative to cwd. - cmake_soft_link_compile_commands = true, -- this will automatically make a soft link from compile commands file to project root dir - cmake_compile_commands_from_lsp = false, -- this will automatically set compile commands file location using lsp, to use it, please set `cmake_soft_link_compile_commands` to false - cmake_kits_path = nil, -- this is used to specify global cmake kits path, see CMakeKits for detailed usage - cmake_variants_message = { - short = {show = true}, -- whether to show short message - long = {show = true, max_length = 40} -- whether to show long message - }, - cmake_dap_configuration = { -- debug settings for cmake - name = "cpp", - type = "codelldb", - request = "launch", - stopOnEntry = false, - runInTerminal = true, - console = "integratedTerminal" - }, - cmake_executor = { -- executor to use - name = "toggleterm", -- name of the executor - opts = { - toggleterm = { - direction = "float", -- 'vertical' | 'horizontal' | 'tab' | 'float' - close_on_exit = false, -- whether close the terminal when exit - auto_scroll = true, -- whether auto scroll to the bottom - singleton = true -- single instance, autocloses the opened one, if present - } - } -- the options the executor will get, possible values depend on the executor type. See `default_opts` for possible values. - }, - cmake_runner = { -- runner to use - name = "toggleterm", -- name of the runner - opts = { - toggleterm = { - direction = "float", -- 'vertical' | 'horizontal' | 'tab' | 'float' - close_on_exit = false, -- whether close the terminal when exit - auto_scroll = true, -- whether auto scroll to the bottom - singleton = true -- single instance, autocloses the opened one, if present - } - } -- the options the runner will get, possible values depend on the runner type. See `default_opts` for possible values. - }, - cmake_notifications = { - runner = {enabled = true}, - executor = {enabled = true}, - spinner = { - "⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", - "⠇", "⠏" - }, -- icons used for progress display - refresh_rate_ms = 100 -- how often to iterate icons - }, - cmake_virtual_text_support = false -- Show the target related to current file using virtual text (at right corner) - } - vim.keymap.set("n", "mt", "CMakeRun") - vim.keymap.set("n", "mT", "CMakeDebug") - vim.keymap.set("n", "ms", "CMakeSelectLaunchTarget") - vim.keymap.set("n", "mc", "CMakeClean") - end -} +return {} +-- return { +-- 'Civitasv/cmake-tools.nvim', +-- opts = {}, +-- config = function() +-- local osys = require("cmake-tools.osys") +-- require("cmake-tools").setup { +-- cmake_command = "cmake", -- this is used to specify cmake command path +-- ctest_command = "ctest", -- this is used to specify ctest command path +-- cmake_use_preset = true, +-- cmake_regenerate_on_save = false, -- auto generate when save CMakeLists.txt +-- cmake_generate_options = { "-DCMAKE_EXPORT_COMPILE_COMMANDS=1" }, -- this will be passed when invoke `CMakeGenerate` +-- cmake_build_options = {}, -- this will be passed when invoke `CMakeBuild` +-- -- support macro expansion: +-- -- ${kit} +-- -- ${kitGenerator} +-- -- ${variant:xx} +-- cmake_build_directory = function() +-- return "build/${variant:buildType}" +-- end, -- this is used to specify generate directory for cmake, allows macro expansion, can be a string or a function returning the string, relative to cwd. +-- cmake_soft_link_compile_commands = true, -- this will automatically make a soft link from compile commands file to project root dir +-- cmake_compile_commands_from_lsp = false, -- this will automatically set compile commands file location using lsp, to use it, please set `cmake_soft_link_compile_commands` to false +-- cmake_kits_path = nil, -- this is used to specify global cmake kits path, see CMakeKits for detailed usage +-- cmake_variants_message = { +-- short = { show = true }, -- whether to show short message +-- long = { show = true, max_length = 40 } -- whether to show long message +-- }, +-- cmake_dap_configuration = { -- debug settings for cmake +-- name = "cpp", +-- type = "codelldb", +-- request = "launch", +-- stopOnEntry = false, +-- runInTerminal = true, +-- console = "integratedTerminal" +-- }, +-- cmake_executor = { -- executor to use +-- name = "overseer", -- name of the executor +-- }, +-- cmake_runner = { -- runner to use +-- name = "overseer", -- name of the runner +-- }, +-- cmake_notifications = { +-- runner = { enabled = true }, +-- executor = { enabled = true }, +-- spinner = { +-- "⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", +-- "⠇", "⠏" +-- }, -- icons used for progress display +-- refresh_rate_ms = 100 -- how often to iterate icons +-- }, +-- cmake_virtual_text_support = false -- Show the target related to current file using virtual text (at right corner) +-- } +-- vim.keymap.set("n", "mt", "CMakeRun") +-- vim.keymap.set("n", "mT", "CMakeDebug") +-- vim.keymap.set("n", "ms", "CMakeSelectLaunchTarget") +-- vim.keymap.set("n", "mc", "CMakeClean") +-- end +-- } -- cgit v1.2.3