Compare commits

..

6 Commits

Author SHA1 Message Date
e08813fa11 chore(main): release 8.4.2 ()
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-03 18:22:19 +02:00
e105c9daf6 perf(options): better detection for foldtext,statuscolumn,folexpr support 2023-10-03 18:19:32 +02:00
1b74d67a0d fix(ui): fixed foldtext on Neovim < 0.10 2023-10-03 17:35:14 +02:00
b1ad48067e fix(nvim-lint): dont evaluate conditions for linter functions. Fixes 2023-10-03 16:32:05 +02:00
63467c1f21 chore(main): release 8.4.1 ()
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-03 15:55:11 +02:00
13e9f6e6b5 fix(ui): check folds of the statuscolumn win instead of current win 2023-10-03 15:53:11 +02:00
4 changed files with 40 additions and 13 deletions
CHANGELOG.md
lua/lazyvim
config
plugins/extras/linting
util

@ -1,5 +1,25 @@
# Changelog
## [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 &lt; 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

@ -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