Merge branch 'LazyVim:main' into main

This commit is contained in:
Nybkox 2024-06-30 22:38:30 +02:00 committed by GitHub
commit 7fa3fc357d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 58 additions and 15 deletions

View file

@ -1,3 +1,3 @@
{ {
".": "12.21.0" ".": "12.22.1"
} }

View file

@ -15,11 +15,7 @@ jobs:
version: latest version: latest
args: --check . args: --check .
tests: tests:
strategy: runs-on: ubuntu-latest
matrix:
# os: [ubuntu-latest, windows-latest]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Install Neovim - name: Install Neovim

View file

@ -1,5 +1,43 @@
# Changelog # Changelog
## [12.22.1](https://github.com/LazyVim/LazyVim/compare/v12.22.0...v12.22.1) (2024-06-30)
### Performance Improvements
* **markdown:** only run markdownlint-cli2 formatter when there are markdownlint diagnostics for the buffer ([8a6875a](https://github.com/LazyVim/LazyVim/commit/8a6875ab3bc79d5890cf0a65e3ef602c1567fa90))
### Reverts
* feat(neo-tree): more sane defaults for gitignore and hidden files ([2bfcd05](https://github.com/LazyVim/LazyVim/commit/2bfcd05c621f74b4d735b14b43804a901f17d416))
## [12.22.0](https://github.com/LazyVim/LazyVim/compare/v12.21.1...v12.22.0) (2024-06-30)
### Features
* allow a custom path for `lazyvim.json`. Fixes [#3856](https://github.com/LazyVim/LazyVim/issues/3856) ([131187c](https://github.com/LazyVim/LazyVim/commit/131187c092cc42768e0a48a3668e91d009a213a0))
* **cmp:** disable `item.menu` for Rust filetypes ([#3858](https://github.com/LazyVim/LazyVim/issues/3858)) ([ee44b21](https://github.com/LazyVim/LazyVim/commit/ee44b2189827e6a34530ad8b55f214a0a809c045))
* **neo-tree:** more sane defaults for gitignore and hidden files ([85405d6](https://github.com/LazyVim/LazyVim/commit/85405d65348cac72343d081a81addfb5c8d43743))
### Bug Fixes
* **lsp:** prevent setting up mason-lspconfig more than once when setting mslp opts ([8c900f9](https://github.com/LazyVim/LazyVim/commit/8c900f92e735e9c7e9af24b97de740390383a137))
## [12.21.1](https://github.com/LazyVim/LazyVim/compare/v12.21.0...v12.21.1) (2024-06-29)
### Bug Fixes
* **git:** use current dir when git not found to get a meaningful error message ([b43ace1](https://github.com/LazyVim/LazyVim/commit/b43ace1ecfbeb87626fbde8973a2717247471b2e))
### Performance Improvements
* **markdown:** don't format with markdown-toc when no toc in the doc ([73e72ee](https://github.com/LazyVim/LazyVim/commit/73e72ee21d7673e4040bb99f4de834410219d6cb))
## [12.21.0](https://github.com/LazyVim/LazyVim/compare/v12.20.1...v12.21.0) (2024-06-29) ## [12.21.0](https://github.com/LazyVim/LazyVim/compare/v12.20.1...v12.21.0) (2024-06-29)

View file

@ -1,4 +1,4 @@
*LazyVim.txt* For Neovim >= 0.9.0 Last change: 2024 June 29 *LazyVim.txt* For Neovim >= 0.9.0 Last change: 2024 June 30
============================================================================== ==============================================================================
Table of Contents *LazyVim-table-of-contents* Table of Contents *LazyVim-table-of-contents*

View file

@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util")
---@class LazyVimConfig: LazyVimOptions ---@class LazyVimConfig: LazyVimOptions
local M = {} local M = {}
M.version = "12.21.0" -- x-release-please-version M.version = "12.22.1" -- x-release-please-version
LazyVim.config = M LazyVim.config = M
---@class LazyVimOptions ---@class LazyVimOptions
@ -136,6 +136,7 @@ local defaults = {
M.json = { M.json = {
version = 6, version = 6,
path = vim.g.lazyvim_json or vim.fn.stdpath("config") .. "/lazyvim.json",
data = { data = {
version = nil, ---@type string? version = nil, ---@type string?
news = {}, ---@type table<string, string> news = {}, ---@type table<string, string>
@ -144,8 +145,7 @@ M.json = {
} }
function M.json.load() function M.json.load()
local path = vim.fn.stdpath("config") .. "/lazyvim.json" local f = io.open(M.json.path, "r")
local f = io.open(path, "r")
if f then if f then
local data = f:read("*a") local data = f:read("*a")
f:close() f:close()

View file

@ -49,11 +49,14 @@ return {
{ name = "buffer" }, { name = "buffer" },
}), }),
formatting = { formatting = {
format = function(_, item) format = function(entry, item)
local icons = LazyVim.config.icons.kinds local icons = LazyVim.config.icons.kinds
if icons[item.kind] then if icons[item.kind] then
item.kind = icons[item.kind] .. item.kind item.kind = icons[item.kind] .. item.kind
end end
if entry.context.filetype == "rust" then
item.menu = nil
end
return item return item
end, end,
}, },

View file

@ -3,7 +3,6 @@ return {
-- file explorer -- file explorer
{ {
"nvim-neo-tree/neo-tree.nvim", "nvim-neo-tree/neo-tree.nvim",
branch = "v3.x",
cmd = "Neotree", cmd = "Neotree",
keys = { keys = {
{ {

View file

@ -24,6 +24,14 @@ return {
end end
end, end,
}, },
["markdownlint-cli2"] = {
condition = function(_, ctx)
local diag = vim.tbl_filter(function(d)
return d.source == "markdownlint"
end, vim.diagnostic.get(ctx.buf))
return #diag > 0
end,
},
}, },
formatters_by_ft = { formatters_by_ft = {
["markdown"] = { "prettier", "markdownlint-cli2", "markdown-toc" }, ["markdown"] = { "prettier", "markdownlint-cli2", "markdown-toc" },

View file

@ -5,7 +5,7 @@ return {
event = "LazyFile", event = "LazyFile",
dependencies = { dependencies = {
"mason.nvim", "mason.nvim",
"williamboman/mason-lspconfig.nvim", { "williamboman/mason-lspconfig.nvim", config = function() end },
}, },
---@class PluginLspOpts ---@class PluginLspOpts
opts = function() opts = function()

View file

@ -45,8 +45,7 @@ end
function M.save() function M.save()
LazyVim.config.json.data.version = LazyVim.config.json.version LazyVim.config.json.data.version = LazyVim.config.json.version
local path = vim.fn.stdpath("config") .. "/lazyvim.json" local f = io.open(LazyVim.config.json.path, "w")
local f = io.open(path, "w")
if f then if f then
f:write(LazyVim.json.encode(LazyVim.config.json.data)) f:write(LazyVim.json.encode(LazyVim.config.json.data))
f:close() f:close()