Compare commits
17
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8b037630e2 | ||
|
|
bb36f71b77 | ||
|
|
9e3af1070f | ||
|
|
32eacde793 | ||
|
|
97480dc5d2 | ||
|
|
50b7f426f2 | ||
|
|
5646ee5191 | ||
|
|
aaa10e717d | ||
|
|
64f86147f9 | ||
|
|
349ae03f09 | ||
|
|
f308867570 | ||
|
|
0af1fd82d7 | ||
|
|
914f26d04e | ||
|
|
3def2097ad | ||
|
|
80a8b18be6 | ||
|
|
754467525b | ||
|
|
3166236ff8 |
No files matched your search
@@ -1,5 +1,43 @@
|
||||
# Changelog
|
||||
|
||||
## [10.22.0](https://github.com/LazyVim/LazyVim/compare/v10.21.1...v10.22.0) (2024-04-11)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **dot:** add bashls and shellcheck ([#2879](https://github.com/LazyVim/LazyVim/issues/2879)) ([97480dc](https://github.com/LazyVim/LazyVim/commit/97480dc5d2dbb717b45a351e0b04835f138a9094))
|
||||
* **git:** `<leader>gb` for Git Blame Line ([9e3af10](https://github.com/LazyVim/LazyVim/commit/9e3af1070fc1932da322105708ebb32a2cd9572b))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **harpoon:** optimizes harpoon keys ([#2877](https://github.com/LazyVim/LazyVim/issues/2877)) ([50b7f42](https://github.com/LazyVim/LazyVim/commit/50b7f426f287ecfc542dd9c197e430b0aca8af04))
|
||||
* **mini.pairs:** better default for ```` ([32eacde](https://github.com/LazyVim/LazyVim/commit/32eacde793fddcca0bcfbbd494b6aa8b2c870d0f))
|
||||
|
||||
## [10.21.1](https://github.com/LazyVim/LazyVim/compare/v10.21.0...v10.21.1) (2024-03-29)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **lsp:** better support for diagnostics icons on Neovim nightly/stable ([aaa10e7](https://github.com/LazyVim/LazyVim/commit/aaa10e717dbe76c5b6b0ab302698f1d151863dc6))
|
||||
* **lsp:** dont define diagnostics signs on >= 0.10.0 ([64f8614](https://github.com/LazyVim/LazyVim/commit/64f86147f9f4c67548185798f755c80e03c2098a))
|
||||
* merge conflict ([349ae03](https://github.com/LazyVim/LazyVim/commit/349ae03f0997d20aa6b4a23315e62dfeab77d559))
|
||||
* **native_snippets:** don't try to enable native snippets on Neovim < 0.10.0 and show warning ([f308867](https://github.com/LazyVim/LazyVim/commit/f3088675703986b6d37061ebcf0a417c132fd45f))
|
||||
|
||||
## [10.21.0](https://github.com/LazyVim/LazyVim/compare/v10.20.1...v10.21.0) (2024-03-29)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **trouble:** added `<leader>cS` to open a trouble list of all references / definitions / ... of the item under the cursor ([7544675](https://github.com/LazyVim/LazyVim/commit/754467525b420c85150f13b2cd9e280570c7556c))
|
||||
* **trouble:** enabled edgy ([80a8b18](https://github.com/LazyVim/LazyVim/commit/80a8b18be6577dcea35748eb563ebef7cf1b3c15))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **mini.move:** default mini.move setup already maps the correct keys ([3166236](https://github.com/LazyVim/LazyVim/commit/3166236ff88a13e7e5b7579ae780b682f2356d62))
|
||||
* **tex:** don't override conceallevel for tex. Not sure why that was added ([914f26d](https://github.com/LazyVim/LazyVim/commit/914f26d04e6b9a61f7d4fc80ad433d75dac3f14b))
|
||||
|
||||
## [10.20.1](https://github.com/LazyVim/LazyVim/compare/v10.20.0...v10.20.1) (2024-03-28)
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
*LazyVim.txt* For Neovim >= 0.9.0 Last change: 2024 March 28
|
||||
*LazyVim.txt* For Neovim >= 0.9.0 Last change: 2024 April 11
|
||||
|
||||
==============================================================================
|
||||
Table of Contents *LazyVim-table-of-contents*
|
||||
|
||||
@@ -3,7 +3,8 @@ _G.LazyVim = require("lazyvim.util")
|
||||
---@class LazyVimConfig: LazyVimOptions
|
||||
local M = {}
|
||||
|
||||
M.version = "10.20.1" -- x-release-please-version
|
||||
M.version = "10.22.0" -- x-release-please-version
|
||||
LazyVim.config = M
|
||||
|
||||
---@class LazyVimOptions
|
||||
local defaults = {
|
||||
|
||||
@@ -127,6 +127,7 @@ map("n", "<leader>ub", function() LazyVim.toggle("background", false, {"light",
|
||||
-- lazygit
|
||||
map("n", "<leader>gg", function() LazyVim.lazygit( { cwd = LazyVim.root.git() }) end, { desc = "Lazygit (Root Dir)" })
|
||||
map("n", "<leader>gG", function() LazyVim.lazygit() end, { desc = "Lazygit (cwd)" })
|
||||
map("n", "<leader>gb", LazyVim.lazygit.blame_line, { desc = "Git Blame Line" })
|
||||
|
||||
map("n", "<leader>gf", function()
|
||||
local git_path = vim.api.nvim_buf_get_name(0)
|
||||
|
||||
@@ -141,7 +141,11 @@ return {
|
||||
{
|
||||
"echasnovski/mini.pairs",
|
||||
event = "VeryLazy",
|
||||
opts = {},
|
||||
opts = {
|
||||
mappings = {
|
||||
["`"] = { action = "closeopen", pair = "``", neigh_pattern = "[^\\`].", register = { cr = false } },
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<leader>up",
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
if not vim.snippet then
|
||||
LazyVim.warn("Native snippets are only supported on Neovim >= 0.10.0")
|
||||
return {}
|
||||
end
|
||||
|
||||
return {
|
||||
desc = "Use native snippets instead of LuaSnip. Only works on Neovim >= 0.10!",
|
||||
{
|
||||
|
||||
@@ -6,56 +6,34 @@ return {
|
||||
width = vim.api.nvim_win_get_width(0) - 4,
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<leader>H",
|
||||
function()
|
||||
require("harpoon"):list():append()
|
||||
end,
|
||||
desc = "Harpoon File",
|
||||
},
|
||||
{
|
||||
"<leader>h",
|
||||
function()
|
||||
local harpoon = require("harpoon")
|
||||
harpoon.ui:toggle_quick_menu(harpoon:list())
|
||||
end,
|
||||
desc = "Harpoon Quick Menu",
|
||||
},
|
||||
{
|
||||
"<leader>1",
|
||||
function()
|
||||
require("harpoon"):list():select(1)
|
||||
end,
|
||||
desc = "Harpoon to File 1",
|
||||
},
|
||||
{
|
||||
"<leader>2",
|
||||
function()
|
||||
require("harpoon"):list():select(2)
|
||||
end,
|
||||
desc = "Harpoon to File 2",
|
||||
},
|
||||
{
|
||||
"<leader>3",
|
||||
function()
|
||||
require("harpoon"):list():select(3)
|
||||
end,
|
||||
desc = "Harpoon to File 3",
|
||||
},
|
||||
{
|
||||
"<leader>4",
|
||||
function()
|
||||
require("harpoon"):list():select(4)
|
||||
end,
|
||||
desc = "Harpoon to File 4",
|
||||
},
|
||||
{
|
||||
"<leader>5",
|
||||
function()
|
||||
require("harpoon"):list():select(5)
|
||||
end,
|
||||
desc = "Harpoon to File 5",
|
||||
},
|
||||
},
|
||||
keys = function()
|
||||
local keys = {
|
||||
{
|
||||
"<leader>H",
|
||||
function()
|
||||
require("harpoon"):list():append()
|
||||
end,
|
||||
desc = "Harpoon File",
|
||||
},
|
||||
{
|
||||
"<leader>h",
|
||||
function()
|
||||
local harpoon = require("harpoon")
|
||||
harpoon.ui:toggle_quick_menu(harpoon:list())
|
||||
end,
|
||||
desc = "Harpoon Quick Menu",
|
||||
}
|
||||
}
|
||||
|
||||
for i = 1, 5 do
|
||||
table.insert(keys, {
|
||||
"<leader>" .. i,
|
||||
function()
|
||||
require("harpoon"):list():select(i)
|
||||
end,
|
||||
desc = "Harpoon to File " .. i,
|
||||
})
|
||||
end
|
||||
return keys
|
||||
end
|
||||
}
|
||||
@@ -3,30 +3,5 @@ return {
|
||||
"echasnovski/mini.move",
|
||||
event = "VeryLazy",
|
||||
opts = {},
|
||||
keys = function()
|
||||
local ret = {}
|
||||
local directions = { "left", "down", "up", "right" }
|
||||
local keys = { "h", "j", "k", "l" }
|
||||
local move = require("mini.move")
|
||||
for i, dir in ipairs(directions) do
|
||||
ret[#ret + 1] = {
|
||||
"<A-" .. keys[i] .. ">",
|
||||
mode = { "i", "n" },
|
||||
function()
|
||||
move.move_line(dir)
|
||||
end,
|
||||
}
|
||||
end
|
||||
for i, dir in ipairs(directions) do
|
||||
ret[#ret + 1] = {
|
||||
"<A-" .. keys[i] .. ">",
|
||||
mode = { "v" },
|
||||
function()
|
||||
move.move_selection(dir)
|
||||
end,
|
||||
}
|
||||
end
|
||||
return ret
|
||||
end,
|
||||
},
|
||||
}
|
||||
@@ -20,6 +20,11 @@ return {
|
||||
{ "<leader>xx", "<cmd>Trouble diagnostics toggle<cr>", desc = "Diagnostics (Trouble)" },
|
||||
{ "<leader>xX", "<cmd>Trouble diagnostics toggle filter.buf=0<cr>", desc = "Buffer Diagnostics (Trouble)" },
|
||||
{ "<leader>cs", "<cmd>Trouble symbols toggle focus=false<cr>", desc = "Symbols (Trouble)" },
|
||||
{
|
||||
"<leader>cS",
|
||||
"<cmd>Trouble lsp toggle focus=false win.position=right<cr>",
|
||||
desc = "LSP references/definitions/... (Trouble)",
|
||||
},
|
||||
{ "<leader>xL", "<cmd>Trouble loclist toggle<cr>", desc = "Location List (Trouble)" },
|
||||
{ "<leader>xQ", "<cmd>Trouble qflist toggle<cr>", desc = "Quickfix List (Trouble)" },
|
||||
},
|
||||
@@ -54,10 +59,6 @@ return {
|
||||
"folke/edgy.nvim",
|
||||
optional = true,
|
||||
opts = function(_, opts)
|
||||
-- disable for now
|
||||
do
|
||||
return
|
||||
end
|
||||
for _, pos in ipairs({ "top", "bottom", "left", "right" }) do
|
||||
opts[pos] = opts[pos] or {}
|
||||
table.insert(opts[pos], {
|
||||
|
||||
@@ -28,14 +28,6 @@ return {
|
||||
"lervag/vimtex",
|
||||
lazy = false, -- lazy-loading will disable inverse search
|
||||
config = function()
|
||||
vim.api.nvim_create_autocmd({ "FileType" }, {
|
||||
group = vim.api.nvim_create_augroup("lazyvim_vimtex_conceal", { clear = true }),
|
||||
pattern = { "bib", "tex" },
|
||||
callback = function()
|
||||
vim.wo.conceallevel = 2
|
||||
end,
|
||||
})
|
||||
|
||||
vim.g.vimtex_mappings_disable = { ["n"] = { "K" } } -- disable `K` as it conflicts with LSP hover
|
||||
vim.g.vimtex_quickfix_method = vim.fn.executable("pplatex") == 1 and "pplatex" or "latexlog"
|
||||
end,
|
||||
|
||||
@@ -7,6 +7,23 @@ local function have(path)
|
||||
end
|
||||
|
||||
return {
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
opts = {
|
||||
servers = {
|
||||
bashls = {},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
opts = function(_, opts)
|
||||
vim.list_extend(opts.ensure_installed or {}, {
|
||||
"shfmt",
|
||||
"shellcheck",
|
||||
})
|
||||
end,
|
||||
},
|
||||
-- add some stuff to treesitter
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
|
||||
@@ -12,6 +12,7 @@ return {
|
||||
---@class PluginLspOpts
|
||||
opts = {
|
||||
-- options for vim.diagnostic.config()
|
||||
---@type vim.diagnostic.Opts
|
||||
diagnostics = {
|
||||
underline = true,
|
||||
update_in_insert = false,
|
||||
@@ -26,10 +27,10 @@ return {
|
||||
severity_sort = true,
|
||||
signs = {
|
||||
text = {
|
||||
[vim.diagnostic.severity.ERROR] = require("lazyvim.config").icons.diagnostics.Error,
|
||||
[vim.diagnostic.severity.WARN] = require("lazyvim.config").icons.diagnostics.Warn,
|
||||
[vim.diagnostic.severity.HINT] = require("lazyvim.config").icons.diagnostics.Hint,
|
||||
[vim.diagnostic.severity.INFO] = require("lazyvim.config").icons.diagnostics.Info,
|
||||
[vim.diagnostic.severity.ERROR] = LazyVim.config.icons.diagnostics.Error,
|
||||
[vim.diagnostic.severity.WARN] = LazyVim.config.icons.diagnostics.Warn,
|
||||
[vim.diagnostic.severity.HINT] = LazyVim.config.icons.diagnostics.Hint,
|
||||
[vim.diagnostic.severity.INFO] = LazyVim.config.icons.diagnostics.Info,
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -101,12 +102,6 @@ return {
|
||||
-- setup autoformat
|
||||
LazyVim.format.register(LazyVim.lsp.formatter())
|
||||
|
||||
-- deprecated options
|
||||
if opts.autoformat ~= nil then
|
||||
vim.g.autoformat = opts.autoformat
|
||||
LazyVim.deprecate("nvim-lspconfig.opts.autoformat", "vim.g.autoformat")
|
||||
end
|
||||
|
||||
-- setup keymaps
|
||||
LazyVim.lsp.on_attach(function(client, buffer)
|
||||
require("lazyvim.plugins.lsp.keymaps").on_attach(client, buffer)
|
||||
@@ -115,19 +110,21 @@ return {
|
||||
local register_capability = vim.lsp.handlers["client/registerCapability"]
|
||||
|
||||
vim.lsp.handlers["client/registerCapability"] = function(err, res, ctx)
|
||||
---@diagnostic disable-next-line: no-unknown
|
||||
local ret = register_capability(err, res, ctx)
|
||||
local client_id = ctx.client_id
|
||||
---@type lsp.Client
|
||||
local client = vim.lsp.get_client_by_id(client_id)
|
||||
local client = vim.lsp.get_client_by_id(ctx.client_id)
|
||||
local buffer = vim.api.nvim_get_current_buf()
|
||||
require("lazyvim.plugins.lsp.keymaps").on_attach(client, buffer)
|
||||
return ret
|
||||
end
|
||||
|
||||
-- diagnostics
|
||||
for name, icon in pairs(require("lazyvim.config").icons.diagnostics) do
|
||||
name = "DiagnosticSign" .. name
|
||||
vim.fn.sign_define(name, { text = icon, texthl = name, numhl = "" })
|
||||
-- diagnostics signs
|
||||
if vim.fn.has("nvim-0.10.0") == 0 then
|
||||
for severity, icon in pairs(opts.diagnostics.signs.text) do
|
||||
local name = vim.diagnostic.severity[severity]:lower():gsub("^%l", string.upper)
|
||||
name = "DiagnosticSign" .. name
|
||||
vim.fn.sign_define(name, { text = icon, texthl = name, numhl = "" })
|
||||
end
|
||||
end
|
||||
|
||||
-- inlay hints
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
local LazyUtil = require("lazy.core.util")
|
||||
|
||||
---@class lazyvim.util: LazyUtilCore
|
||||
---@field config LazyVimConfig
|
||||
---@field ui lazyvim.util.ui
|
||||
---@field lsp lazyvim.util.lsp
|
||||
---@field root lazyvim.util.root
|
||||
|
||||
@@ -140,4 +140,22 @@ gui:
|
||||
M.dirty = false
|
||||
end
|
||||
|
||||
---@param opts? {count?: number}|LazyCmdOptions
|
||||
function M.blame_line(opts)
|
||||
opts = vim.tbl_deep_extend("force", {
|
||||
count = 3,
|
||||
filetype = "git",
|
||||
size = {
|
||||
width = 0.6,
|
||||
height = 0.6,
|
||||
},
|
||||
border = "rounded",
|
||||
}, opts or {})
|
||||
local cursor = vim.api.nvim_win_get_cursor(0)
|
||||
local line = cursor[1] - 1
|
||||
local file = vim.api.nvim_buf_get_name(0)
|
||||
local cmd = { "git", "log", "-n", opts.count, "-u", "-L", line .. ",+1:" .. file }
|
||||
return require("lazy.util").float_cmd(cmd, opts)
|
||||
end
|
||||
|
||||
return M
|
||||
Reference in new issue
Block a user