mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
Merge branch 'main' into fix-vue
This commit is contained in:
commit
cb82b767b2
13 changed files with 117 additions and 14 deletions
2
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
2
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
|
|
@ -75,7 +75,7 @@ body:
|
||||||
-- install plugins
|
-- install plugins
|
||||||
local plugins = {
|
local plugins = {
|
||||||
"folke/tokyonight.nvim",
|
"folke/tokyonight.nvim",
|
||||||
"folke/LazyVim",
|
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
||||||
-- add any other plugins here
|
-- add any other plugins here
|
||||||
}
|
}
|
||||||
require("lazy").setup(plugins, {
|
require("lazy").setup(plugins, {
|
||||||
|
|
|
||||||
13
CHANGELOG.md
13
CHANGELOG.md
|
|
@ -1,5 +1,18 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [12.14.1](https://github.com/LazyVim/LazyVim/compare/v12.14.0...v12.14.1) (2024-06-14)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **edgy:** only track other neo-tree windows with a source ([6efbdab](https://github.com/LazyVim/LazyVim/commit/6efbdabd1b2272401566354686ce85e1372fe925))
|
||||||
|
* **extras:** better reasons as to why some extras are included in your config. ([eeccbbc](https://github.com/LazyVim/LazyVim/commit/eeccbbc40721bb825182251acf201750741c77b2))
|
||||||
|
* **fzf:** esc and c-j, c-k keymaps with nowait. update fzf-lua as well ([c9380a3](https://github.com/LazyVim/LazyVim/commit/c9380a309dbdc9fe45ec1bc9f8f27700540c2eea))
|
||||||
|
* **fzf:** esc and nowait ([7c7703d](https://github.com/LazyVim/LazyVim/commit/7c7703d79226cda99b1ec3d25fbfff54af04ba5b))
|
||||||
|
* **fzf:** floating previewer closed fail ([#3638](https://github.com/LazyVim/LazyVim/issues/3638)) ([427e57d](https://github.com/LazyVim/LazyVim/commit/427e57ddf7030f7081d858d923fb9337f94bf0a7))
|
||||||
|
* **issue template:** repro.lua didn't work ([#3628](https://github.com/LazyVim/LazyVim/issues/3628)) ([25cccb5](https://github.com/LazyVim/LazyVim/commit/25cccb5db858ad0640fd6a9eb5da4c5f465749d9))
|
||||||
|
* **pick:** allow configuring pickers without LazyExtras. Fixes [#3626](https://github.com/LazyVim/LazyVim/issues/3626) ([304e743](https://github.com/LazyVim/LazyVim/commit/304e7439aa8ae646adafb737b292707bf77a31d9))
|
||||||
|
|
||||||
## [12.14.0](https://github.com/LazyVim/LazyVim/compare/v12.13.0...v12.14.0) (2024-06-13)
|
## [12.14.0](https://github.com/LazyVim/LazyVim/compare/v12.13.0...v12.14.0) (2024-06-13)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -113,6 +113,10 @@ docker run -w /root -it --rm alpine:edge sh -uelic '
|
||||||
|
|
||||||
[](https://www.youtube.com/watch?v=N93cTbtLCIM)
|
[](https://www.youtube.com/watch?v=N93cTbtLCIM)
|
||||||
|
|
||||||
|
[@dusty-phillips](https://github.com/dusty-phillips) 正在编写一本名为
|
||||||
|
[LazyVim for Ambitious Developers](https://lazyvim-ambitious-devs.phillips.codes)
|
||||||
|
的书,该书可在线免费获得。
|
||||||
|
|
||||||
## 📂 文件结构
|
## 📂 文件结构
|
||||||
|
|
||||||
config 下的文件会在适当的时候自动加载,所以你不需要手动引入这些文件。
|
config 下的文件会在适当的时候自动加载,所以你不需要手动引入这些文件。
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,12 @@ vim.g.maplocalleader = "\\"
|
||||||
-- LazyVim auto format
|
-- LazyVim auto format
|
||||||
vim.g.autoformat = true
|
vim.g.autoformat = true
|
||||||
|
|
||||||
|
-- LazyVim picker to use.
|
||||||
|
-- Can be one of: telescope, fzf
|
||||||
|
-- Leave it to "auto" to automatically use the picker
|
||||||
|
-- enabled with `:LazyExtras`
|
||||||
|
vim.g.lazyvim_picker = "auto"
|
||||||
|
|
||||||
-- LazyVim root dir detection
|
-- LazyVim root dir detection
|
||||||
-- Each entry can be:
|
-- Each entry can be:
|
||||||
-- * the name of a detector function like `lsp` or `cwd`
|
-- * the name of a detector function like `lsp` or `cwd`
|
||||||
|
|
|
||||||
|
|
@ -26,4 +26,13 @@ return {
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
dependencies = {},
|
dependencies = {},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
-- dummy import to save core imports
|
||||||
|
{
|
||||||
|
import = "foobar",
|
||||||
|
enabled = function()
|
||||||
|
LazyVim.plugin.save_core()
|
||||||
|
return false
|
||||||
|
end,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -236,8 +236,8 @@ return {
|
||||||
-- better diagnostics list and others
|
-- better diagnostics list and others
|
||||||
{
|
{
|
||||||
"folke/trouble.nvim",
|
"folke/trouble.nvim",
|
||||||
cmd = { "TroubleToggle", "Trouble" },
|
cmd = { "Trouble" },
|
||||||
opts = { use_diagnostic_signs = true },
|
opts = {},
|
||||||
keys = {
|
keys = {
|
||||||
{ "<leader>xx", "<cmd>Trouble diagnostics toggle<cr>", desc = "Diagnostics (Trouble)" },
|
{ "<leader>xx", "<cmd>Trouble diagnostics toggle<cr>", desc = "Diagnostics (Trouble)" },
|
||||||
{ "<leader>xX", "<cmd>Trouble diagnostics toggle filter.buf=0<cr>", desc = "Buffer Diagnostics (Trouble)" },
|
{ "<leader>xX", "<cmd>Trouble diagnostics toggle filter.buf=0<cr>", desc = "Buffer Diagnostics (Trouble)" },
|
||||||
|
|
@ -301,13 +301,13 @@ return {
|
||||||
{
|
{
|
||||||
import = "lazyvim.plugins.extras.editor.fzf",
|
import = "lazyvim.plugins.extras.editor.fzf",
|
||||||
enabled = function()
|
enabled = function()
|
||||||
return LazyVim.has_extra("editor.fzf")
|
return LazyVim.pick.want() == "fzf"
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
import = "lazyvim.plugins.extras.editor.telescope",
|
import = "lazyvim.plugins.extras.editor.telescope",
|
||||||
enabled = function()
|
enabled = function()
|
||||||
return not LazyVim.has_extra("editor.fzf")
|
return LazyVim.pick.want() == "telescope"
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,9 @@
|
||||||
|
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 = "fzf"
|
||||||
|
end
|
||||||
|
|
||||||
---@class FzfLuaOpts: lazyvim.util.pick.Opts
|
---@class FzfLuaOpts: lazyvim.util.pick.Opts
|
||||||
---@field cmd string?
|
---@field cmd string?
|
||||||
|
|
||||||
|
|
@ -155,9 +161,8 @@ return {
|
||||||
require("fzf-lua").register_ui_select(opts.ui_select or nil)
|
require("fzf-lua").register_ui_select(opts.ui_select or nil)
|
||||||
end,
|
end,
|
||||||
keys = {
|
keys = {
|
||||||
{ "<esc>", "<c-c>", ft = "fzf", mode = "t", nowait = true },
|
{ "<c-j>", "<c-j>", ft = "fzf", mode = "t", nowait = true },
|
||||||
{ "<c-j>", "<Down>", ft = "fzf", mode = "t", nowait = true },
|
{ "<c-k>", "<c-k>", ft = "fzf", mode = "t", nowait = true },
|
||||||
{ "<c-k>", "<Up>", ft = "fzf", mode = "t", nowait = true },
|
|
||||||
{
|
{
|
||||||
"<leader>,",
|
"<leader>,",
|
||||||
"<cmd>FzfLua buffers sort_mru=true sort_lastused=true<cr>",
|
"<cmd>FzfLua buffers sort_mru=true sort_lastused=true<cr>",
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,9 @@
|
||||||
|
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 = "telescope"
|
||||||
|
end
|
||||||
|
|
||||||
local have_make = vim.fn.executable("make") == 1
|
local have_make = vim.fn.executable("make") == 1
|
||||||
local have_cmake = vim.fn.executable("cmake") == 1
|
local have_cmake = vim.fn.executable("cmake") == 1
|
||||||
|
|
||||||
|
|
@ -49,6 +55,9 @@ return {
|
||||||
{
|
{
|
||||||
"nvim-telescope/telescope.nvim",
|
"nvim-telescope/telescope.nvim",
|
||||||
cmd = "Telescope",
|
cmd = "Telescope",
|
||||||
|
enabled = function()
|
||||||
|
return LazyVim.pick.want() == "telescope"
|
||||||
|
end,
|
||||||
version = false, -- telescope did only one release, so use HEAD for now
|
version = false, -- telescope did only one release, so use HEAD for now
|
||||||
dependencies = {
|
dependencies = {
|
||||||
{
|
{
|
||||||
|
|
@ -228,6 +237,9 @@ return {
|
||||||
{
|
{
|
||||||
"stevearc/dressing.nvim",
|
"stevearc/dressing.nvim",
|
||||||
lazy = true,
|
lazy = true,
|
||||||
|
enabled = function()
|
||||||
|
return LazyVim.pick.want() == "telescope"
|
||||||
|
end,
|
||||||
init = function()
|
init = function()
|
||||||
---@diagnostic disable-next-line: duplicate-set-field
|
---@diagnostic disable-next-line: duplicate-set-field
|
||||||
vim.ui.select = function(...)
|
vim.ui.select = function(...)
|
||||||
|
|
@ -245,6 +257,9 @@ return {
|
||||||
{
|
{
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
opts = function()
|
opts = function()
|
||||||
|
if LazyVim.pick.want() ~= "telescope" then
|
||||||
|
return
|
||||||
|
end
|
||||||
local Keys = require("lazyvim.plugins.lsp.keymaps").get()
|
local Keys = require("lazyvim.plugins.lsp.keymaps").get()
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
vim.list_extend(Keys, {
|
vim.list_extend(Keys, {
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,14 @@ return {
|
||||||
pinned = true,
|
pinned = true,
|
||||||
open = "Neotree position=top buffers",
|
open = "Neotree position=top buffers",
|
||||||
},
|
},
|
||||||
"neo-tree",
|
{
|
||||||
|
title = "Neo-Tree Other",
|
||||||
|
ft = "neo-tree",
|
||||||
|
filter = function(buf)
|
||||||
|
return vim.b[buf].neo_tree_source ~= nil
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
-- "neo-tree",
|
||||||
},
|
},
|
||||||
keys = {
|
keys = {
|
||||||
-- increase width
|
-- increase width
|
||||||
|
|
|
||||||
|
|
@ -20,8 +20,9 @@ local v = version.major .. "_" .. version.minor
|
||||||
|
|
||||||
local compat = { "0_9" }
|
local compat = { "0_9" }
|
||||||
|
|
||||||
|
LazyVim.plugin.save_core()
|
||||||
if vim.tbl_contains(compat, v) then
|
if vim.tbl_contains(compat, v) then
|
||||||
extras[#extras + 1] = "lazyvim.plugins.compat.nvim-" .. v
|
table.insert(extras, 1, "lazyvim.plugins.compat.nvim-" .. v)
|
||||||
end
|
end
|
||||||
|
|
||||||
table.sort(extras, function(a, b)
|
table.sort(extras, function(a, b)
|
||||||
|
|
|
||||||
|
|
@ -250,10 +250,30 @@ end
|
||||||
---@param extra LazyExtra
|
---@param extra LazyExtra
|
||||||
function X:extra(extra)
|
function X:extra(extra)
|
||||||
if not extra.managed then
|
if not extra.managed then
|
||||||
self:diagnostic({
|
---@type LazyExtra[]
|
||||||
message = "Not managed by LazyExtras (config)",
|
local parents = {}
|
||||||
severity = vim.diagnostic.severity.WARN,
|
for _, x in ipairs(self.extras) do
|
||||||
})
|
if x.enabled and vim.tbl_contains(x.imports, extra.module) then
|
||||||
|
parents[#parents + 1] = x
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if #parents > 0 then
|
||||||
|
local pp = vim.tbl_map(function(x)
|
||||||
|
return x.name
|
||||||
|
end, parents)
|
||||||
|
self:diagnostic({
|
||||||
|
message = "Required by " .. table.concat(pp, ", "),
|
||||||
|
})
|
||||||
|
elseif vim.tbl_contains(LazyVim.plugin.core_imports, extra.module) then
|
||||||
|
self:diagnostic({
|
||||||
|
message = "This extra is included by default",
|
||||||
|
})
|
||||||
|
else
|
||||||
|
self:diagnostic({
|
||||||
|
message = "Not managed by LazyExtras (config)",
|
||||||
|
severity = vim.diagnostic.severity.WARN,
|
||||||
|
})
|
||||||
|
end
|
||||||
end
|
end
|
||||||
extra.row = self.text:row()
|
extra.row = self.text:row()
|
||||||
local hl = extra.managed and "LazySpecial" or "LazyLocal"
|
local hl = extra.managed and "LazySpecial" or "LazyLocal"
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,11 @@ function M.register(picker)
|
||||||
if vim.v.vim_did_enter == 1 then
|
if vim.v.vim_did_enter == 1 then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if M.picker and M.picker.name ~= M.want() then
|
||||||
|
M.picker = nil
|
||||||
|
end
|
||||||
|
|
||||||
if M.picker and M.picker.name ~= picker.name then
|
if M.picker and M.picker.name ~= picker.name then
|
||||||
LazyVim.warn(
|
LazyVim.warn(
|
||||||
"`LazyVim.pick`: picker already set to `" .. M.picker.name .. "`,\nignoring new picker `" .. picker.name .. "`"
|
"`LazyVim.pick`: picker already set to `" .. M.picker.name .. "`,\nignoring new picker `" .. picker.name .. "`"
|
||||||
|
|
@ -42,6 +47,14 @@ function M.register(picker)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
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.fzf") and "fzf" or "telescope"
|
||||||
|
end
|
||||||
|
return vim.g.lazyvim_picker
|
||||||
|
end
|
||||||
|
|
||||||
---@param command? string
|
---@param command? string
|
||||||
---@param opts? lazyvim.util.pick.Opts
|
---@param opts? lazyvim.util.pick.Opts
|
||||||
function M.open(command, opts)
|
function M.open(command, opts)
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,9 @@ local Plugin = require("lazy.core.plugin")
|
||||||
---@class lazyvim.util.plugin
|
---@class lazyvim.util.plugin
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
|
---@type string[]
|
||||||
|
M.core_imports = {}
|
||||||
|
|
||||||
M.lazy_file_events = { "BufReadPost", "BufNewFile", "BufWritePre" }
|
M.lazy_file_events = { "BufReadPost", "BufNewFile", "BufWritePre" }
|
||||||
|
|
||||||
---@type table<string, string>
|
---@type table<string, string>
|
||||||
|
|
@ -32,6 +35,13 @@ M.renames = {
|
||||||
["glepnir/dashboard-nvim"] = "nvimdev/dashboard-nvim",
|
["glepnir/dashboard-nvim"] = "nvimdev/dashboard-nvim",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function M.save_core()
|
||||||
|
if vim.v.vim_did_enter == 1 then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
M.core_imports = vim.deepcopy(require("lazy.core.config").spec.modules)
|
||||||
|
end
|
||||||
|
|
||||||
function M.setup()
|
function M.setup()
|
||||||
M.fix_imports()
|
M.fix_imports()
|
||||||
M.fix_renames()
|
M.fix_renames()
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue