Compare commits

..

10 Commits
v13.0.0 ... ai

Author SHA1 Message Date
725469adba refactor: move ai extras to ai instead of coding 2024-11-10 11:25:55 +01:00
b9dae57961 perf(ui): only enable treesitter folds if the buffer has treesitter highlighting 2024-11-09 23:33:05 +01:00
24665fc736 feat(keymaps): leader-bo to close other buffers 2024-11-09 16:13:11 +01:00
9c9e650530 fix(extras): fix alpha-nvim non-string keycodes (#4735)
## Description

The `dashboard.button` function provided by alpha-nvim expects a string
keybind, not a function:


https://github.com/goolord/alpha-nvim/blob/main/lua/alpha/themes/dashboard.lua#L63

## Related Issue(s)

Fixes https://github.com/LazyVim/LazyVim/issues/3728.

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2024-11-09 15:57:48 +01:00
f57944f926 chore(main): release 13.1.0 (#4733)
🤖 I have created a release *beep* *boop*
---


##
[13.1.0](https://github.com/LazyVim/LazyVim/compare/v13.0.0...v13.1.0)
(2024-11-09)


### Features

* **terraform:** add formatter for packer files
([#4591](https://github.com/LazyVim/LazyVim/issues/4591))
([4876d11](4876d1137d))


### Bug Fixes

* **extras:** lazy-load telescope-terraform plugins
([#4667](https://github.com/LazyVim/LazyVim/issues/4667))
([94b4219](94b4219327))
* **options:** make sure spelling works in regular text files
([548fddd](548fddd1d5))
* **snacks:** noice now honors `Snacks.config.notifier.enabled = false`
([220148f](220148f47f))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-11-09 15:51:45 +01:00
5b66db294f chore(build): auto-generate docs 2024-11-09 14:50:33 +00:00
220148f47f fix(snacks): noice now honors Snacks.config.notifier.enabled = false 2024-11-09 15:49:40 +01:00
4876d1137d feat(terraform): add formatter for packer files (#4591)
## Description

Adds a formatter for Packer configuration files (`ft=hcl`), a file type
already partially supported by the `lang.terraform` extra.

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2024-11-08 21:14:22 +01:00
EJ
94b4219327 fix(extras): lazy-load telescope-terraform plugins (#4667)
## Description

In the current terraform extra, both
`cappyzawa/telescope-terraform.nvim` and
`ANGkeith/telescope-terraform-doc.nvim` are dependencies of
`telescope.nvim`.
This should be reversed so that the telescope extensions only load when
needed
(I added a `ft` trigger which I think makes the most sense), and not as
a
dependency of `telescope.nvim`.

## Related Issue(s)

No related issues, just fixed this when the loading time of
`telescope-terraform-doc.nvim` in-particular was annoying (+~30ms
startup).

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2024-11-08 21:08:21 +01:00
548fddd1d5 fix(options): make sure spelling works in regular text files 2024-11-08 21:05:30 +01:00
16 changed files with 42 additions and 12 deletions

View File

@ -1,3 +1,3 @@
{
".": "13.0.0"
".": "13.1.0"
}

View File

@ -1,5 +1,19 @@
# Changelog
## [13.1.0](https://github.com/LazyVim/LazyVim/compare/v13.0.0...v13.1.0) (2024-11-09)
### Features
* **terraform:** add formatter for packer files ([#4591](https://github.com/LazyVim/LazyVim/issues/4591)) ([4876d11](https://github.com/LazyVim/LazyVim/commit/4876d1137d374af6f39661e402926220517ae4ab))
### Bug Fixes
* **extras:** lazy-load telescope-terraform plugins ([#4667](https://github.com/LazyVim/LazyVim/issues/4667)) ([94b4219](https://github.com/LazyVim/LazyVim/commit/94b42193272569f8005587069733f3ba0610bc9b))
* **options:** make sure spelling works in regular text files ([548fddd](https://github.com/LazyVim/LazyVim/commit/548fddd1d5db65a80b11500e32cfe86e69bc8777))
* **snacks:** noice now honors `Snacks.config.notifier.enabled = false` ([220148f](https://github.com/LazyVim/LazyVim/commit/220148f47f175229232eee31982577fbdd637663))
## [13.0.0](https://github.com/LazyVim/LazyVim/compare/v12.44.1...v13.0.0) (2024-11-08)

View File

@ -1,4 +1,4 @@
*LazyVim.txt* For Neovim Last change: 2024 November 08
*LazyVim.txt* For Neovim Last change: 2024 November 09
==============================================================================
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 = "13.0.0" -- x-release-please-version
M.version = "13.1.0" -- x-release-please-version
LazyVim.config = M
---@class LazyVimOptions
@ -135,7 +135,7 @@ local defaults = {
}
M.json = {
version = 6,
version = 7,
path = vim.g.lazyvim_json or vim.fn.stdpath("config") .. "/lazyvim.json",
data = {
version = nil, ---@type string?

View File

@ -40,6 +40,9 @@ map("n", "<leader>`", "<cmd>e #<cr>", { desc = "Switch to Other Buffer" })
map("n", "<leader>bd", function()
Snacks.bufdelete()
end, { desc = "Delete Buffer" })
map("n", "<leader>bo", function()
Snacks.bufdelete.other()
end, { desc = "Delete Other Buffers" })
map("n", "<leader>bD", "<cmd>:bd<cr>", { desc = "Delete Buffer and Window" })
-- Clear search with <esc>

View File

@ -82,7 +82,6 @@ opt.signcolumn = "yes" -- Always show the signcolumn, otherwise it would shift t
opt.smartcase = true -- Don't ignore case with capitals
opt.smartindent = true -- Insert indents automatically
opt.spelllang = { "en" }
opt.spelloptions:append("noplainbuffer")
opt.splitbelow = true -- Put new windows below current
opt.splitkeep = "screen"
opt.splitright = true -- Put new windows right of current

View File

@ -29,6 +29,7 @@ return {
opts = function(_, opts)
local null_ls = require("null-ls")
opts.sources = vim.list_extend(opts.sources or {}, {
null_ls.builtins.formatting.packer,
null_ls.builtins.formatting.terraform_fmt,
null_ls.builtins.diagnostics.terraform_validate,
})
@ -49,6 +50,7 @@ return {
optional = true,
opts = {
formatters_by_ft = {
hcl = { "packer_fmt" },
terraform = { "terraform_fmt" },
tf = { "terraform_fmt" },
["terraform-vars"] = { "terraform_fmt" },
@ -58,9 +60,10 @@ return {
{
"nvim-telescope/telescope.nvim",
optional = true,
dependencies = {
specs = {
{
"ANGkeith/telescope-terraform-doc.nvim",
ft = { "terraform", "hcl" },
config = function()
LazyVim.on_load("telescope.nvim", function()
require("telescope").load_extension("terraform_doc")
@ -69,6 +72,7 @@ return {
},
{
"cappyzawa/telescope-terraform.nvim",
ft = { "terraform", "hcl" },
config = function()
LazyVim.on_load("telescope.nvim", function()
require("telescope").load_extension("terraform")

View File

@ -23,11 +23,11 @@ return {
dashboard.section.header.val = vim.split(logo, "\n")
-- stylua: ignore
dashboard.section.buttons.val = {
dashboard.button("f", "" .. " Find file", LazyVim.pick()),
dashboard.button("f", "" .. " Find file", "<cmd> lua LazyVim.pick()() <cr>"),
dashboard.button("n", "" .. " New file", [[<cmd> ene <BAR> startinsert <cr>]]),
dashboard.button("r", "" .. " Recent files", LazyVim.pick("oldfiles")),
dashboard.button("g", "" .. " Find text", LazyVim.pick("live_grep")),
dashboard.button("c", "" .. " Config", LazyVim.pick.config_files()),
dashboard.button("r", "" .. " Recent files", [[<cmd> lua LazyVim.pick("oldfiles")() <cr>]]),
dashboard.button("g", "" .. " Find text", [[<cmd> lua LazyVim.pick("live_grep")() <cr>]]),
dashboard.button("c", "" .. " Config", "<cmd> lua LazyVim.pick.config_files()() <cr>"),
dashboard.button("s", "" .. " Restore Session", [[<cmd> lua require("persistence").load() <cr>]]),
dashboard.button("x", "" .. " Lazy Extras", "<cmd> LazyExtras <cr>"),
dashboard.button("l", "󰒲 " .. " Lazy", "<cmd> Lazy <cr>"),

View File

@ -31,7 +31,6 @@ return {
---@type snacks.Config
return {
toggle = { map = LazyVim.safe_keymap_set },
notifier = { enabled = not LazyVim.has("noice.nvim") },
terminal = {
win = {
keys = {

View File

@ -7,7 +7,6 @@ return {
keys = {
{ "<leader>bp", "<Cmd>BufferLineTogglePin<CR>", desc = "Toggle Pin" },
{ "<leader>bP", "<Cmd>BufferLineGroupClose ungrouped<CR>", desc = "Delete Non-Pinned Buffers" },
{ "<leader>bo", "<Cmd>BufferLineCloseOthers<CR>", desc = "Delete Other Buffers" },
{ "<leader>br", "<Cmd>BufferLineCloseRight<CR>", desc = "Delete Buffers to the Right" },
{ "<leader>bl", "<Cmd>BufferLineCloseLeft<CR>", desc = "Delete Buffers to the Left" },
{ "<S-h>", "<cmd>BufferLineCyclePrev<cr>", desc = "Prev Buffer" },

View File

@ -90,6 +90,13 @@ function M.migrate()
json.data.extras = vim.tbl_filter(function(extra)
return not (extra == "lazyvim.plugins.extras.editor.trouble-v3")
end, json.data.extras or {})
elseif json.data.version == 6 then
local ai = { "copilot", "codeium", "copilot-chat", "tabnine" }
json.data.extras = vim.tbl_map(function(extra)
return extra:gsub("^lazyvim%.plugins%.extras%.coding%.(.*)$", function(name)
return vim.tbl_contains(ai, name) and ("lazyvim.plugins.extras.ai." .. name) or extra
end)
end, json.data.extras or {})
end
M.save()

View File

@ -53,6 +53,11 @@ local skip_check = assert(vim.uv.new_check())
function M.foldexpr()
local buf = vim.api.nvim_get_current_buf()
-- no highlight, no foldexpr
if not vim.b[buf].ts_highlight then
return "0"
end
-- still in the same tick and no parser
if M.skip_foldexpr[buf] then
return "0"