diff --git a/.config/nvim/lua/plugins/floaterm.lua b/.config/nvim/lua/plugins/floaterm.lua index afe33f61..7acb72e8 100644 --- a/.config/nvim/lua/plugins/floaterm.lua +++ b/.config/nvim/lua/plugins/floaterm.lua @@ -2,6 +2,38 @@ return { { "voldikss/vim-floaterm", cmd = { "FloatermNew", "FloatermToggle", "FloatermNext", "FloatermPrev" }, - enabled = false, + --stylua: ignore + keys = { + { "cis", "FloatermNew --disposable --name=duaroot --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd= dua i", desc = "Workspace Size (root dir)" }, + { "ciS", "FloatermNew --disposable --name=duabuffer --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd= dua i", desc = "Workspace Size (cwd)" }, + { "", "FloatermNew --disposable --name=yaziroot --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd= yazi", desc = "File Explorer (root dir)" }, + { "gg", "FloatermNew --disposable --name=lazygitroot --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd= lazygit", desc = "Lazygit (root dir)" }, + { "gG", "FloatermNew --disposable --name=lazygitbuffer --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd= lazygit", desc = "Lazygit (cwd)" }, + { "fD", "FloatermNew --disposable --name=lazydocker --opener=edit --titleposition=center --height=0.85 --width=0.85 lazydocker", desc = "Lazydocker" }, + { "cPp", "FloatermNew --disposable --name=lazynpm --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd= lazynpm", desc = "Lazynpm" }, + { "cib", "FloatermNew --disposable --name=btop --opener=edit --titleposition=center --height=0.85 --width=0.85 btop", desc = "Btop" }, + { "fd", "FloatermNew --disposable --name=dots --opener=edit --titleposition=center --height=0.85 --width=0.85 dots", desc = "Dotfiles" }, + { "cin", "FloatermNew --disposable --name=navi --opener=edit --titleposition=center --height=0.85 --width=0.85 pages", desc = "Navi Pages" }, + { "cip", "FloatermNew --disposable --name=proc --opener=edit --titleposition=center --height=0.85 --width=0.85 proc", desc = "Systemd Processes" }, + { "cic", "FloatermNew! --disposable --name=scc --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd= codeinfo", desc = "Codefetch" }, + { "cig", "FloatermNew! --disposable --name=onefetch --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd= gfetch", desc = "Gitfetch" }, + { "CT", "FloatermNew --name=gpt --opener=edit --titleposition=center --width=0.85 --height=0.85 gpt", desc = "Terminal GPT" }, + { "ctn", "FloatermNew --name=node --opener=edit --titleposition=center --wintype=split --height=0.35 node", desc = "Node" }, + { "ctp", "FloatermNew --name=python --opener=edit --titleposition=center --wintype=split --height=0.35 python", desc = "Python" }, + { "", "FloatermNext", mode = { "t" }, desc = "Next Terminal" }, + { "", "FloatermPrev", mode = { "t" }, desc = "Prev Terminal" }, + { "", "FloatermLast", mode = { "t" }, desc = "Last Terminal" }, + { "", "FloatermFirst", mode = { "t" }, desc = "First Terminal" }, + { "st", "Telescope floaterm", desc = "Terminals" }, + }, + }, + { + "folke/which-key.nvim", + opts = { + defaults = { + ["ci"] = { name = "+info" }, + ["ct"] = { name = "+terminals" }, + }, + }, }, } diff --git a/.config/nvim/lua/plugins/telescope.lua b/.config/nvim/lua/plugins/telescope.lua index 2233d2b1..32a813c4 100644 --- a/.config/nvim/lua/plugins/telescope.lua +++ b/.config/nvim/lua/plugins/telescope.lua @@ -22,6 +22,14 @@ return { end) end, }, + { + "dawsers/telescope-floaterm.nvim", + config = function() + Util.on_load("telescope.nvim", function() + require("telescope").load_extension("floaterm") + end) + end, + }, { "debugloop/telescope-undo.nvim", opts = {}, @@ -426,6 +434,7 @@ return { [""] = actions.move_selection_next, [""] = actions.close, [""] = false, + [""] = require("telescope.actions.layout").toggle_preview, }, }, file_ignore_patterns = { diff --git a/.config/nvim/lua/plugins/todo-comments.lua b/.config/nvim/lua/plugins/todo-comments.lua new file mode 100644 index 00000000..e7c81fe3 --- /dev/null +++ b/.config/nvim/lua/plugins/todo-comments.lua @@ -0,0 +1,10 @@ +return { + { + "folke/todo-comments.nvim", + -- stylua: ignore + keys = { + { "st", false}, + { "sT", "TodoTelescope", desc = "Todo" }, + }, + }, +} diff --git a/.config/nvim/lua/plugins/toggleterm.lua b/.config/nvim/lua/plugins/toggleterm.lua deleted file mode 100644 index 5c13400f..00000000 --- a/.config/nvim/lua/plugins/toggleterm.lua +++ /dev/null @@ -1,38 +0,0 @@ -return { - { - "akinsho/nvim-toggleterm.lua", - cmd = "ToggleTerm", - opts = { - -- size can be a number or function which is passed the current terminal - size = 20, - open_mapping = [[]], - hide_numbers = true, -- hide the number column in toggleterm buffers - shade_filetypes = {}, - shade_terminals = true, - start_in_insert = true, - insert_mappings = true, -- whether or not the open mapping applies in insert mode - persist_size = true, - persist_mode = true, -- if set to true (default) the previous terminal mode will be remembered - direction = "float", - close_on_exit = false, -- close the terminal window when the process exits - shell = "/bin/fish", -- change the default shell - auto_scroll = true, -- automatically scroll to the bottom on terminal output - -- This field is only relevant if direction is set to 'float' - float_opts = { - -- The border key is *almost* the same as 'nvim_win_open' - -- see :h nvim_win_open for details on borders however - -- the 'curved' border is a custom border type - -- not natively supported but implemented in this plugin. - -- border = 'single' | 'double' | 'shadow' | 'curved' | ... other options supported by win open - border = "curved", - -- width = , - -- height = , - winblend = 3, - highlights = { border = "Normal", background = "Normal" }, - }, - }, - keys = { - { [[]], "ToggleTerm", mode = "n", desc = "Toggle terminal" }, - }, - }, -}