Merge branch 'main' into dev

This commit is contained in:
chuyanlong 2025-09-24 08:33:48 +08:00
commit 5937d256db
6 changed files with 42 additions and 19 deletions

View file

@ -1,3 +1,3 @@
{
".": "15.2.0"
".": "15.3.0"
}

View file

@ -1,5 +1,24 @@
# Changelog
## [15.3.0](https://github.com/LazyVim/LazyVim/compare/v15.2.0...v15.3.0) (2025-09-23)
### Features
* **copilot:** use `blink-copilot` as blink.cmp copilot source ([#5551](https://github.com/LazyVim/LazyVim/issues/5551)) ([13069f2](https://github.com/LazyVim/LazyVim/commit/13069f20183655d8a02f3acbd21d0ac4c9ce811c))
* **treesitter:** show an error if the user tries to set a custom treesitter compiler ([89ff1fd](https://github.com/LazyVim/LazyVim/commit/89ff1fd600bb6ff4cf2c9edbc2217a40ecb8d160))
### Bug Fixes
* **jdtls:** allow mason jdtls installation ([#6498](https://github.com/LazyVim/LazyVim/issues/6498)) ([80990ec](https://github.com/LazyVim/LazyVim/commit/80990ec62fd36fc4b6b921a9041f55858e33e030))
* **jdtls:** bundle configuration bug fix ([#6499](https://github.com/LazyVim/LazyVim/issues/6499)) ([c423765](https://github.com/LazyVim/LazyVim/commit/c4237659621e406089f4d13d32192954d52c4924))
* **keymaps:** enable snacks git keybindings ([#6323](https://github.com/LazyVim/LazyVim/issues/6323)) ([720e06a](https://github.com/LazyVim/LazyVim/commit/720e06a908cbf6e3afb4eccc049d58df9ace770a))
* **lsp:** fix mason install/exclude. Closes [#6504](https://github.com/LazyVim/LazyVim/issues/6504) ([37b1ec4](https://github.com/LazyVim/LazyVim/commit/37b1ec41ae57e8396d5c923a4bfdf7050215b4d6))
* **lsp:** fixup for when not using mason ([a90b565](https://github.com/LazyVim/LazyVim/commit/a90b56518f4f2291985952d79472d4f935c0bad0))
* **luasnip:** add missing optional tag to garymjr/nvim-snippets ([#5733](https://github.com/LazyVim/LazyVim/issues/5733)) ([37a1c1a](https://github.com/LazyVim/LazyVim/commit/37a1c1af5dbbcf069bb94a71b4dda3626fbda77a))
* **vtsls:** fix and move denols/vtsls disambigutaion to typescript extra. Fixes [#6476](https://github.com/LazyVim/LazyVim/issues/6476) ([775621a](https://github.com/LazyVim/LazyVim/commit/775621ac0af42486ef1cd4254d1a6625a190040b))
## [15.2.0](https://github.com/LazyVim/LazyVim/compare/v15.1.1...v15.2.0) (2025-09-20)

View file

@ -1,4 +1,4 @@
*LazyVim.txt* For Neovim Last change: 2025 September 22
*LazyVim.txt* For Neovim Last change: 2025 September 23
==============================================================================
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 = "15.2.0" -- x-release-please-version
M.version = "15.3.0" -- x-release-please-version
LazyVim.config = M
---@class LazyVimOptions

View file

@ -71,6 +71,11 @@ return {
servers = {
jdtls = {},
},
setup = {
jdtls = function()
return true -- avoid duplicate servers
end,
},
},
},

View file

@ -187,37 +187,36 @@ return {
local mason_all = have_mason
and vim.tbl_keys(require("mason-lspconfig.mappings").get_mason_map().lspconfig_to_package)
or {} --[[ @as string[] ]]
local mason_exclude = {} ---@type string[]
---@return boolean? exclude automatic setup
local function configure(server)
local sopts = opts.servers[server]
sopts = sopts == true and {} or (not sopts) and { enabled = false } or sopts --[[@as lazyvim.lsp.Config]]
if sopts.enabled == false then
return true
mason_exclude[#mason_exclude + 1] = server
return
end
local use_mason = sopts.mason ~= false and vim.tbl_contains(mason_all, server)
local setup = opts.setup[server] or opts.setup["*"]
if setup and setup(server, sopts) then
return true -- lsp will be configured and enabled by the setup function
end
vim.lsp.config(server, sopts) -- configure the server
-- manually enable if mason=false or if this is a server that cannot be installed with mason-lspconfig
if sopts.mason == false or not vim.tbl_contains(mason_all, server) then
vim.lsp.enable(server)
return true
mason_exclude[#mason_exclude + 1] = server
else
vim.lsp.config(server, sopts) -- configure the server
if not use_mason then
vim.lsp.enable(server)
end
end
return use_mason
end
local servers = vim.tbl_keys(opts.servers)
local exclude = vim.tbl_filter(configure, servers)
local install = vim.tbl_filter(configure, vim.tbl_keys(opts.servers))
if have_mason then
require("mason-lspconfig").setup({
ensure_installed = vim.tbl_filter(function(server)
return not vim.tbl_contains(exclude, server)
end, vim.list_extend(servers, LazyVim.opts("mason-lspconfig.nvim").ensure_installed or {})),
automatic_enable = { exclude = exclude },
ensure_installed = vim.list_extend(install, LazyVim.opts("mason-lspconfig.nvim").ensure_installed or {}),
automatic_enable = { exclude = mason_exclude },
})
end
end),