From 41240fd961f2ce4e858071b559b047e368100156 Mon Sep 17 00:00:00 2001 From: minco Date: Wed, 17 Sep 2025 12:53:21 +0900 Subject: [PATCH] feat: change all docked UI to floating --- lazy-lock.json | 3 ++- lua/plugins/comment.lua | 5 +++++ lua/plugins/toggleterm.lua | 5 +++-- lua/plugins/yazi.lua | 44 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 54 insertions(+), 3 deletions(-) create mode 100644 lua/plugins/yazi.lua diff --git a/lazy-lock.json b/lazy-lock.json index 05adbbe..1137735 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -29,5 +29,6 @@ "snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" }, "toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" }, "trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" }, - "which-key.nvim": { "branch": "main", "commit": "fcbf4eea17cb299c02557d576f0d568878e354a4" } + "which-key.nvim": { "branch": "main", "commit": "fcbf4eea17cb299c02557d576f0d568878e354a4" }, + "yazi.nvim": { "branch": "main", "commit": "8f44537f60431a7d6e099b8b3e93fc825dde17a1" } } diff --git a/lua/plugins/comment.lua b/lua/plugins/comment.lua index 88f827e..b9522d5 100644 --- a/lua/plugins/comment.lua +++ b/lua/plugins/comment.lua @@ -3,6 +3,11 @@ return { opts = { toggler = { line = '/', + block = '/' }, + opleader = { + line = '/', + block = '/' + } }, } diff --git a/lua/plugins/toggleterm.lua b/lua/plugins/toggleterm.lua index 4050553..11dc810 100644 --- a/lua/plugins/toggleterm.lua +++ b/lua/plugins/toggleterm.lua @@ -5,7 +5,8 @@ return config = true, lazy = false, keys = { - { "th", "ToggleTerm", desc = "ToggleTerm Horizontal" }, - { "tv", "ToggleTerm", desc = "ToggleTerm Vertical" } + --[[ { "th", "ToggleTerm direction=horizontal size=10", desc = "ToggleTerm Horizontal" }, ]] + --[[ { "tv", "ToggleTerm direction=vertical size=80", desc = "ToggleTerm Vertical" } ]] + { "t", "ToggleTerm direction=float", desc = "ToggleTerm Float" } } } diff --git a/lua/plugins/yazi.lua b/lua/plugins/yazi.lua new file mode 100644 index 0000000..b1d2dc2 --- /dev/null +++ b/lua/plugins/yazi.lua @@ -0,0 +1,44 @@ +---@type LazySpec +return { + "mikavilpas/yazi.nvim", + version = "*", -- use the latest stable version + event = "VeryLazy", + dependencies = { + { "nvim-lua/plenary.nvim", lazy = true }, + }, + keys = { + -- 👇 in this section, choose your own keymappings! + { + "-", + mode = { "n", "v" }, + "Yazi", + desc = "Open yazi at the current file", + }, + { + -- Open in the current working directory + "cw", + "Yazi cwd", + desc = "Open the file manager in nvim's working directory", + }, + { + "", + "Yazi toggle", + desc = "Resume the last yazi session", + }, + }, + ---@type YaziConfig | {} + opts = { + -- if you want to open yazi instead of netrw, see below for more info + open_for_directories = false, + keymaps = { + show_help = "", + }, + }, + -- 👇 if you use `open_for_directories=true`, this is recommended + init = function() + -- mark netrw as loaded so it's not loaded at all. + -- + -- More details: https://github.com/mikavilpas/yazi.nvim/issues/802 + vim.g.loaded_netrwPlugin = 1 + end, +}