dev: automated commit - 2025-12-23 14:01:36
This commit is contained in:
parent
5c82cd5345
commit
cc797ee5f1
6 changed files with 74 additions and 226 deletions
|
|
@ -23,14 +23,14 @@
|
|||
"nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" },
|
||||
"nvim-dbee": { "branch": "master", "commit": "dda517694889a5d238d7aa407403984da9f80cc0" },
|
||||
"nvim-lastplace": { "branch": "main", "commit": "0bb6103c506315044872e0f84b1f736c4172bb20" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "361dd9d5f3f8ae3d8c721f4f2c21847050538b1f" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "8973916a3d015d65a8c4614e141f4270a713cf33" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||
"nvim-ts-context-commentstring": { "branch": "main", "commit": "1b212c2eee76d787bbea6aa5e92a2b534e7b4f8f" },
|
||||
"nvim-ufo": { "branch": "main", "commit": "72d54c31079d38d8dfc5456131b1d0fb5c0264b0" },
|
||||
"oil.nvim": { "branch": "master", "commit": "756dec855b4811f2d27f067a3aca477f368d99f5" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||
"promise-async": { "branch": "main", "commit": "119e8961014c9bfaf1487bf3c2a393d254f337e2" },
|
||||
"quicker.nvim": { "branch": "master", "commit": "ad367a8f27aff3361db43ea2f41cd505ab573617" },
|
||||
"quicker.nvim": { "branch": "master", "commit": "771437c3e3672dba9233156e1c2e2fc1888a5fff" },
|
||||
"schemastore.nvim": { "branch": "main", "commit": "8b92ea89835b8e5dbc779a675ebb0e5fcb9a1993" },
|
||||
"snacks.nvim": { "branch": "main", "commit": "fe7cfe9800a182274d0f868a74b7263b8c0c020b" },
|
||||
"suda.vim": { "branch": "master", "commit": "c492741b4679b3cdd4d9e34138209784e061d916" },
|
||||
|
|
|
|||
|
|
@ -1,159 +0,0 @@
|
|||
_G.icons = {
|
||||
kind = {
|
||||
Array = " ",
|
||||
Boolean = " ",
|
||||
Class = " ",
|
||||
Color = " ",
|
||||
Constant = " ",
|
||||
Constructor = " ",
|
||||
Enum = " ",
|
||||
EnumMember = " ",
|
||||
Event = " ",
|
||||
Field = " ",
|
||||
File = " ",
|
||||
Folder = " ",
|
||||
Function = " ",
|
||||
Interface = " ",
|
||||
Key = " ",
|
||||
Keyword = " ",
|
||||
Method = " ",
|
||||
-- Module = " ",
|
||||
Module = " ",
|
||||
Namespace = " ",
|
||||
Null = " ",
|
||||
Number = " ",
|
||||
Object = " ",
|
||||
Operator = " ",
|
||||
Package = " ",
|
||||
Property = " ",
|
||||
Reference = " ",
|
||||
Snippet = " ",
|
||||
String = " ",
|
||||
Struct = " ",
|
||||
Text = " ",
|
||||
TypeParameter = " ",
|
||||
Unit = " ",
|
||||
Value = " ",
|
||||
Variable = " ",
|
||||
},
|
||||
git = {
|
||||
LineAdded = " ",
|
||||
LineModified = " ",
|
||||
LineRemoved = " ",
|
||||
FileDeleted = " ",
|
||||
FileIgnored = "◌",
|
||||
FileRenamed = " ",
|
||||
FileStaged = "S",
|
||||
FileUnmerged = "",
|
||||
FileUnstaged = "",
|
||||
FileUntracked = "U",
|
||||
Diff = " ",
|
||||
Repo = " ",
|
||||
Octoface = " ",
|
||||
Copilot = " ",
|
||||
Branch = "",
|
||||
},
|
||||
ui = {
|
||||
Message = " ",
|
||||
ArrowCircleDown = "",
|
||||
ArrowCircleLeft = "",
|
||||
ArrowCircleRight = "",
|
||||
ArrowCircleUp = "",
|
||||
BoldArrowDown = "",
|
||||
BoldArrowLeft = "",
|
||||
BoldArrowRight = "",
|
||||
BoldArrowUp = "",
|
||||
BoldClose = "",
|
||||
BoldDividerLeft = "",
|
||||
BoldDividerRight = "",
|
||||
BoldLineLeft = "▎",
|
||||
BoldLineMiddle = "┃",
|
||||
BoldLineDashedMiddle = "┋",
|
||||
BookMark = "",
|
||||
BoxChecked = " ",
|
||||
Bug = " ",
|
||||
Stacks = "",
|
||||
Scopes = "",
|
||||
Watches = "",
|
||||
DebugConsole = " ",
|
||||
Calendar = " ",
|
||||
Check = "",
|
||||
ChevronRight = "",
|
||||
ChevronShortDown = "",
|
||||
ChevronShortLeft = "",
|
||||
ChevronShortRight = "",
|
||||
ChevronShortUp = "",
|
||||
Circle = " ",
|
||||
Close = "",
|
||||
CloudDownload = " ",
|
||||
Code = "",
|
||||
Comment = "",
|
||||
Dashboard = "",
|
||||
DividerLeft = "",
|
||||
DividerRight = "",
|
||||
DoubleChevronRight = "»",
|
||||
Ellipsis = "",
|
||||
EmptyFolder = " ",
|
||||
EmptyFolderOpen = " ",
|
||||
File = " ",
|
||||
FileSymlink = "",
|
||||
Files = " ",
|
||||
FindFile = "",
|
||||
FindText = "",
|
||||
Fire = "",
|
||||
Folder = " ",
|
||||
FolderOpen = " ",
|
||||
FolderSymlink = " ",
|
||||
Forward = " ",
|
||||
Gear = " ",
|
||||
History = " ",
|
||||
Lightbulb = " ",
|
||||
LineLeft = "▏",
|
||||
LineMiddle = "│",
|
||||
List = " ",
|
||||
Lock = " ",
|
||||
NewFile = " ",
|
||||
Note = " ",
|
||||
Package = " ",
|
||||
Pencil = " ",
|
||||
Plus = " ",
|
||||
Project = " ",
|
||||
Search = " ",
|
||||
SignIn = " ",
|
||||
SignOut = " ",
|
||||
Tab = " ",
|
||||
Table = " ",
|
||||
Target = " ",
|
||||
Telescope = "🔭",
|
||||
Text = " ",
|
||||
Tree = "",
|
||||
Triangle = "",
|
||||
TriangleShortArrowDown = "",
|
||||
TriangleShortArrowLeft = "",
|
||||
TriangleShortArrowRight = "",
|
||||
TriangleShortArrowUp = "",
|
||||
},
|
||||
diagnostics = {
|
||||
BoldError = "",
|
||||
Error = "",
|
||||
BoldWarning = "",
|
||||
Warning = "",
|
||||
BoldInformation = "",
|
||||
Information = "",
|
||||
BoldQuestion = "",
|
||||
Question = "",
|
||||
BoldHint = "",
|
||||
Hint = "",
|
||||
Debug = "",
|
||||
Trace = "✎",
|
||||
},
|
||||
misc = {
|
||||
Robot = " ",
|
||||
Squirrel = " ",
|
||||
Tag = " ",
|
||||
Watch = "",
|
||||
Smiley = " ",
|
||||
Package = " ",
|
||||
CircuitBoard = " ",
|
||||
},
|
||||
}
|
||||
|
|
@ -1,2 +1,27 @@
|
|||
require("globals.map")
|
||||
require("globals.icons")
|
||||
_G.map = function(mode, keys, func, opts)
|
||||
opts = opts or {}
|
||||
opts.desc = opts.desc or nil
|
||||
vim.keymap.set(mode, keys, func, opts)
|
||||
end
|
||||
|
||||
_G.nmap = function(keys, func, opts)
|
||||
_G.map("n", keys, func, opts)
|
||||
end
|
||||
|
||||
_G.imap = function(keys, func, opts)
|
||||
_G.map("i", keys, func, opts)
|
||||
end
|
||||
|
||||
_G.vmap = function(keys, func, opts)
|
||||
_G.map("v", keys, func, opts)
|
||||
end
|
||||
|
||||
_G.dd = function(...)
|
||||
Snacks.debug.inspect(...)
|
||||
end
|
||||
|
||||
_G.bt = function()
|
||||
Snacks.debug.backtrace()
|
||||
end
|
||||
|
||||
vim.print = _G.dd
|
||||
|
|
|
|||
|
|
@ -1,27 +0,0 @@
|
|||
_G.map = function(mode, keys, func, opts)
|
||||
opts = opts or {}
|
||||
opts.desc = opts.desc or nil
|
||||
vim.keymap.set(mode, keys, func, opts)
|
||||
end
|
||||
|
||||
_G.nmap = function(keys, func, opts)
|
||||
_G.map("n", keys, func, opts)
|
||||
end
|
||||
|
||||
_G.imap = function(keys, func, opts)
|
||||
_G.map("i", keys, func, opts)
|
||||
end
|
||||
|
||||
_G.vmap = function(keys, func, opts)
|
||||
_G.map("v", keys, func, opts)
|
||||
end
|
||||
|
||||
_G.dd = function(...)
|
||||
Snacks.debug.inspect(...)
|
||||
end
|
||||
|
||||
_G.bt = function()
|
||||
Snacks.debug.backtrace()
|
||||
end
|
||||
|
||||
vim.print = _G.dd
|
||||
|
|
@ -4,17 +4,30 @@ local M = {
|
|||
dependencies = { "neovim/nvim-lspconfig" },
|
||||
}
|
||||
|
||||
local icons = {
|
||||
Error = "",
|
||||
Warning = "",
|
||||
Information = "",
|
||||
Hint = "",
|
||||
Note = " ",
|
||||
}
|
||||
|
||||
-- Map severity to icon
|
||||
local function get_icon(severity)
|
||||
local severity_name = vim.diagnostic.severity[severity]
|
||||
return icons[severity_name] or ""
|
||||
end
|
||||
|
||||
M.init = function()
|
||||
for severity, icon in pairs({
|
||||
[vim.diagnostic.severity.ERROR] = icons.diagnostics.Error,
|
||||
[vim.diagnostic.severity.WARN] = icons.diagnostics.Warning,
|
||||
[vim.diagnostic.severity.INFO] = icons.diagnostics.Information,
|
||||
[vim.diagnostic.severity.HINT] = icons.diagnostics.Hint,
|
||||
}) do
|
||||
local name = "DiagnosticSign" .. vim.diagnostic.severity[severity]
|
||||
vim.fn.sign_define(name, { text = icon, texthl = name })
|
||||
-- Define diagnostic signs
|
||||
local severity_names = { "ERROR", "WARN", "INFO", "HINT" }
|
||||
for _, name in ipairs(severity_names) do
|
||||
local severity = vim.diagnostic.severity[name]
|
||||
local sign_name = "DiagnosticSign" .. name
|
||||
vim.fn.sign_define(sign_name, { text = get_icon(severity), texthl = sign_name })
|
||||
end
|
||||
|
||||
-- Highlight diagnostic signs
|
||||
vim.cmd([[
|
||||
highlight DiagnosticSignError guifg=#f7768e gui=bold
|
||||
highlight DiagnosticSignWarn guifg=#e0af68 gui=bold
|
||||
|
|
@ -24,26 +37,25 @@ M.init = function()
|
|||
end
|
||||
|
||||
-- Cycle through quickfix items
|
||||
local function cycle_qf(cmd)
|
||||
local function cycle_qf(direction)
|
||||
local qf = vim.fn.getqflist({ size = 0, idx = 0 })
|
||||
if qf.size == 0 then
|
||||
return
|
||||
end
|
||||
if cmd == "next" then
|
||||
|
||||
if direction == "next" then
|
||||
vim.cmd(qf.idx == qf.size and "cfirst" or "cnext")
|
||||
elseif cmd == "prev" then
|
||||
else
|
||||
vim.cmd(qf.idx == 1 and "clast" or "cprev")
|
||||
end
|
||||
end
|
||||
|
||||
function M.config()
|
||||
-- Diagnostic configuration using _G.icons.diagnostics
|
||||
-- local icons = _G.icons.diagnostics
|
||||
vim.diagnostic.config({
|
||||
virtual_text = {
|
||||
prefix = "●",
|
||||
format = function(d)
|
||||
return string.format("%s %s", icons[vim.diagnostic.severity[d.severity]], d.message)
|
||||
return string.format("%s %s", get_icon(d.severity), d.message)
|
||||
end,
|
||||
},
|
||||
underline = true,
|
||||
|
|
@ -51,10 +63,10 @@ function M.config()
|
|||
signs = {
|
||||
active = true,
|
||||
text = {
|
||||
[vim.diagnostic.severity.ERROR] = icons.diagnostics.Error,
|
||||
[vim.diagnostic.severity.WARN] = icons.diagnostics.Warning,
|
||||
[vim.diagnostic.severity.INFO] = icons.diagnostics.Information,
|
||||
[vim.diagnostic.severity.HINT] = icons.diagnostics.Hint,
|
||||
[vim.diagnostic.severity.ERROR] = icons.Error,
|
||||
[vim.diagnostic.severity.WARN] = icons.Warning,
|
||||
[vim.diagnostic.severity.INFO] = icons.Information,
|
||||
[vim.diagnostic.severity.HINT] = icons.Hint,
|
||||
},
|
||||
},
|
||||
float = {
|
||||
|
|
@ -63,12 +75,8 @@ function M.config()
|
|||
border = "rounded",
|
||||
source = true,
|
||||
format = function(d)
|
||||
return string.format(
|
||||
"%s %s: %s",
|
||||
icons[vim.diagnostic.severity[d.severity]],
|
||||
vim.diagnostic.severity[d.severity]:lower(),
|
||||
d.message
|
||||
)
|
||||
local severity_name = vim.diagnostic.severity[d.severity]
|
||||
return string.format("%s %s: %s", get_icon(d.severity), severity_name:lower(), d.message)
|
||||
end,
|
||||
},
|
||||
severity_sort = true,
|
||||
|
|
@ -93,19 +101,20 @@ function M.config()
|
|||
},
|
||||
},
|
||||
type_icons = {
|
||||
E = icons.diagnostics.Error .. " ",
|
||||
W = icons.diagnostics.Warning .. " ",
|
||||
I = icons.diagnostics.Information .. " ",
|
||||
N = icons.ui.Note .. " ",
|
||||
H = icons.diagnostics.Hint .. " ",
|
||||
E = icons.Error .. " ",
|
||||
W = icons.Warning .. " ",
|
||||
I = icons.Information .. " ",
|
||||
N = icons.Note,
|
||||
H = icons.Hint .. " ",
|
||||
},
|
||||
})
|
||||
|
||||
-- Quickfix navigation mappings
|
||||
vim.keymap.set("n", "<a-j>", function()
|
||||
nmap("<a-j>", function()
|
||||
cycle_qf("next")
|
||||
end, { desc = "Next quickfix item (cycles)" })
|
||||
vim.keymap.set("n", "<a-k>", function()
|
||||
|
||||
nmap("<a-k>", function()
|
||||
cycle_qf("prev")
|
||||
end, { desc = "Previous quickfix item (cycles)" })
|
||||
end
|
||||
|
|
|
|||
|
|
@ -68,11 +68,11 @@ local M = {
|
|||
current_line_blame_formatter = "<author>, <author_time:%Y-%m-%d> - <summary>",
|
||||
current_line_blame = true,
|
||||
signs = {
|
||||
add = { text = icons.ui.BoldLineMiddle },
|
||||
change = { text = icons.ui.BoldLineDashedMiddle },
|
||||
delete = { text = icons.ui.TriangleShortArrowRight },
|
||||
topdelete = { text = icons.ui.TriangleShortArrowRight },
|
||||
changedelete = { text = icons.ui.BoldLineMiddle },
|
||||
add = { text = "┃" },
|
||||
change = { text = "┋" },
|
||||
delete = { text = "" },
|
||||
topdelete = { text = "" },
|
||||
changedelete = { text = "┃" },
|
||||
},
|
||||
})
|
||||
end,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue