mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-07-20 02:34:32 +02:00
Merge branch 'main' into main
This commit is contained in:
commit
f6d7895cff
12 changed files with 135 additions and 11 deletions
|
@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util")
|
|||
---@class LazyVimConfig: LazyVimOptions
|
||||
local M = {}
|
||||
|
||||
M.version = "14.8.0" -- x-release-please-version
|
||||
M.version = "14.9.0" -- x-release-please-version
|
||||
LazyVim.config = M
|
||||
|
||||
---@class LazyVimOptions
|
||||
|
|
|
@ -182,7 +182,6 @@ map("t", "<C-/>", "<cmd>close<cr>", { desc = "Hide Terminal" })
|
|||
map("t", "<c-_>", "<cmd>close<cr>", { desc = "which_key_ignore" })
|
||||
|
||||
-- windows
|
||||
map("n", "<leader>w", "<c-w>", { desc = "Windows", remap = true })
|
||||
map("n", "<leader>-", "<C-W>s", { desc = "Split Window Below", remap = true })
|
||||
map("n", "<leader>|", "<C-W>v", { desc = "Split Window Right", remap = true })
|
||||
map("n", "<leader>wd", "<C-W>c", { desc = "Delete Window", remap = true })
|
||||
|
|
|
@ -5,11 +5,12 @@ return {
|
|||
"zbirenbaum/copilot.lua",
|
||||
cmd = "Copilot",
|
||||
build = ":Copilot auth",
|
||||
event = "InsertEnter",
|
||||
event = "BufReadPost",
|
||||
opts = {
|
||||
suggestion = {
|
||||
enabled = not vim.g.ai_cmp,
|
||||
auto_trigger = true,
|
||||
hide_during_completion = vim.g.ai_cmp,
|
||||
keymap = {
|
||||
accept = false, -- handled by nvim-cmp / blink.cmp
|
||||
next = "<M-]>",
|
||||
|
|
|
@ -30,7 +30,9 @@ return {
|
|||
opts = function()
|
||||
LazyVim.cmp.actions.snippet_forward = function()
|
||||
if require("luasnip").jumpable(1) then
|
||||
require("luasnip").jump(1)
|
||||
vim.schedule(function()
|
||||
require("luasnip").jump(1)
|
||||
end)
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
|
|
@ -61,7 +61,7 @@ return {
|
|||
{ "L3MON4D3/LuaSnip", optional = true, enabled = false },
|
||||
|
||||
-- add mini.snippets
|
||||
desc = "mini.snippets(beta), a plugin to manage and expand snippets (alternative for luasnip)",
|
||||
desc = "Manage and expand snippets (alternative to Luasnip)",
|
||||
{
|
||||
"echasnovski/mini.snippets",
|
||||
event = "InsertEnter", -- don't depend on other plugins to load...
|
||||
|
|
25
lua/lazyvim/plugins/extras/editor/snacks_explorer.lua
Normal file
25
lua/lazyvim/plugins/extras/editor/snacks_explorer.lua
Normal file
|
@ -0,0 +1,25 @@
|
|||
return {
|
||||
{ "nvim-neo-tree/neo-tree.nvim", enabled = false },
|
||||
{
|
||||
"folke/snacks.nvim",
|
||||
opts = { explorer = {} },
|
||||
keys = {
|
||||
{
|
||||
"<leader>fe",
|
||||
function()
|
||||
Snacks.explorer({ cwd = LazyVim.root() })
|
||||
end,
|
||||
desc = "Explorer Snacks (root dir)",
|
||||
},
|
||||
{
|
||||
"<leader>fE",
|
||||
function()
|
||||
Snacks.explorer()
|
||||
end,
|
||||
desc = "Explorer Snacks (cwd)",
|
||||
},
|
||||
{ "<leader>e", "<leader>fe", desc = "Explorer Snacks (root dir)", remap = true },
|
||||
{ "<leader>E", "<leader>fE", desc = "Explorer Snacks (cwd)", remap = true },
|
||||
},
|
||||
},
|
||||
}
|
|
@ -60,6 +60,7 @@ return {
|
|||
{ "<leader>/", LazyVim.pick("grep"), desc = "Grep (Root Dir)" },
|
||||
{ "<leader>:", function() Snacks.picker.command_history() end, desc = "Command History" },
|
||||
{ "<leader><space>", LazyVim.pick("files"), desc = "Find Files (Root Dir)" },
|
||||
{ "<leader>n", function() Snacks.picker.notifications() end, desc = "Notification History" },
|
||||
-- find
|
||||
{ "<leader>fb", function() Snacks.picker.buffers() end, desc = "Buffers" },
|
||||
{ "<leader>fB", function() Snacks.picker.buffers({ hidden = true, nofile = true }) end, desc = "Buffers (all)" },
|
||||
|
@ -68,7 +69,7 @@ return {
|
|||
{ "<leader>fF", LazyVim.pick("files", { root = false }), desc = "Find Files (cwd)" },
|
||||
{ "<leader>fg", function() Snacks.picker.git_files() end, desc = "Find Files (git-files)" },
|
||||
{ "<leader>fr", LazyVim.pick("oldfiles"), desc = "Recent" },
|
||||
{ "<leader>fR", LazyVim.pick("oldfiles", { filter = { cwd = true }}), desc = "Recent (cwd)" },
|
||||
{ "<leader>fR", function() Snacks.picker.recent({ filter = { cwd = true }}) end, desc = "Recent (cwd)" },
|
||||
{ "<leader>fp", function() Snacks.picker.projects() end, desc = "Projects" },
|
||||
-- git
|
||||
{ "<leader>gc", function() Snacks.picker.git_log() end, desc = "Git Log" },
|
||||
|
@ -109,7 +110,11 @@ return {
|
|||
if LazyVim.has("trouble.nvim") then
|
||||
return vim.tbl_deep_extend("force", opts or {}, {
|
||||
picker = {
|
||||
actions = require("trouble.sources.snacks").actions,
|
||||
actions = {
|
||||
trouble_open = function(...)
|
||||
return require("trouble.sources.snacks").actions.trouble_open.action(...)
|
||||
end,
|
||||
},
|
||||
win = {
|
||||
input = {
|
||||
keys = {
|
||||
|
@ -152,4 +157,45 @@ return {
|
|||
{ "<leader>sT", function () Snacks.picker.todo_comments({ keywords = { "TODO", "FIX", "FIXME" } }) end, desc = "Todo/Fix/Fixme" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"folke/flash.nvim",
|
||||
optional = true,
|
||||
specs = {
|
||||
{
|
||||
"folke/snacks.nvim",
|
||||
opts = {
|
||||
picker = {
|
||||
win = {
|
||||
input = {
|
||||
keys = {
|
||||
["<a-s>"] = { "flash", mode = { "n", "i" } },
|
||||
["s"] = { "flash" },
|
||||
},
|
||||
},
|
||||
},
|
||||
actions = {
|
||||
flash = function(picker)
|
||||
require("flash").jump({
|
||||
pattern = "^",
|
||||
label = { after = { 0, 0 } },
|
||||
search = {
|
||||
mode = "search",
|
||||
exclude = {
|
||||
function(win)
|
||||
return vim.bo[vim.api.nvim_win_get_buf(win)].filetype ~= "snacks_picker_list"
|
||||
end,
|
||||
},
|
||||
},
|
||||
action = function(match)
|
||||
local idx = picker.list:row2idx(match.pos[1])
|
||||
picker.list:_move(idx, true, true)
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -108,7 +108,7 @@ return {
|
|||
enabled = false,
|
||||
},
|
||||
},
|
||||
ft = { "markdown", "norg", "rmd", "org" },
|
||||
ft = { "markdown", "norg", "rmd", "org", "codecompanion" },
|
||||
config = function(_, opts)
|
||||
require("render-markdown").setup(opts)
|
||||
Snacks.toggle({
|
||||
|
|
|
@ -37,6 +37,9 @@ return {
|
|||
highlight = "Directory",
|
||||
text_align = "left",
|
||||
},
|
||||
{
|
||||
filetype = "snacks_layout_box",
|
||||
},
|
||||
},
|
||||
---@param opts bufferline.IconFetcherOpts
|
||||
get_element_icon = function(opts)
|
||||
|
@ -278,7 +281,13 @@ return {
|
|||
},
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "<leader>n", function() Snacks.notifier.show_history() end, desc = "Notification History" },
|
||||
{ "<leader>n", function()
|
||||
if Snacks.config.picker and Snacks.config.picker.enabled then
|
||||
Snacks.picker.notifications()
|
||||
else
|
||||
Snacks.notifier.show_history()
|
||||
end
|
||||
end, desc = "Notification History" },
|
||||
{ "<leader>un", function() Snacks.notifier.hide() end, desc = "Dismiss All Notifications" },
|
||||
},
|
||||
},
|
||||
|
@ -316,4 +325,18 @@ return {
|
|||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"folke/snacks.nvim",
|
||||
opts = function(_, opts)
|
||||
if not opts.picker then
|
||||
return
|
||||
end
|
||||
table.insert(opts.dashboard.preset.keys, 3, {
|
||||
icon = " ",
|
||||
key = "p",
|
||||
desc = "Projects",
|
||||
action = ":lua Snacks.picker.projects()",
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue