Merge branch 'main' into mini.files-windowpicker

This commit is contained in:
Stefan Krüger 2025-01-20 18:46:54 +01:00 committed by GitHub
commit 72b5d757b2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 273 additions and 44 deletions

View file

@ -1,3 +1,3 @@
{
".": "14.5.0"
".": "14.8.0"
}

View file

@ -1,5 +1,70 @@
# Changelog
## [14.8.0](https://github.com/LazyVim/LazyVim/compare/v14.7.0...v14.8.0) (2025-01-20)
### Features
* **chezmoi:** add snacks picker integration for chezmoi files ([#5429](https://github.com/LazyVim/LazyVim/issues/5429)) ([970d1a0](https://github.com/LazyVim/LazyVim/commit/970d1a05da37554aa17b671c869431a7b387d8be))
* **dial:** add checkbox augend for markdown ([#5411](https://github.com/LazyVim/LazyVim/issues/5411)) ([b19f207](https://github.com/LazyVim/LazyVim/commit/b19f2070b847a3067436f4d16a0cc5b84a9f9819))
* **snacks.picker:** added leader-sS to search lsp workspace symbols ([8787ec1](https://github.com/LazyVim/LazyVim/commit/8787ec1227e10123ad7291cf916020d9a8626525))
* **snacks:** added git diff keymap to pick hunks with leader-gd ([62cb4a4](https://github.com/LazyVim/LazyVim/commit/62cb4a465c490c7d41f7a3bf52fb0e222f2cf83b))
### Bug Fixes
* **markdown:** disable checkbox rendering since it's annoying to edit ([4f31bfa](https://github.com/LazyVim/LazyVim/commit/4f31bfab86402c819e5ea1e18b3c5d139628c864))
* **snacks.picker:** fix mapping for `Recent (cwd)` ([#5407](https://github.com/LazyVim/LazyVim/issues/5407)) ([8307b0f](https://github.com/LazyVim/LazyVim/commit/8307b0fe506a38417f3b7835e2c4b43d9a970946))
* **snacks.picker:** fix mapping for Projects for consistency ([#5433](https://github.com/LazyVim/LazyVim/issues/5433)) ([eb7b453](https://github.com/LazyVim/LazyVim/commit/eb7b453b48ab7e3008013e0edf2822f622111e97))
* **snacks.picker:** respect lazyvim.config.kind_filter ([#5415](https://github.com/LazyVim/LazyVim/issues/5415)) ([df7426e](https://github.com/LazyVim/LazyVim/commit/df7426eefa79d5dfa2fcbe2f381abfb2cca70bad))
### Performance Improvements
* **java:** setting opts.dap_main to false to disable main class scan ([#5391](https://github.com/LazyVim/LazyVim/issues/5391)) ([66c3577](https://github.com/LazyVim/LazyVim/commit/66c3577bc779d31a7c2addd47de7cc6d215795ba))
## [14.7.0](https://github.com/LazyVim/LazyVim/compare/v14.6.1...v14.7.0) (2025-01-14)
### Features
* **extras:** added extra for snacks picker ([#5368](https://github.com/LazyVim/LazyVim/issues/5368)) ([13044c2](https://github.com/LazyVim/LazyVim/commit/13044c298ed1837a2d938b64710528d359dc8407))
## [14.6.1](https://github.com/LazyVim/LazyVim/compare/v14.6.0...v14.6.1) (2025-01-08)
### Bug Fixes
* **blink:** added new luasnip preset ([8d2d9a9](https://github.com/LazyVim/LazyVim/commit/8d2d9a9bd965aab0a752f24ec327d2f391a8406b))
* **luasnip:** correctly remove duplicate snippets ([#5214](https://github.com/LazyVim/LazyVim/issues/5214)) ([05c3447](https://github.com/LazyVim/LazyVim/commit/05c3447558fa6eef7ae3c0d3e7ed1c281572274d))
* **nlua:** debugger not responding ([#5319](https://github.com/LazyVim/LazyVim/issues/5319)) ([4e746d0](https://github.com/LazyVim/LazyVim/commit/4e746d0e5625662e1f121b39f63836b653ed728b))
## [14.6.0](https://github.com/LazyVim/LazyVim/compare/v14.5.0...v14.6.0) (2024-12-20)
### Features
* **colorscheme:** add fzf integration to catppuccin ([#5175](https://github.com/LazyVim/LazyVim/issues/5175)) ([751803f](https://github.com/LazyVim/LazyVim/commit/751803f98bf3baaf7db1c1e2ddd28e082396124a))
* **lualine:** add fzf extensions. ([#5203](https://github.com/LazyVim/LazyVim/issues/5203)) ([7a16a75](https://github.com/LazyVim/LazyVim/commit/7a16a752ba1fa535bb54d6492fb8df6c72ab8ba0))
### Bug Fixes
* **blink:** remove compatibility with 0.7.6 release ([#5212](https://github.com/LazyVim/LazyVim/issues/5212)) ([857f330](https://github.com/LazyVim/LazyVim/commit/857f330c2139c328cfce0251b11713dc179d6a81))
* **codeium:** doesnt automatically load when `vim.g.ai_cmp` is set to false ([#5182](https://github.com/LazyVim/LazyVim/issues/5182)) ([b51279c](https://github.com/LazyVim/LazyVim/commit/b51279c6d727a09cd3d2bf3c9d0cf829810280bb))
* **fzf:** fzf.lua compatible hidden scrollbar ([#5177](https://github.com/LazyVim/LazyVim/issues/5177)) ([3a79273](https://github.com/LazyVim/LazyVim/commit/3a79273f3c3bbd22bcdba795b7b8fe6a949db96e))
* **luasnip:** use blink's luasnip source. Closes [#5211](https://github.com/LazyVim/LazyVim/issues/5211) ([86de9c9](https://github.com/LazyVim/LazyVim/commit/86de9c9e443572b0244ee9bbdcf5f10ecaabaf74))
### Performance Improvements
* **supermaven:** add lazy-loading ([#5183](https://github.com/LazyVim/LazyVim/issues/5183)) ([a3a28bf](https://github.com/LazyVim/LazyVim/commit/a3a28bf8e43f7239316942c2f2bac6e74b28586b))
### Reverts
* fix(fzf): fzf.lua compatible hidden scrollbar ([#5177](https://github.com/LazyVim/LazyVim/issues/5177)) ([c40692c](https://github.com/LazyVim/LazyVim/commit/c40692c1b0a95492eead8cc093972c634d54043b))
## [14.5.0](https://github.com/LazyVim/LazyVim/compare/v14.4.0...v14.5.0) (2024-12-17)

View file

@ -1,4 +1,4 @@
*LazyVim.txt* For Neovim Last change: 2024 December 18
*LazyVim.txt* For Neovim Last change: 2025 January 20
==============================================================================
Table of Contents *LazyVim-table-of-contents*

View file

@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util")
---@class LazyVimConfig: LazyVimOptions
local M = {}
M.version = "14.5.0" -- x-release-please-version
M.version = "14.8.0" -- x-release-please-version
LazyVim.config = M
---@class LazyVimOptions

View file

@ -150,12 +150,12 @@ end
if vim.fn.executable("lazygit") == 1 then
map("n", "<leader>gg", function() Snacks.lazygit( { cwd = LazyVim.root.git() }) end, { desc = "Lazygit (Root Dir)" })
map("n", "<leader>gG", function() Snacks.lazygit() end, { desc = "Lazygit (cwd)" })
map("n", "<leader>gf", function() Snacks.lazygit.log_file() end, { desc = "Lazygit Current File History" })
map("n", "<leader>gl", function() Snacks.lazygit.log({ cwd = LazyVim.root.git() }) end, { desc = "Lazygit Log" })
map("n", "<leader>gL", function() Snacks.lazygit.log() end, { desc = "Lazygit Log (cwd)" })
map("n", "<leader>gf", function() Snacks.picker.git_log_file() end, { desc = "Git Current File History" })
map("n", "<leader>gl", function() Snacks.picker.git_log({ cwd = LazyVim.root.git() }) end, { desc = "Git Log" })
map("n", "<leader>gL", function() Snacks.picker.git_log() end, { desc = "Git Log (cwd)" })
end
map("n", "<leader>gb", function() Snacks.git.blame_line() end, { desc = "Git Blame Line" })
map("n", "<leader>gb", function() Snacks.picker.git_log_line() end, { desc = "Git Blame Line" })
map({ "n", "x" }, "<leader>gB", function() Snacks.gitbrowse() end, { desc = "Git Browse (open)" })
map({"n", "x" }, "<leader>gY", function()
Snacks.gitbrowse({ open = function(url) vim.fn.setreg("+", url) end, notify = false })

View file

@ -397,4 +397,10 @@ return {
return LazyVim.pick.want() == "telescope"
end,
},
{
import = "lazyvim.plugins.extras.editor.snacks_picker",
enabled = function()
return LazyVim.pick.want() == "snacks"
end,
},
}

View file

@ -4,6 +4,7 @@ return {
{
"Exafunction/codeium.nvim",
cmd = "Codeium",
event = "InsertEnter",
build = ":Codeium Auth",
opts = {
enable_cmp_source = vim.g.ai_cmp,

View file

@ -1,6 +1,11 @@
return {
{
"supermaven-inc/supermaven-nvim",
event = "InsertEnter",
cmd = {
"SupermavenUseFree",
"SupermavenUsePro",
},
opts = {
keymaps = {
accept_suggestion = nil, -- handled by nvim-cmp / blink.cmp

View file

@ -118,17 +118,6 @@ return {
end
end
--- NOTE: compat with latest version. Currenlty 0.7.6
if not vim.g.lazyvim_blink_main then
---@diagnostic disable-next-line: inject-field
opts.sources.completion = opts.sources.completion or {}
opts.sources.completion.enabled_providers = enabled
if vim.tbl_get(opts, "completion", "menu", "draw", "treesitter") then
---@diagnostic disable-next-line: assign-type-mismatch
opts.completion.menu.draw.treesitter = true
end
end
-- Unset custom prop to pass blink.cmp validation
opts.sources.compat = nil
@ -169,9 +158,7 @@ return {
"saghen/blink.cmp",
opts = function(_, opts)
opts.appearance = opts.appearance or {}
opts.appearance.kind_icons = vim.tbl_extend("keep", {
Color = "██", -- Use block instead of icon for color items to make swatches more usable
}, LazyVim.config.icons.kinds)
opts.appearance.kind_icons = vim.tbl_extend("force", opts.appearance.kind_icons or {}, LazyVim.config.icons.kinds)
end,
},

View file

@ -67,25 +67,9 @@ return {
{
"saghen/blink.cmp",
optional = true,
dependencies = {
{ "saghen/blink.compat", opts = { impersonate_nvim_cmp = true } },
{ "saadparwaiz1/cmp_luasnip" },
},
opts = {
sources = { compat = { "luasnip" } },
snippets = {
expand = function(snippet)
require("luasnip").lsp_expand(snippet)
end,
active = function(filter)
if filter and filter.direction then
return require("luasnip").jumpable(filter.direction)
end
return require("luasnip").in_snippet()
end,
jump = function(direction)
require("luasnip").jump(direction)
end,
preset = "luasnip",
},
},
},

View file

@ -140,6 +140,11 @@ return {
}),
},
markdown = {
augend.constant.new({
elements = { "[ ]", "[x]" },
word = false,
cyclic = true,
}),
augend.misc.alias.markdown_header,
},
json = {

View file

@ -45,8 +45,9 @@ return {
"ibhagwan/fzf-lua",
cmd = "FzfLua",
opts = function(_, opts)
local config = require("fzf-lua.config")
local actions = require("fzf-lua.actions")
local fzf = require("fzf-lua")
local config = fzf.config
local actions = fzf.actions
-- Quickfix
config.defaults.keymap.fzf["ctrl-q"] = "select-all+accept"
@ -285,6 +286,9 @@ return {
{
"neovim/nvim-lspconfig",
opts = function()
if LazyVim.pick.want() ~= "fzf" then
return
end
local Keys = require("lazyvim.plugins.lsp.keymaps").get()
-- stylua: ignore
vim.list_extend(Keys, {

View file

@ -0,0 +1,129 @@
if lazyvim_docs then
-- In case you don't want to use `:LazyExtras`,
-- then you need to set the option below.
vim.g.lazyvim_picker = "snacks"
end
---@module 'snacks'
---@type LazyPicker
local picker = {
name = "snacks",
commands = {
files = "files",
live_grep = "grep",
oldfiles = "recent",
},
---@param source string
---@param opts? snacks.picker.Config
open = function(source, opts)
return Snacks.picker.pick(source, opts)
end,
}
if not LazyVim.pick.register(picker) then
return {}
end
return {
desc = "Fast and modern file picker",
-- recommended = true,
{
"folke/snacks.nvim",
opts = {
picker = {},
},
-- stylua: ignore
keys = {
{ "<leader>,", function() Snacks.picker.buffers() end, desc = "Buffers" },
{ "<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)" },
-- find
{ "<leader>fb", function() Snacks.picker.buffers() end, desc = "Buffers" },
{ "<leader>fc", LazyVim.pick.config_files(), desc = "Find Config File" },
{ "<leader>ff", LazyVim.pick("files"), desc = "Find Files (Root Dir)" },
{ "<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)" },
-- git
{ "<leader>gc", function() Snacks.picker.git_log() end, desc = "Git Log" },
{ "<leader>gd", function() Snacks.picker.git_diff() end, desc = "Git Diff (hunks)" },
{ "<leader>gs", function() Snacks.picker.git_status() end, desc = "Git Status" },
-- Grep
{ "<leader>sb", function() Snacks.picker.lines() end, desc = "Buffer Lines" },
{ "<leader>sB", function() Snacks.picker.grep_buffers() end, desc = "Grep Open Buffers" },
{ "<leader>sg", LazyVim.pick("live_grep"), desc = "Grep (Root Dir)" },
{ "<leader>sG", LazyVim.pick("live_grep", { root = false }), desc = "Grep (cwd)" },
{ "<leader>sw", LazyVim.pick("grep_word"), desc = "Visual selection or word (Root Dir)", mode = { "n", "x" } },
{ "<leader>sW", LazyVim.pick("grep_word", { root = false }), desc = "Visual selection or word (cwd)", mode = { "n", "x" } },
-- search
{ '<leader>s"', function() Snacks.picker.registers() end, desc = "Registers" },
{ "<leader>sa", function() Snacks.picker.autocmds() end, desc = "Autocmds" },
{ "<leader>sc", function() Snacks.picker.command_history() end, desc = "Command History" },
{ "<leader>sC", function() Snacks.picker.commands() end, desc = "Commands" },
{ "<leader>sd", function() Snacks.picker.diagnostics() end, desc = "Diagnostics" },
{ "<leader>sh", function() Snacks.picker.help() end, desc = "Help Pages" },
{ "<leader>sH", function() Snacks.picker.highlights() end, desc = "Highlights" },
{ "<leader>sj", function() Snacks.picker.jumps() end, desc = "Jumps" },
{ "<leader>sk", function() Snacks.picker.keymaps() end, desc = "Keymaps" },
{ "<leader>sl", function() Snacks.picker.loclist() end, desc = "Location List" },
{ "<leader>sM", function() Snacks.picker.man() end, desc = "Man Pages" },
{ "<leader>sm", function() Snacks.picker.marks() end, desc = "Marks" },
{ "<leader>sR", function() Snacks.picker.resume() end, desc = "Resume" },
{ "<leader>sq", function() Snacks.picker.qflist() end, desc = "Quickfix List" },
{ "<leader>uC", function() Snacks.picker.colorschemes() end, desc = "Colorschemes" },
{ "<leader>fp", function() Snacks.picker.projects() end, desc = "Projects" },
},
},
{
"folke/snacks.nvim",
opts = function(_, opts)
if LazyVim.has("trouble.nvim") then
return vim.tbl_deep_extend("force", opts or {}, {
picker = {
actions = require("trouble.sources.snacks").actions,
win = {
input = {
keys = {
["<c-t>"] = {
"trouble_open",
mode = { "n", "i" },
},
},
},
},
},
})
end
end,
},
{
"neovim/nvim-lspconfig",
opts = function()
if LazyVim.pick.want() ~= "snacks" then
return
end
local Keys = require("lazyvim.plugins.lsp.keymaps").get()
-- stylua: ignore
vim.list_extend(Keys, {
{ "gd", function() Snacks.picker.lsp_definitions() end, desc = "Goto Definition", has = "definition" },
{ "gr", function() Snacks.picker.lsp_references() end, nowait = true, desc = "References" },
{ "gI", function() Snacks.picker.lsp_implementations() end, desc = "Goto Implementation" },
{ "gy", function() Snacks.picker.lsp_type_definitions() end, desc = "Goto T[y]pe Definition" },
{ "<leader>ss", function() Snacks.picker.lsp_symbols({ filter = LazyVim.config.kind_filter }) end, desc = "LSP Symbols", has = "documentSymbol" },
{ "<leader>sS", function() Snacks.picker.lsp_workspace_symbols({ filter = LazyVim.config.kind_filter }) end, desc = "LSP Workspace Symbols", has = "workspace/symbols" },
})
end,
},
{
"folke/todo-comments.nvim",
optional = true,
-- stylua: ignore
keys = {
{ "<leader>st", function() Snacks.picker.todo_comments() end, desc = "Todo" },
{ "<leader>sT", function () Snacks.picker.todo_comments({ keywords = { "TODO", "FIX", "FIXME" } }) end, desc = "Todo/Fix/Fixme" },
},
},
}

View file

@ -130,6 +130,7 @@ return {
-- These depend on nvim-dap, but can additionally be disabled by setting false here.
dap = { hotcodereplace = "auto", config_overrides = {} },
-- Can set this to false to disable main class scan, which is a performance killer for large project
dap_main = {},
test = true,
settings = {
@ -246,7 +247,9 @@ return {
if opts.dap and LazyVim.has("nvim-dap") and mason_registry.is_installed("java-debug-adapter") then
-- custom init for Java debugger
require("jdtls").setup_dap(opts.dap)
require("jdtls.dap").setup_dap_main_class_configs(opts.dap_main)
if opts.dap_main then
require("jdtls.dap").setup_dap_main_class_configs(opts.dap_main)
end
-- Java Test require Java debugger to work
if opts.test and mason_registry.is_installed("java-test") then

View file

@ -104,6 +104,9 @@ return {
sign = false,
icons = {},
},
checkbox = {
enabled = false,
},
},
ft = { "markdown", "norg", "rmd", "org" },
config = function(_, opts)

View file

@ -19,6 +19,38 @@ local pick_chezmoi = function()
},
}
fzf_lua.fzf_exec(results, opts)
elseif LazyVim.pick.picker.name == "snacks" then
local results = require("chezmoi.commands").list({
args = {
"--path-style",
"absolute",
"--include",
"files",
"--exclude",
"externals",
},
})
local items = {}
for _, czFile in ipairs(results) do
table.insert(items, {
text = czFile,
file = czFile,
})
end
---@type snacks.picker.Config
local opts = {
items = items,
confirm = function(picker, item)
picker:close()
require("chezmoi.commands").edit({
targets = { item.text },
args = { "--watch" },
})
end,
}
Snacks.picker.pick(opts)
end
end

View file

@ -159,7 +159,7 @@ return {
end,
},
},
extensions = { "neo-tree", "lazy" },
extensions = { "neo-tree", "lazy", "fzf" },
}
-- do not add trouble symbols if aerial is enabled
@ -288,6 +288,9 @@ return {
opts = {
dashboard = {
preset = {
pick = function(cmd, opts)
return LazyVim.pick(cmd, opts)()
end,
header = [[
Z
Z

View file

@ -42,11 +42,13 @@ function M.register(picker)
return true
end
---@return "telescope" | "fzf"
---@return "telescope" | "fzf" | "snacks"
function M.want()
vim.g.lazyvim_picker = vim.g.lazyvim_picker or "auto"
if vim.g.lazyvim_picker == "auto" then
return LazyVim.has_extra("editor.telescope") and "telescope" or "fzf"
return LazyVim.has_extra("editor.snacks_picker") and "snacks"
or LazyVim.has_extra("editor.telescope") and "telescope"
or "fzf"
end
return vim.g.lazyvim_picker
end