Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
0e16033e9c | |||
6cf6b0a624 | |||
e08813fa11 | |||
e105c9daf6 | |||
1b74d67a0d | |||
b1ad48067e | |||
63467c1f21 | |||
13e9f6e6b5 |
27
CHANGELOG.md
27
CHANGELOG.md
@ -1,5 +1,32 @@
|
||||
# Changelog
|
||||
|
||||
## [8.4.3](https://github.com/LazyVim/LazyVim/compare/v8.4.2...v8.4.3) (2023-10-03)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **ui:** always pad to 2 cells for status column icons. Fixes [#1571](https://github.com/LazyVim/LazyVim/issues/1571) ([6cf6b0a](https://github.com/LazyVim/LazyVim/commit/6cf6b0a6241c659113f5646ff64fba7dbf5161b9))
|
||||
|
||||
## [8.4.2](https://github.com/LazyVim/LazyVim/compare/v8.4.1...v8.4.2) (2023-10-03)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **nvim-lint:** dont evaluate conditions for linter functions. Fixes [#1569](https://github.com/LazyVim/LazyVim/issues/1569) ([b1ad480](https://github.com/LazyVim/LazyVim/commit/b1ad48067e2c18747bedd7b7054c3ce97ef32890))
|
||||
* **ui:** fixed foldtext on Neovim < 0.10 ([1b74d67](https://github.com/LazyVim/LazyVim/commit/1b74d67a0d5783e587dedc73a715cb0c9db6cd16))
|
||||
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* **options:** better detection for foldtext,statuscolumn,folexpr support ([e105c9d](https://github.com/LazyVim/LazyVim/commit/e105c9daf6e973b4a294a17b4d2d1882f2188ac6))
|
||||
|
||||
## [8.4.1](https://github.com/LazyVim/LazyVim/compare/v8.4.0...v8.4.1) (2023-10-03)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **ui:** check folds of the statuscolumn win instead of current win ([13e9f6e](https://github.com/LazyVim/LazyVim/commit/13e9f6e6b5b085191b0ecf194ddf4c9e2d3ae6d7))
|
||||
|
||||
## [8.4.0](https://github.com/LazyVim/LazyVim/compare/v8.3.0...v8.4.0) (2023-10-03)
|
||||
|
||||
|
||||
|
@ -62,18 +62,14 @@ end
|
||||
|
||||
-- Folding
|
||||
vim.opt.foldlevel = 99
|
||||
if vim.treesitter.foldexpr then
|
||||
vim.opt.foldmethod = "expr"
|
||||
vim.opt.foldexpr = "v:lua.vim.treesitter.foldexpr()"
|
||||
else
|
||||
vim.opt.foldmethod = "indent"
|
||||
end
|
||||
if vim.treesitter.foldtext then
|
||||
vim.opt.foldtext = "v:lua.require'lazyvim.util.ui'.foldtext()"
|
||||
end
|
||||
vim.opt.foldtext = "v:lua.require'lazyvim.util.ui'.foldtext()"
|
||||
|
||||
if vim.fn.has("nvim-0.9.0") == 1 then
|
||||
vim.opt.foldmethod = "expr"
|
||||
vim.opt.foldexpr = "v:lua.vim.treesitter.foldexpr()"
|
||||
vim.opt.statuscolumn = [[%!v:lua.require'lazyvim.util.ui'.statuscolumn()]]
|
||||
else
|
||||
vim.opt.foldmethod = "indent"
|
||||
end
|
||||
|
||||
-- Fix markdown indentation settings
|
||||
|
@ -49,7 +49,7 @@ return {
|
||||
ctx.dirname = vim.fn.fnamemodify(ctx.filename, ":h")
|
||||
names = vim.tbl_filter(function(name)
|
||||
local linter = lint.linters[name]
|
||||
return linter and not (linter.condition and not linter.condition(ctx))
|
||||
return linter and not (type(linter) == "table" and linter.condition and not linter.condition(ctx))
|
||||
end, names)
|
||||
|
||||
if #names > 0 then
|
||||
|
@ -15,7 +15,7 @@ end
|
||||
---@param len? number
|
||||
function M.icon(sign, len)
|
||||
sign = sign or {}
|
||||
len = len or 1
|
||||
len = len or 2
|
||||
local text = vim.fn.strcharpart(sign.text or "", 0, len) ---@type string
|
||||
text = text .. string.rep(" ", len - vim.fn.strchars(text))
|
||||
return sign.texthl and ("%#" .. sign.texthl .. "#" .. text .. "%*") or text
|
||||
@ -28,6 +28,15 @@ function M.foldtext()
|
||||
ret = { { vim.api.nvim_buf_get_lines(0, vim.v.lnum - 1, vim.v.lnum, false)[1], {} } }
|
||||
end
|
||||
table.insert(ret, { " " .. require("lazyvim.config").icons.misc.dots })
|
||||
|
||||
if not vim.treesitter.foldtext then
|
||||
return table.concat(
|
||||
vim.tbl_map(function(line)
|
||||
return line[1]
|
||||
end, ret),
|
||||
" "
|
||||
)
|
||||
end
|
||||
return ret
|
||||
end
|
||||
|
||||
@ -47,9 +56,11 @@ function M.statuscolumn()
|
||||
end
|
||||
end
|
||||
|
||||
if vim.fn.foldclosed(vim.v.lnum) >= 0 then
|
||||
fold = { text = vim.opt.fillchars:get().foldclose or "", texthl = "Folded" }
|
||||
end
|
||||
vim.api.nvim_win_call(win, function()
|
||||
if vim.fn.foldclosed(vim.v.lnum) >= 0 then
|
||||
fold = { text = vim.opt.fillchars:get().foldclose or "", texthl = "Folded" }
|
||||
end
|
||||
end)
|
||||
|
||||
local nu = ""
|
||||
if vim.wo[win].number and vim.v.virtnum == 0 then
|
||||
@ -60,7 +71,7 @@ function M.statuscolumn()
|
||||
M.icon(left),
|
||||
[[%=]],
|
||||
nu .. " ",
|
||||
M.icon(fold or right, 2),
|
||||
M.icon(fold or right),
|
||||
}, "")
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user