From ee7e4f018ac59f9235d421f3eccc3eedcdca70be Mon Sep 17 00:00:00 2001 From: kenobi Date: Mon, 12 May 2025 11:27:17 +0200 Subject: [PATCH] oil snacks trouble --- nvim/lua/plugins/oil.lua | 32 +++++++++++++++++++-------- nvim/lua/plugins/snacks.lua | 1 - nvim/lua/plugins/trouble.lua | 42 ++++++++++++++++++++++++++++++++++++ 3 files changed, 65 insertions(+), 10 deletions(-) create mode 100644 nvim/lua/plugins/trouble.lua diff --git a/nvim/lua/plugins/oil.lua b/nvim/lua/plugins/oil.lua index e29d31e..f1288f2 100644 --- a/nvim/lua/plugins/oil.lua +++ b/nvim/lua/plugins/oil.lua @@ -1,11 +1,25 @@ return { - "stevearc/oil.nvim", - ---@module 'oil' - ---@type oil.SetupOpts - opts = {}, - -- Optional dependencies - dependencies = { { "echasnovski/mini.icons", opts = {} } }, - -- dependencies = { "nvim-tree/nvim-web-devicons" }, -- use if you prefer nvim-web-devicons - -- Lazy loading is not recommended because it is very tricky to make it work correctly in all situations. - lazy = false, + "stevearc/oil.nvim", + ---@module 'oil' + ---@type oil.SetupOpts + opts = { + columns = { + "icon", + "permissions", + "size", + }, + watch_for_changes = true, + view_options = { + -- Show files and directories that start with "." + show_hidden = true, + }, + float = { + preview_split = "right", + }, + }, + -- Optional dependencies + dependencies = { { "echasnovski/mini.icons", opts = {} } }, + -- dependencies = { "nvim-tree/nvim-web-devicons" }, -- use if you prefer nvim-web-devicons + -- Lazy loading is not recommended because it is very tricky to make it work correctly in all situations. + lazy = false, } diff --git a/nvim/lua/plugins/snacks.lua b/nvim/lua/plugins/snacks.lua index 32d5ac5..d2be0d3 100644 --- a/nvim/lua/plugins/snacks.lua +++ b/nvim/lua/plugins/snacks.lua @@ -8,7 +8,6 @@ return { -- or leave it empty to use the default settings -- refer to the configuration section below bigfile = { enabled = true }, - dashboard = { enabled = true }, explorer = { enabled = true }, indent = { enabled = true }, input = { enabled = true }, diff --git a/nvim/lua/plugins/trouble.lua b/nvim/lua/plugins/trouble.lua new file mode 100644 index 0000000..20f576e --- /dev/null +++ b/nvim/lua/plugins/trouble.lua @@ -0,0 +1,42 @@ +return { + "folke/trouble.nvim", + config = function() + require("trouble").setup({}) + local config = require("fzf-lua.config") + local actions = require("trouble.sources.fzf").actions + config.defaults.actions.files["ctrl-t"] = actions.open + end, + cmd = "Trouble", + keys = { + { + "xx", + "Trouble diagnostics toggle", + desc = "Diagnostics (Trouble)", + }, + { + "xX", + "Trouble diagnostics toggle filter.buf=0", + desc = "Buffer Diagnostics (Trouble)", + }, + { + "cs", + "Trouble symbols toggle focus=false", + desc = "Symbols (Trouble)", + }, + { + "cl", + "Trouble lsp toggle focus=false win.position=right", + desc = "LSP Definitions / references / ... (Trouble)", + }, + { + "xL", + "Trouble loclist toggle", + desc = "Location List (Trouble)", + }, + { + "xQ", + "Trouble qflist toggle", + desc = "Quickfix List (Trouble)", + }, + }, +}