Compare commits
18
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3e1e219a6b | ||
|
|
8c79ab601a | ||
|
|
87915a1f23 | ||
|
|
439340bd8a | ||
|
|
9ad1c49b67 | ||
|
|
e2c189e066 | ||
|
|
1519cd6da7 | ||
|
|
4b86cf9900 | ||
|
|
99c361f708 | ||
|
|
71ea193cf6 | ||
|
|
3c605f547c | ||
|
|
7ef2dfd3ba | ||
|
|
3f4b1ff003 | ||
|
|
0d71732902 | ||
|
|
2ebba15e12 | ||
|
|
d424a02554 | ||
|
|
5ddad99bac | ||
|
|
b2f750558a |
No files matched your search
@@ -1,3 +1,3 @@
|
||||
{
|
||||
".": "13.7.0"
|
||||
".": "13.8.0"
|
||||
}
|
||||
@@ -1,5 +1,20 @@
|
||||
# Changelog
|
||||
|
||||
## [13.8.0](https://github.com/LazyVim/LazyVim/compare/v13.7.0...v13.8.0) (2024-12-07)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **git:** added toggles for gitsigns.nvim and mini.diff ([2ebba15](https://github.com/LazyVim/LazyVim/commit/2ebba15e1274f5437a418ddacfe9dbf342fd8a18))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **dot:** kitty ft with bash treesitter highlights ([7ef2dfd](https://github.com/LazyVim/LazyVim/commit/7ef2dfd3ba9a3dffaa8c57c1bb5e130b9aa74217))
|
||||
* **keymaps:** toggle name ([b2f7505](https://github.com/LazyVim/LazyVim/commit/b2f750558a3737879f8151e741e7a3988886e37f))
|
||||
* **mini.diff:** toggle ([3f4b1ff](https://github.com/LazyVim/LazyVim/commit/3f4b1ff00364d089e19f4b3c738fd5298243fadb))
|
||||
* **rust:** only use mason.nvim if it is present ([#4963](https://github.com/LazyVim/LazyVim/issues/4963)) ([5ddad99](https://github.com/LazyVim/LazyVim/commit/5ddad99bac203e87e6f78f3ab7567a49b0d1d8a6))
|
||||
|
||||
## [13.7.0](https://github.com/LazyVim/LazyVim/compare/v13.6.0...v13.7.0) (2024-12-05)
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
*LazyVim.txt* For Neovim Last change: 2024 December 05
|
||||
*LazyVim.txt* For Neovim Last change: 2024 December 11
|
||||
|
||||
==============================================================================
|
||||
Table of Contents *LazyVim-table-of-contents*
|
||||
|
||||
@@ -66,7 +66,6 @@ vim.api.nvim_create_autocmd("FileType", {
|
||||
"neotest-summary",
|
||||
"notify",
|
||||
"qf",
|
||||
"snacks_win",
|
||||
"spectre_panel",
|
||||
"startuptime",
|
||||
"tsplayground",
|
||||
|
||||
@@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util")
|
||||
---@class LazyVimConfig: LazyVimOptions
|
||||
local M = {}
|
||||
|
||||
M.version = "13.7.0" -- x-release-please-version
|
||||
M.version = "13.8.0" -- x-release-please-version
|
||||
LazyVim.config = M
|
||||
|
||||
---@class LazyVimOptions
|
||||
|
||||
@@ -127,8 +127,8 @@ Snacks.toggle.option("wrap", {name = "Wrap"}):map("<leader>uw")
|
||||
Snacks.toggle.option("relativenumber", { name = "Relative Number"}):map("<leader>uL")
|
||||
Snacks.toggle.diagnostics():map("<leader>ud")
|
||||
Snacks.toggle.line_number():map("<leader>ul")
|
||||
Snacks.toggle.option("conceallevel", {off = 0, on = vim.o.conceallevel > 0 and vim.o.conceallevel or 2}):map("<leader>uc")
|
||||
Snacks.toggle.option("showtabline", {off = 0, on = vim.o.showtabline > 0 and vim.o.showtabline or 2, desc = "Tabline"}):map("<leader>uA")
|
||||
Snacks.toggle.option("conceallevel", {off = 0, on = vim.o.conceallevel > 0 and vim.o.conceallevel or 2, name = "Conceal Level"}):map("<leader>uc")
|
||||
Snacks.toggle.option("showtabline", {off = 0, on = vim.o.showtabline > 0 and vim.o.showtabline or 2, name = "Tabline"}):map("<leader>uA")
|
||||
Snacks.toggle.treesitter():map("<leader>uT")
|
||||
Snacks.toggle.option("background", { off = "light", on = "dark" , name = "Dark Background"}):map("<leader>ub")
|
||||
if vim.lsp.inlay_hint then
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
-- backwards compatibility with the old treesitter config for adding custom parsers
|
||||
local function patch()
|
||||
local parsers = require("nvim-treesitter.parsers")
|
||||
parsers.get_parser_configs = setmetatable({}, {
|
||||
__call = function()
|
||||
return parsers
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
if vim.tbl_contains(LazyVim.config.json.data.extras, "lazyvim.plugins.extras.ui.treesitter-rewrite") then
|
||||
if vim.fn.executable("tree-sitter") == 0 then
|
||||
LazyVim.error("**treesitter-rewrite** requires the `tree-sitter` executable to be installed")
|
||||
return {}
|
||||
end
|
||||
|
||||
if vim.fn.has("nvim-0.10") == 0 then
|
||||
LazyVim.error("**treesitter-rewrite** requires Neovim >= 0.10")
|
||||
return {}
|
||||
end
|
||||
end
|
||||
|
||||
return {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
version = false, -- last release is way too old and doesn't work on Windows
|
||||
branch = "main",
|
||||
build = ":TSUpdate",
|
||||
lazy = false,
|
||||
cmd = {},
|
||||
opts = function()
|
||||
patch()
|
||||
return {
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
ensure_install = {
|
||||
"bash",
|
||||
"c",
|
||||
"diff",
|
||||
"html",
|
||||
"javascript",
|
||||
"jsdoc",
|
||||
"json",
|
||||
"jsonc",
|
||||
"lua",
|
||||
"luadoc",
|
||||
"luap",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"python",
|
||||
"query",
|
||||
"regex",
|
||||
"toml",
|
||||
"tsx",
|
||||
"typescript",
|
||||
"vim",
|
||||
"vimdoc",
|
||||
"xml",
|
||||
"yaml",
|
||||
},
|
||||
}
|
||||
end,
|
||||
init = function() end,
|
||||
---@param opts TSConfig
|
||||
config = function(_, opts)
|
||||
---@return string[]
|
||||
local function norm(ensure)
|
||||
return ensure == nil and {} or type(ensure) == "string" and { ensure } or ensure
|
||||
end
|
||||
|
||||
-- ensure_installed is deprecated, but still supported
|
||||
opts.ensure_install = LazyVim.dedup(vim.list_extend(norm(opts.ensure_install), norm(opts.ensure_installed)))
|
||||
|
||||
require("nvim-treesitter").setup(opts)
|
||||
patch()
|
||||
|
||||
-- backwards compatibility with the old treesitter config for indent
|
||||
if vim.tbl_get(opts, "indent", "enable") then
|
||||
vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()"
|
||||
end
|
||||
|
||||
-- backwards compatibility with the old treesitter config for highlight
|
||||
if vim.tbl_get(opts, "highlight", "enable") then
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
callback = function()
|
||||
pcall(vim.treesitter.start)
|
||||
end,
|
||||
})
|
||||
end
|
||||
end,
|
||||
},
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
||||
enabled = false,
|
||||
},
|
||||
{
|
||||
"windwp/nvim-ts-autotag",
|
||||
dev = true,
|
||||
enabled = true,
|
||||
},
|
||||
{
|
||||
"RRethy/vim-illuminate",
|
||||
optional = true,
|
||||
enabled = false,
|
||||
},
|
||||
}
|
||||
@@ -300,6 +300,20 @@ return {
|
||||
end,
|
||||
},
|
||||
},
|
||||
{
|
||||
"gitsigns.nvim",
|
||||
opts = function()
|
||||
Snacks.toggle({
|
||||
name = "Git Signs",
|
||||
get = function()
|
||||
return require("gitsigns.config").config.signcolumn
|
||||
end,
|
||||
set = function(state)
|
||||
require("gitsigns").toggle_signs(state)
|
||||
end,
|
||||
}):map("<leader>uG")
|
||||
end,
|
||||
},
|
||||
|
||||
-- better diagnostics list and others
|
||||
{
|
||||
|
||||
@@ -100,9 +100,7 @@ return {
|
||||
dependencies = { "giuxtaposition/blink-cmp-copilot" },
|
||||
opts = {
|
||||
sources = {
|
||||
completion = {
|
||||
enabled_providers = { "copilot" },
|
||||
},
|
||||
default = { "copilot" },
|
||||
providers = {
|
||||
copilot = {
|
||||
name = "copilot",
|
||||
|
||||
@@ -17,6 +17,7 @@ return {
|
||||
opts_extend = {
|
||||
"sources.completion.enabled_providers",
|
||||
"sources.compat",
|
||||
"sources.default",
|
||||
},
|
||||
dependencies = {
|
||||
"rafamadriz/friendly-snippets",
|
||||
@@ -70,10 +71,7 @@ return {
|
||||
-- adding any nvim-cmp sources here will enable them
|
||||
-- with blink.compat
|
||||
compat = {},
|
||||
completion = {
|
||||
-- remember to enable your providers here
|
||||
enabled_providers = { "lsp", "path", "snippets", "buffer" },
|
||||
},
|
||||
default = { "lsp", "path", "snippets", "buffer" },
|
||||
},
|
||||
|
||||
keymap = {
|
||||
@@ -87,7 +85,7 @@ return {
|
||||
---@param opts blink.cmp.Config | { sources: { compat: string[] } }
|
||||
config = function(_, opts)
|
||||
-- setup compat sources
|
||||
local enabled = opts.sources.completion.enabled_providers
|
||||
local enabled = opts.sources.default
|
||||
for _, source in ipairs(opts.sources.compat or {}) do
|
||||
opts.sources.providers[source] = vim.tbl_deep_extend(
|
||||
"force",
|
||||
@@ -99,6 +97,12 @@ return {
|
||||
end
|
||||
end
|
||||
|
||||
-- TODO: remove when blink made a new release > 0.7.6
|
||||
if not vim.g.lazyvim_blink_main then
|
||||
opts.sources.completion = opts.sources.completion or {}
|
||||
opts.sources.completion.enabled_providers = enabled
|
||||
end
|
||||
|
||||
-- check if we need to override symbol kinds
|
||||
for _, provider in pairs(opts.sources.providers or {}) do
|
||||
---@cast provider blink.cmp.SourceProviderConfig|{kind?:string}
|
||||
@@ -136,15 +140,9 @@ return {
|
||||
"saghen/blink.cmp",
|
||||
opts = {
|
||||
sources = {
|
||||
completion = {
|
||||
-- add lazydev to your completion providers
|
||||
enabled_providers = { "lazydev" },
|
||||
},
|
||||
-- add lazydev to your completion providers
|
||||
default = { "lazydev" },
|
||||
providers = {
|
||||
lsp = {
|
||||
-- dont show LuaLS require statements when lazydev has items
|
||||
fallback_for = { "lazydev" },
|
||||
},
|
||||
lazydev = {
|
||||
name = "LazyDev",
|
||||
module = "lazydev.integrations.blink",
|
||||
|
||||
@@ -14,6 +14,7 @@ return {
|
||||
"rafamadriz/friendly-snippets",
|
||||
config = function()
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
require("luasnip.loaders.from_vscode").lazy_load({ paths = { vim.fn.stdpath("config") .. "/snippets" } })
|
||||
end,
|
||||
},
|
||||
},
|
||||
|
||||
@@ -29,6 +29,29 @@ return {
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"mini.diff",
|
||||
opts = function()
|
||||
Snacks.toggle({
|
||||
name = "Mini Diff Signs",
|
||||
get = function()
|
||||
return vim.g.minidiff_disable ~= true
|
||||
end,
|
||||
set = function(state)
|
||||
vim.g.minidiff_disable = not state
|
||||
if state then
|
||||
require("mini.diff").enable(0)
|
||||
else
|
||||
require("mini.diff").disable(0)
|
||||
end
|
||||
-- HACK: redraw to update the signs
|
||||
vim.defer_fn(function()
|
||||
vim.cmd([[redraw!]])
|
||||
end, 200)
|
||||
end,
|
||||
}):map("<leader>uG")
|
||||
end,
|
||||
},
|
||||
|
||||
-- lualine integration
|
||||
{
|
||||
|
||||
@@ -97,16 +97,18 @@ return {
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
local package_path = require("mason-registry").get_package("codelldb"):get_install_path()
|
||||
local codelldb = package_path .. "/extension/adapter/codelldb"
|
||||
local library_path = package_path .. "/extension/lldb/lib/liblldb.dylib"
|
||||
local uname = io.popen("uname"):read("*l")
|
||||
if uname == "Linux" then
|
||||
library_path = package_path .. "/extension/lldb/lib/liblldb.so"
|
||||
if LazyVim.has("mason.nvim") then
|
||||
local package_path = require("mason-registry").get_package("codelldb"):get_install_path()
|
||||
local codelldb = package_path .. "/extension/adapter/codelldb"
|
||||
local library_path = package_path .. "/extension/lldb/lib/liblldb.dylib"
|
||||
local uname = io.popen("uname"):read("*l")
|
||||
if uname == "Linux" then
|
||||
library_path = package_path .. "/extension/lldb/lib/liblldb.so"
|
||||
end
|
||||
opts.dap = {
|
||||
adapter = require("rustaceanvim.config").get_codelldb_adapter(codelldb, library_path),
|
||||
}
|
||||
end
|
||||
opts.dap = {
|
||||
adapter = require("rustaceanvim.config").get_codelldb_adapter(codelldb, library_path),
|
||||
}
|
||||
vim.g.rustaceanvim = vim.tbl_deep_extend("keep", vim.g.rustaceanvim or {}, opts or {})
|
||||
if vim.fn.executable("rust-analyzer") == 0 then
|
||||
LazyVim.error(
|
||||
|
||||
@@ -130,9 +130,7 @@ return {
|
||||
optional = true,
|
||||
opts = {
|
||||
sources = {
|
||||
completion = {
|
||||
enabled_providers = { "dadbod" },
|
||||
},
|
||||
default = { "dadbod" },
|
||||
providers = {
|
||||
dadbod = { name = "Dadbod", module = "vim_dadbod_completion.blink" },
|
||||
},
|
||||
|
||||
@@ -39,11 +39,12 @@ return {
|
||||
pattern = {
|
||||
[".*/waybar/config"] = "jsonc",
|
||||
[".*/mako/config"] = "dosini",
|
||||
[".*/kitty/.+%.conf"] = "bash",
|
||||
[".*/kitty/.+%.conf"] = "kitty",
|
||||
[".*/hypr/.+%.conf"] = "hyprlang",
|
||||
["%.env%.[%w_.-]+"] = "sh",
|
||||
},
|
||||
})
|
||||
vim.treesitter.language.register("bash", "kitty")
|
||||
|
||||
add("git_config")
|
||||
|
||||
|
||||
@@ -33,9 +33,18 @@ end
|
||||
vim.api.nvim_create_autocmd("User", {
|
||||
pattern = "LazyVimKeymapsDefaults",
|
||||
callback = function()
|
||||
-- VSCode-specific keymaps for search and navigation
|
||||
vim.keymap.set("n", "<leader><space>", "<cmd>Find<cr>")
|
||||
vim.keymap.set("n", "<leader>/", [[<cmd>lua require('vscode').action('workbench.action.findInFiles')<cr>]])
|
||||
vim.keymap.set("n", "<leader>ss", [[<cmd>lua require('vscode').action('workbench.action.gotoSymbol')<cr>]])
|
||||
|
||||
-- Keep undo/redo lists in sync with VsCode
|
||||
vim.keymap.set("n", "u", "<Cmd>call VSCodeNotify('undo')<CR>")
|
||||
vim.keymap.set("n", "<C-r>", "<Cmd>call VSCodeNotify('redo')<CR>")
|
||||
|
||||
-- Navigate VSCode tabs like lazyvim buffers
|
||||
vim.keymap.set("n", "<S-h>", "<Cmd>call VSCodeNotify('workbench.action.previousEditor')<CR>")
|
||||
vim.keymap.set("n", "<S-l>", "<Cmd>call VSCodeNotify('workbench.action.nextEditor')<CR>")
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
@@ -100,20 +100,6 @@ function M.add_missing_snippet_docs(window)
|
||||
end
|
||||
end
|
||||
|
||||
function M.visible()
|
||||
---@module 'blink.cmp'
|
||||
local blink = package.loaded["blink.cmp"]
|
||||
if blink then
|
||||
return blink.windows and blink.windows.autocomplete.win:is_open()
|
||||
end
|
||||
---@module 'cmp'
|
||||
local cmp = package.loaded["cmp"]
|
||||
if cmp then
|
||||
return cmp.core.view:visible()
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
-- This is a better implementation of `cmp.confirm`:
|
||||
-- * check if the completion menu is visible without waiting for running sources
|
||||
-- * create an undo point before confirming
|
||||
|
||||
Reference in new issue
Block a user