diff --git a/lazy-lock.json b/lazy-lock.json index 4bb351e..63c9bff 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,19 +1,20 @@ { - "LuaSnip": { "branch": "master", "commit": "2592b91577136dbb355a4708be1e60619456b7f6" }, + "LuaSnip": { "branch": "master", "commit": "33b06d72d220aa56a7ce80a0dd6f06c70cd82b9d" }, "NvChad": { "branch": "v2.5", "commit": "bbc3d43db088c141b142a40cd5f717635833a54e" }, "base46": { "branch": "v2.5", "commit": "40943fc668bf8f1caa4cc45f71c784cf0d3cc34f" }, + "cmake-tools.nvim": { "branch": "master", "commit": "53bc5261e1e0b0d28be465d2b2b07a6f0646e1eb" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" }, "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, - "conform.nvim": { "branch": "master", "commit": "a203480a350b03092e473bf3001733d547160a73" }, + "conform.nvim": { "branch": "master", "commit": "02fd64fb3d4b18ec029c0e0683c3dc3ec6d2c5b8" }, "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, "friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" }, - "fzf-lua": { "branch": "main", "commit": "175ddbb9bbe28eef006516f38b126215de1fef57" }, + "fzf-lua": { "branch": "main", "commit": "3bd795ab8536435a1d61b8f394d83c88d1494403" }, "gitsigns.nvim": { "branch": "main", "commit": "5f808b5e4fef30bd8aca1b803b4e555da07fc412" }, - "indent-blankline.nvim": { "branch": "master", "commit": "7871a88056f7144defca9c931e311a3134c5d509" }, + "indent-blankline.nvim": { "branch": "master", "commit": "259357fa4097e232730341fa60988087d189193a" }, "lazy.nvim": { "branch": "main", "commit": "56ead98e05bb37a4ec28930a54d836d033cf00f2" }, "lazygit.nvim": { "branch": "main", "commit": "56760339a81cd1540d5a72fd9d93010a2677b55d" }, "lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" }, @@ -26,16 +27,17 @@ "mini.nvim": { "branch": "main", "commit": "64e95aa77587d04f97a5579b2106a82a08a7d968" }, "mini.pick": { "branch": "main", "commit": "75e9a0a7808aa772ca5e31d479ffd0280ab6bf74" }, "minty": { "branch": "main", "commit": "6dce9f097667862537823d515a0250ce58faab05" }, - "neogit": { "branch": "master", "commit": "446197d90d179d579fa9c6970d4f98d494a2090b" }, + "neogit": { "branch": "master", "commit": "dc36aa4b1172189a2e80cbdbd4be2e884e60c09e" }, "noice.nvim": { "branch": "main", "commit": "c6f6fb178ebe9b4fd90383de743c3399f8c3a37c" }, "nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" }, "nvim-autopairs": { "branch": "master", "commit": "b464658e9b880f463b9f7e6ccddd93fb0013f559" }, "nvim-cmp": { "branch": "main", "commit": "ca4d3330d386e76967e53b85953c170658255ecb" }, "nvim-lint": { "branch": "master", "commit": "6b46370d02cd001509a765591a3ffc481b538794" }, - "nvim-lspconfig": { "branch": "master", "commit": "627905ef6aabd99b31f369c33cd802a73144479c" }, + "nvim-lspconfig": { "branch": "master", "commit": "6e385d2fe5da6714f00142afbd8d3591d330ffd7" }, "nvim-notify": { "branch": "master", "commit": "fbef5d32be8466dd76544a257d3f3dce20082a07" }, + "nvim-numbertoggle": { "branch": "main", "commit": "c5827153f8a955886f1b38eaea6998c067d2992f" }, "nvim-tree.lua": { "branch": "master", "commit": "ca7c4c33cac2ad66ec69d45e465379716ef0cc97" }, - "nvim-treesitter": { "branch": "master", "commit": "69170c93149ddb71a22bd954514806395c430c02" }, + "nvim-treesitter": { "branch": "master", "commit": "3edea87978b2ee93b197513e5cdf86012d33b7fa" }, "nvim-web-devicons": { "branch": "master", "commit": "203da76ecfbb4b192cf830665b03eb651b635c94" }, "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, "telescope.nvim": { "branch": "master", "commit": "2eca9ba22002184ac05eddbe47a7fe2d5a384dfc" }, diff --git a/lua/configs/cmaketools-nvim.lua b/lua/configs/cmaketools-nvim.lua new file mode 100644 index 0000000..d297e36 --- /dev/null +++ b/lua/configs/cmaketools-nvim.lua @@ -0,0 +1,137 @@ +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 = true, -- 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 = "quickfix", -- name of the executor + opts = {}, -- the options the executor will get, possible values depend on the executor type. See `default_opts` for possible values. + default_opts = { -- a list of default and possible values for executors + quickfix = { + show = "always", -- "always", "only_on_error" + position = "belowright", -- "vertical", "horizontal", "leftabove", "aboveleft", "rightbelow", "belowright", "topleft", "botright", use `:h vertical` for example to see help on them + size = 10, + encoding = "utf-8", -- if encoding is not "utf-8", it will be converted to "utf-8" using `vim.fn.iconv` + auto_close_when_success = true, -- typically, you can use it with the "always" option; it will auto-close the quickfix buffer if the execution is successful. + }, + 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 + }, + overseer = { + new_task_opts = { + strategy = { + "toggleterm", + direction = "horizontal", + autos_croll = true, + quit_on_exit = "success", + }, + }, -- options to pass into the `overseer.new_task` command + on_new_task = function(task) + require("overseer").open({ enter = false, direction = "right" }) + end, -- a function that gets overseer.Task when it is created, before calling `task:start` + }, + terminal = { + name = "Main Terminal", + prefix_name = "[CMakeTools]: ", -- This must be included and must be unique, otherwise the terminals will not work. Do not use a simple spacebar " ", or any generic name + split_direction = "horizontal", -- "horizontal", "vertical" + split_size = 11, + + -- Window handling + single_terminal_per_instance = true, -- Single viewport, multiple windows + single_terminal_per_tab = true, -- Single viewport per tab + keep_terminal_static_location = true, -- Static location of the viewport if avialable + auto_resize = true, -- Resize the terminal if it already exists + + -- Running Tasks + start_insert = false, -- If you want to enter terminal with :startinsert upon using :CMakeRun + focus = false, -- Focus on terminal when cmake task is launched. + do_not_add_newline = false, -- Do not hit enter on the command inserted when using :CMakeRun, allowing a chance to review or modify the command before hitting enter. + }, -- terminal executor uses the values in cmake_terminal + }, + }, + cmake_runner = { -- runner to use + name = "terminal", -- name of the runner + opts = {}, -- the options the runner will get, possible values depend on the runner type. See `default_opts` for possible values. + default_opts = { -- a list of default and possible values for runners + quickfix = { + show = "always", -- "always", "only_on_error" + position = "belowright", -- "bottom", "top" + size = 10, + encoding = "utf-8", + auto_close_when_success = true, -- typically, you can use it with the "always" option; it will auto-close the quickfix buffer if the execution is successful. + }, + 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 + }, + overseer = { + new_task_opts = { + strategy = { + "toggleterm", + direction = "horizontal", + autos_croll = true, + quit_on_exit = "success", + }, + }, -- options to pass into the `overseer.new_task` command + on_new_task = function(task) end, -- a function that gets overseer.Task when it is created, before calling `task:start` + }, + terminal = { + name = "Main Terminal", + prefix_name = "[CMakeTools]: ", -- This must be included and must be unique, otherwise the terminals will not work. Do not use a simple spacebar " ", or any generic name + split_direction = "horizontal", -- "horizontal", "vertical" + split_size = 11, + + -- Window handling + single_terminal_per_instance = true, -- Single viewport, multiple windows + single_terminal_per_tab = true, -- Single viewport per tab + keep_terminal_static_location = true, -- Static location of the viewport if avialable + auto_resize = true, -- Resize the terminal if it already exists + + -- Running Tasks + start_insert = false, -- If you want to enter terminal with :startinsert upon using :CMakeRun + focus = false, -- Focus on terminal when cmake task is launched. + do_not_add_newline = false, -- Do not hit enter on the command inserted when using :CMakeRun, allowing a chance to review or modify the command before hitting enter. + }, + }, + }, + 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 = true, -- Show the target related to current file using virtual text (at right corner) +}) diff --git a/lua/configs/lazytelescope-nvim.lua b/lua/configs/lazytelescope-nvim.lua new file mode 100644 index 0000000..a454ba4 --- /dev/null +++ b/lua/configs/lazytelescope-nvim.lua @@ -0,0 +1,45 @@ +require("telescope").setup({ + extensions = { + -- Type information can be loaded via 'https://github.com/folke/lazydev.nvim' + -- by adding the below two annotations: + ---@module "telescope._extensions.lazy" + ---@type TelescopeLazy.Config + lazy = { + -- Optional theme (the extension doesn't set a default theme) + theme = "ivy", + -- The below configuration options are the defaults + show_icon = true, + mappings = { + open_in_browser = "", + open_in_file_browser = "", + open_in_find_files = "", + open_in_live_grep = "", + open_in_terminal = "", + open_plugins_picker = "", + open_lazy_root_find_files = "f", + open_lazy_root_live_grep = "g", + change_cwd_to_plugin = "d", + }, + actions_opts = { + open_in_browser = { + auto_close = false, + }, + change_cwd_to_plugin = { + auto_close = false, + }, + }, + terminal_opts = { + relative = "editor", + style = "minimal", + border = "rounded", + title = "Telescope lazy", + title_pos = "center", + width = 0.5, + height = 0.5, + }, + -- Other telescope configuration options + }, + }, +}) + +require("telescope").load_extension("lazy") diff --git a/lua/plugins/cmaketools-nvim.lua b/lua/plugins/cmaketools-nvim.lua new file mode 100644 index 0000000..a9ecd85 --- /dev/null +++ b/lua/plugins/cmaketools-nvim.lua @@ -0,0 +1 @@ +return { "Civitasv/cmake-tools.nvim" } diff --git a/lua/plugins/nvim-numbertoggle.lua b/lua/plugins/nvim-numbertoggle.lua new file mode 100644 index 0000000..9e546cc --- /dev/null +++ b/lua/plugins/nvim-numbertoggle.lua @@ -0,0 +1 @@ +return { "sitiom/nvim-numbertoggle" }