diff --git a/lua/plugins/autocomplete/trouble/bind.lua b/lua/plugins/autocomplete/trouble/bind.lua deleted file mode 100755 index 5565ba5..0000000 --- a/lua/plugins/autocomplete/trouble/bind.lua +++ /dev/null @@ -1,33 +0,0 @@ -local Bind = vim.keymap.set - -Bind("n", "xx", "TroubleToggle", { silent = true, noremap = true }) -Bind("n", "xw", "TroubleToggle workspace_diagnostics", { silent = true, noremap = true }) -Bind("n", "xd", "TroubleToggle document_diagnostics", { silent = true, noremap = true }) -Bind("n", "xl", "TroubleToggle loclist", { silent = true, noremap = true }) -Bind("n", "xq", "TroubleToggle quickfix", { silent = true, noremap = true }) -Bind("n", "gR", "TroubleToggle lsp_references", { silent = true, noremap = true }) - -local action_keys = { - action_keys = { -- key mappings for actions in the trouble list - -- map to {} to remove a mapping, for example: - -- close = {}, - close = "q", -- close the list - cancel = "", -- cancel the preview and get back to your last window / buffer / cursor - refresh = "r", -- manually refresh - jump = { "", "" }, -- jump to the diagnostic or open / close folds - open_split = { "" }, -- open buffer in new split - open_vsplit = { "" }, -- open buffer in new vsplit - open_tab = { "" }, -- open buffer in new tab - jump_close = { "o" }, -- jump to the diagnostic and close the list - toggle_mode = "m", -- toggle between "workspace" and "document" diagnostics mode - toggle_preview = "P", -- toggle auto_preview - hover = "K", -- opens a small popup with the full multiline message - preview = "p", -- preview the diagnostic location - close_folds = { "zM", "zm" }, -- close all folds - open_folds = { "zR", "zr" }, -- open all folds - toggle_fold = { "zA", "za" }, -- toggle fold of current file - previous = "k", -- previous item - next = "j", -- next item - }, -} -return action_keys diff --git a/lua/plugins/ui/nvim-tree/bind.lua b/lua/plugins/ui/nvim-tree/bind.lua deleted file mode 100755 index 6a50ddb..0000000 --- a/lua/plugins/ui/nvim-tree/bind.lua +++ /dev/null @@ -1,38 +0,0 @@ -local bind = vim.keymap.set -local nvim_tree = require("nvim-tree") - -bind("n", "r", ":NvimTreeRefresh") -- nnoremap r :NvimTreeRefresh -bind("n", "n", ":NvimTreeFindFile") -- nnoremap n :NvimTreeFindFile -bind("n", "", ":NvimTreeToggle") -- nnoremap :NvimTreeToggle - --- Define helper functions -local function is_directory(file) - return vim.fn.isdirectory(file) == 1 -end - -local function cd_to_directory(file) - if is_directory(file) then - vim.cmd.cd(file) - end -end - -local function open_tree() - local node = nvim_tree.get_node_at_cursor() - if node and node.type == "file" then - vim.cmd("tabnew " .. node.absolute_path) - end -end - -local view = { - endveiw = { - mappings = { - custom_only = false, - list = { - { key = { "", "q" }, action = "edit", mode = "n" }, - { key = { "", "o" }, cb = "open_tree" }, - { key = "cd", cb = "cd_to_directory" }, - }, - }, - }, -} -return view diff --git a/lua/plugins/ui/dashboard/config.lua b/lua/plugins/ui/snacks/dashboard.lua similarity index 100% rename from lua/plugins/ui/dashboard/config.lua rename to lua/plugins/ui/snacks/dashboard.lua diff --git a/lua/plugins/autocomplete/trouble/config.lua b/lua/plugins/ui/snacks/debug.lua similarity index 100% rename from lua/plugins/autocomplete/trouble/config.lua rename to lua/plugins/ui/snacks/debug.lua diff --git a/lua/plugins/ui/nvim-tree/config.lua b/lua/plugins/ui/snacks/explorer.lua similarity index 100% rename from lua/plugins/ui/nvim-tree/config.lua rename to lua/plugins/ui/snacks/explorer.lua diff --git a/lua/plugins/autocomplete/indent/config.lua b/lua/plugins/ui/snacks/indent.lua similarity index 100% rename from lua/plugins/autocomplete/indent/config.lua rename to lua/plugins/ui/snacks/indent.lua diff --git a/lua/plugins/ui/nvim-notify/config.lua b/lua/plugins/ui/snacks/notify.lua similarity index 99% rename from lua/plugins/ui/nvim-notify/config.lua rename to lua/plugins/ui/snacks/notify.lua index 2c04a42..2f8d1f6 100755 --- a/lua/plugins/ui/nvim-notify/config.lua +++ b/lua/plugins/ui/snacks/notify.lua @@ -8,4 +8,3 @@ notify.setup({ top_down = false, stages = "fade_in_slide_out", }) - diff --git a/lua/plugins/ui/telescope/config.lua b/lua/plugins/ui/snacks/picker.lua similarity index 100% rename from lua/plugins/ui/telescope/config.lua rename to lua/plugins/ui/snacks/picker.lua diff --git a/lua/plugins/ui/staline/config.lua b/lua/plugins/ui/snacks/statuscolumn.lua similarity index 100% rename from lua/plugins/ui/staline/config.lua rename to lua/plugins/ui/snacks/statuscolumn.lua diff --git a/lua/plugins/ui/snacksMain.lua b/lua/plugins/ui/snacksMain.lua new file mode 100644 index 0000000..6707b3b --- /dev/null +++ b/lua/plugins/ui/snacksMain.lua @@ -0,0 +1,9 @@ +return { + dashboard = require("plugins.ui.snacks.dashboard"), + explorer = require("plugins.ui.snacks.explorer"), + indent = require("plugins.ui.snacks.indent"), + notify = require("plugins.ui.snacks.notify"), + picker = require("plugins.ui.snacks.picker"), + statuscolumn = require("plugins.ui.snacks.statuscolumn"), + debug = require("plugins.ui.snacks.debug"), +} diff --git a/lua/plugins/ui/telescope/bind.lua b/lua/plugins/ui/telescope/bind.lua deleted file mode 100755 index 88ec83f..0000000 --- a/lua/plugins/ui/telescope/bind.lua +++ /dev/null @@ -1,30 +0,0 @@ -local bind = vim.keymap.set - --- import trouble actions for telescope -local open_with_trouble = require("trouble.sources.telescope").open -- import telescope actions safely -local actions = require("telescope.actions") - --- telescopes -bind("n", "ff", "Telescope find_files") -- find files within current working directory, respects .gitignore -bind("n", "fs", "Telescope live_grep") -- find string in current working directory as you type -bind("n", "fc", "Telescope grep_string") -- find string under cursor in current working directory -bind("n", "fb", "Telescope buffers") -- list open buffers in current neovim instance -bind("n", "fh", "Telescope help_tags") -- list available help tags --- telescope git commands -bind("n", "gc", "Telescope git_commits") -- list all git commits (use to checkout) ["gc" for git commits] -bind("n", "gfc", "Telescope git_bcommits") -- list git commits for current file/buffer (use to checkout) ["gfc" for git file commits] -bind("n", "gb", "Telescope git_branches") -- list git branches (use to checkout) ["gb" for git branch] -bind("n", "gs", "Telescope git_status") -- list current changes per file with diff preview ["gs" for git status] - -local binds = { - mappings = { - i = { - [""] = open_with_trouble, - [""] = actions.move_selection_previous, -- move to prev result - [""] = actions.move_selection_next, -- move to next result - [""] = actions.send_selected_to_qflist + actions.open_qflist, -- send selected to quickfixlist - }, - n = { [""] = open_with_trouble }, - }, -} -return binds diff --git a/rocks.toml b/rocks.toml index 5c0d2cb..4a094db 100644 --- a/rocks.toml +++ b/rocks.toml @@ -83,28 +83,28 @@ plugins_dir = "plugins/" auto_setup = false # User Interface Plugins Settings -[plugins.nvim-notify] -version = "3.15.0" -config = "plugins.ui.nvim-notify.config" -[plugins."nvim-tree.lua"] -version = "1.6.0" -config = "plugins.ui.nvim-tree.config" -[plugins."staline.nvim"] -version = "scm" -config = "plugins.ui.staline.config" -[plugins.dashboard-nvim] -version = "scm" -config = "plugins.ui.dashboard.config" -[plugins."indent-blankline.nvim"] -version = "3.9.0" -config = "plugins.autocomplete.indent.config" - -[bundles.telescope] -items = [ - "telescope.nvim", - "telescope-ui-select.nvim" -] -config = "plugins.ui.telescope.config" +# [plugins.nvim-notify] +# version = "3.15.0" +# config = "plugins.ui.snacks.notify" +# [plugins."nvim-tree.lua"] +# version = "1.6.0" +# config = "plugins.ui.snacks.explorer" +# [plugins."staline.nvim"] +# version = "scm" +# config = "plugins.ui.snacks.statuscolumn" +# [plugins.dashboard-nvim] +# version = "scm" +# config = "plugins.ui.snacks.dashboard" +# [plugins."indent-blankline.nvim"] +# version = "3.9.0" +# config = "plugins.ui.snacks.indent" + +# [bundles.telescope] +# items = [ +# "telescope.nvim", +# "telescope-ui-select.nvim" +# ] +# config = "plugins.ui.snacks.picker" [plugins."ultimate-autopair.nvim"] version = "scm" @@ -132,7 +132,12 @@ items = [ ] config = "plugins.autocomplete.cmp" -[plugins."trouble.nvim"] -config = "plugins.autocomplete.trouble.config" -version = "3.7.1" +[plugins."snacks.nvim"] +git = "folke/snacks.nvim" +config = "plugins.ui.snacksMain" +version = "scm" + +# [plugins."trouble.nvim"] +# config = "plugins.ui.snacks.debug" +# version = "3.7.1"