X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/1dcd431c2137ddcc21afd808e9b3aeaf1078ac43..dc281eb2fbfb115fb9844dd9719722efdf4ae3d7:/nvim/lua/plugins/editor.lua diff --git a/nvim/lua/plugins/editor.lua b/nvim/lua/plugins/editor.lua index b4816a0..0b331bf 100644 --- a/nvim/lua/plugins/editor.lua +++ b/nvim/lua/plugins/editor.lua @@ -1,95 +1,5 @@ ----@type LazyPluginSpec +---@type LazySpec return { - { - "nvim-telescope/telescope.nvim", - keys = { - { "fF", LazyVim.pick("files", { cwd = false }), desc = "Find Files (cwd)" }, - -- from lazyvim - { ",", "Telescope buffers show_all_buffers=true", desc = "Switch Buffer" }, - { "/", LazyVim.pick("live_grep"), desc = "Grep (root dir)" }, - { ":", "Telescope command_history", desc = "Command History" }, - { "", LazyVim.pick("files"), desc = "Find Files (root dir)" }, - { "", false }, - -- find - { "fb", "Telescope buffers sort_lastused=true", desc = "Buffers" }, - -- { "ff", LazyVim.pick("files"), desc = "Find Files (root dir)" }, - { "ff", false }, -- fswitch - { "fF", LazyVim.pick("files", { cwd = false }), desc = "Find Files (cwd)" }, - { "fr", "Telescope oldfiles", desc = "Recent" }, - { "fR", LazyVim.pick("oldfiles", { cwd = vim.loop.cwd() }), desc = "Recent (cwd)" }, - -- git - -- { "gc", "Telescope git_commits", desc = "commits" }, - { "gc", false }, - -- { "gs", "Telescope git_status", desc = "status" }, - { "gs", false }, - -- search - { "sa", "Telescope autocommands", desc = "Auto Commands" }, - { "sb", "Telescope current_buffer_fuzzy_find", desc = "Buffer" }, - { "sc", "Telescope command_history", desc = "Command History" }, - { "sC", "Telescope commands", desc = "Commands" }, - { "sd", "Telescope diagnostics bufnr=0", desc = "Document diagnostics" }, - { "sD", "Telescope diagnostics", desc = "Workspace diagnostics" }, - { "sg", LazyVim.pick("live_grep"), desc = "Grep (root dir)" }, - { "sG", LazyVim.pick("live_grep", { cwd = false }), desc = "Grep (cwd)" }, - { "sh", "Telescope help_tags", desc = "Help Pages" }, - { "sH", "Telescope highlights", desc = "Search Highlight Groups" }, - { "sk", "Telescope keymaps", desc = "Key Maps" }, - { "sM", "Telescope man_pages", desc = "Man Pages" }, - { "sm", "Telescope marks", desc = "Jump to Mark" }, - { "so", "Telescope vim_options", desc = "Options" }, - { "sR", "Telescope resume", desc = "Resume" }, - { "sw", LazyVim.pick("grep_string"), desc = "Word (root dir)" }, - { "sW", LazyVim.pick("grep_string", { cwd = false }), desc = "Word (cwd)" }, - { "uC", LazyVim.pick("colorscheme", { enable_preview = true }), desc = "Colorscheme with preview" }, - -- { - -- "ss", - -- LazyVim.pick("lsp_document_symbols", { - -- symbols = { - -- "Class", - -- "Function", - -- "Method", - -- "Constructor", - -- "Interface", - -- "Module", - -- "Struct", - -- "Trait", - -- "Field", - -- "Property", - -- }, - -- }), - -- desc = "Goto Symbol", - -- }, - { "ss", false }, -- use for snippets below - { - "sS", - LazyVim.pick("lsp_dynamic_workspace_symbols", { - symbols = { - "Class", - "Function", - "Method", - "Constructor", - "Interface", - "Module", - "Struct", - "Trait", - "Field", - "Property", - }, - }), - desc = "Goto Symbol (Workspace)", - }, - }, - }, - { - "benfowler/telescope-luasnip.nvim", - dependencies = { - "telescope.nvim", - }, - config = function() - require("telescope").load_extension("luasnip") - end, - keys = { { "ss", "Telescope luasnip", desc = "Snippets" } }, - }, { "stevearc/oil.nvim", opts = { @@ -117,6 +27,9 @@ return { { "folke/trouble.nvim", cmd = { "Trouble" }, opts = { + keys = { + [""] = "fold_toggle", + }, modes = { lsp = { win = { position = "right" }, @@ -173,28 +86,4 @@ return { { "sT", "TodoTelescope keywords=TODO,FIX,FIXME", desc = "Todo/Fix/Fixme" }, }, }, - { - "neo-tree.nvim", - enabled = false, - lazy = false, - opts = { - filesystem = { - -- TODO: review these - bind_to_cwd = false, - follow_current_file = { - enabled = false, - }, - }, - }, - keys = function() - local NeoTree = function(args) - return function() - require("neo-tree.command").execute(args) - end - end - return { - { "fe", NeoTree({ toggle = true, dir = vim.loop.cwd() }) }, - } - end, - }, }