Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
725469adba | |||
b9dae57961 | |||
24665fc736 | |||
9c9e650530 |
@ -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?
|
||||
|
@ -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>
|
||||
|
@ -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>"),
|
||||
|
@ -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" },
|
||||
|
@ -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()
|
||||
|
@ -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"
|
||||
|
Reference in New Issue
Block a user