diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-01-24 20:35:27 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-01-24 20:35:27 +0900 |
| commit | c80a54e42b52ce297f0f2f71af23c562832025c7 (patch) | |
| tree | dcce8bb977a770f473325d48f6f70b21d9818a40 /ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/compiler.lua | |
init
Diffstat (limited to 'ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/compiler.lua')
| -rw-r--r-- | ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/compiler.lua | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/compiler.lua b/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/compiler.lua new file mode 100644 index 0000000..d760594 --- /dev/null +++ b/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/compiler.lua @@ -0,0 +1,53 @@ +return { + { -- This plugin + "Zeioth/compiler.nvim", + cmd = { "CompilerOpen", "CompilerToggleResults", "CompilerRedo" }, + dependencies = { "stevearc/overseer.nvim", "nvim-telescope/telescope.nvim" }, + opts = {}, + init = function() + local wk = require("which-key") + wk.add({ + mode = { "n", "v" }, + { "<leader>r", group = "Compiler/Refactoring" }, + }) + end, + keys = { + -- Open compiler + vim.api.nvim_set_keymap( + "n", + "<leader>ro", + "<cmd>CompilerOpen<cr>", + { noremap = true, silent = true, desc = "Open compiler" } + ), + + -- Redo last selected option + vim.api.nvim_set_keymap( + "n", + "<leader>rc", + "<cmd>CompilerStop<cr>" -- (Optional, to dispose all tasks before redo) + .. "<cmd>CompilerRedo<cr>", + { noremap = true, silent = true, desc = "Recompile" } + ), + -- Toggle compiler results + vim.api.nvim_set_keymap( + "n", + "<leader>rt", + "<cmd>CompilerToggleResults<cr>", + { noremap = true, silent = true, desc = "Toggle compiler" } + ), + }, + }, + { -- The task runner we use + "stevearc/overseer.nvim", + commit = "6271cab7ccc4ca840faa93f54440ffae3a3918bd", + cmd = { "CompilerOpen", "CompilerToggleResults", "CompilerRedo" }, + opts = { + task_list = { + direction = "bottom", + min_height = 25, + max_height = 25, + default_detail = 1, + }, + }, + }, +} |
