1
0
Fork 0
mirror of https://github.com/pnx/dotfiles synced 2026-08-23 19:48:13 +02:00

nvim/lua/user/plugins/editor.lua: fix cursorline for status colum

This commit is contained in:
Henrik Hautakoski 2024-12-16 23:41:55 +01:00
parent cdfafa96d6
commit cc7b66feed
3 changed files with 232 additions and 96 deletions

View file

@ -1,41 +1,66 @@
return { local iconset = {
prompt = "", middle_dot = "·",
current = " ", check = "",
selected = "",
close = "󰅖", close = "󰅖",
modified = "",
pinned = "",
edit = "", -- default = "",
buffer = "", -- warn = "",
search = "", -- hack = "",
-- },
-- diagnostics = {
-- error = "",
-- warn = "󰔷",
-- info = "",
-- hint = "",
-- },
--
info_circle_outline = "",
exclamation_circle = "",
exclamation_triangle = "",
chat = "",
pen = "",
magnifying_glass = "",
thumbtack = "",
eye = "",
eye_disabled = "󰛑",
lock = "",
clock = "",
stopwatch = "󰄉",
bug = "",
fire = "",
whitespace = { whitespace = {
tab = "»", newline = "",
space = "·",
eol = "",
nbsp = "",
}, },
fold = {
open = "", star = "",
close = "", ignored = "",
sep = " ", git = {
merge = "",
}, },
tree = {
horizontal = "", -- Arrows
vertical = "", arrow = {
expanded = "", right = "",
node = "",
nodelast = "",
}, },
files = { caret = {
right = "",
down = "",
},
chevron = {
double = {
right = "»"
}
},
file = {
default = "", default = "",
text = "", text = "",
symlink = "", symlink = "",
}, },
file_status = {
modified = "",
readonly = "",
hidden = "󰛑",
},
folder = { folder = {
closed = "", closed = "",
open = "", open = "",
@ -44,89 +69,182 @@ return {
symlink = "", symlink = "",
symlink_open = "", symlink_open = "",
}, },
-- Shapes
circle = "",
circle_dot = "",
circle_dotted = "",
plus = "",
minus = "",
square = "󰝤",
triangle_outline = "󰔷",
box = {
horizontal_line = "",
vertical_line = "",
vertical_line_thick = "",
top_right_corner = "",
middel_left = "",
bottom_left_corner = "",
},
ruler = "󰑭",
cogwheel = "",
package = "",
wrench = "",
hash = "",
text = "",
text_boxed = "",
bracket = "",
bracket_dots = "󰘦",
square_bracket = "",
color = "",
sort_desc = "",
wand = "",
number = "",
hexadecimal = "󱊧",
math = {
["function"] = "󰊕",
pi = "",
plus_minus = "󰆕",
},
code = {
field = "",
variable = "",
interface = "",
method = "",
class = "",
keyword = "",
boolean = "",
Reference = "󰈇",
struct = "󰙅",
event = "",
type_parameter = "",
},
}
return {
prompt = iconset.caret_right,
current = " ",
selected = iconset.check,
close = iconset.close,
modified = iconset.circle,
pinned = iconset.thumbtack,
edit = iconset.pen,
buffer = "",
search = iconset.magnifying_glass,
whitespace = {
tab = "»",
space = iconset.middle_dot,
eol = iconset.whitespace.newline,
nbsp = "",
},
fold = {
open = iconset.caret.down,
close = iconset.caret.right,
sep = " ",
},
tree = {
horizontal = iconset.box.horizontal_line,
vertical = iconset.box.vertical_line,
expanded = iconset.box.top_right_corner,
node = iconset.box.middel_left,
nodelast = iconset.box.bottom_left_corner,
},
files = iconset.file,
file_status = {
modified = iconset.circle,
readonly = iconset.lock,
hidden = iconset.eye_disabled,
},
folder = iconset.folder,
diff = { diff = {
added = "", added = iconset.plus,
modified = "", modified = iconset.square,
removed = "", removed = iconset.minus,
}, },
diff_gutter = { diff_gutter = {
add = "", add = iconset.box.vertical_line_thick,
change = "", change = iconset.box.vertical_line_thick,
delete = "", delete = iconset.caret.right,
untracked = "", untracked = iconset.box.vertical_line_thick,
}, },
gitsigns = { gitsigns = {
-- Change type -- Change type
added = "", added = iconset.circle,
modified = "", modified = iconset.circle,
deleted = "", deleted = iconset.minus,
renamed = "", renamed = iconset.arrow.right,
-- Status type -- Status type
untracked = "", untracked = iconset.star,
ignored = "", ignored = iconset.circle_dotted,
unstaged = "", unstaged = "",
staged = "", staged = iconset.check,
conflict = "", conflict = iconset.git.merge,
}, },
todo = { todo = {
default = "", default = iconset.exclamation_circle,
warn = "", warn = iconset.exclamation_triangle,
perf = "", perf = iconset.clock,
bug = "", bug = iconset.bug,
hack = "", hack = iconset.fire,
test = "󰄉", test = iconset.stopwatch,
}, },
diagnostics = { diagnostics = {
error = "", error = iconset.circle_dot,
warn = "", warn = iconset.triangle_outline,
info = "", info = iconset.info_circle_outline,
hint = "", hint = iconset.chat,
}, },
test = { test = {
ok = "", ok = iconset.check,
failed = "", failed = iconset.close,
running = "", running = "",
skipped = "", skipped = "",
watch = "", watch = "",
unknown = "", unknown = iconset.circle,
}, },
symbols = { symbols = {
Text = "", Text = iconset.text,
Method = "", Method = iconset.code.method,
Function = "󰊕", Function = iconset.math["function"],
Constructor = "", Constructor = iconset.cogwheel,
Field = "", Field = iconset.code.field,
Variable = "", Variable = iconset.code.variable,
Class = "", Class = iconset.code.class,
Interface = "", Interface = iconset.code.interface,
Module = "", Module = iconset.bracket,
Namespace = "", Namespace = iconset.bracket,
Package = "", Package = iconset.package,
Property = "", Property = iconset.wrench,
Unit = "󰑭", Unit = iconset.ruler,
Value = "", Value = iconset.hash,
String = "", String = iconset.text_boxed,
Number = "", Number = iconset.number,
NumberHex = "󱊧", NumberHex = iconset.hexadecimal,
Boolean = "", Boolean = iconset.code.boolean,
Array = "", Array = iconset.square_bracket,
Object = "", Object = iconset.bracket,
Enum = "", Enum = iconset.sort_desc,
Keyword = "", Keyword = iconset.code.keyword,
Snippet = "󰘦", Snippet = iconset.bracket_dots,
Color = "", Color = iconset.color,
File = "󰈙", File = iconset.file.text,
Reference = "󰈇", Reference = iconset.code.reference,
Folder = "󰉋", Folder = iconset.folder.closed,
Key = '', Key = iconset.text,
Null = '', Null = iconset.code.boolean,
EnumMember = "", EnumMember = iconset.sort_desc,
Constant = "", Constant = iconset.math.pi,
Struct = "󰙅", Struct = iconset.code.struct,
Event = "", Event = iconset.code.event,
Operator = "󰆕", Operator = iconset.math.plus_minus,
TypeParameter = "", TypeParameter = iconset.code.type_parameter,
Spell = "", Spell = iconset.wand,
}, },
filetypes = { filetypes = {
php = "󰌟", php = "󰌟",

View file

@ -74,8 +74,7 @@ vim.o.foldcolumn = "auto"
-- See `:help 'list'` -- See `:help 'list'`
-- and `:help 'listchars'` -- and `:help 'listchars'`
vim.o.list = false vim.o.list = false
vim.o.listchars = string.format([[tab: %s,space:%s,eol:%s,nbsp:%s]], vim.o.listchars = [[tab: 󰄾,space:·,eol:␍,nbsp:␣]]
icons.whitespace.tab, icons.whitespace.space, icons.whitespace.eol, icons.whitespace.nbsp)
vim.o.fillchars = string.format([[eob: ,fold: ,foldopen:%s,foldsep:%s,foldclose:%s]], vim.o.fillchars = string.format([[eob: ,fold: ,foldopen:%s,foldsep:%s,foldclose:%s]],
icons.fold.open, icons.fold.sep, icons.fold.close) icons.fold.open, icons.fold.sep, icons.fold.close)

View file

@ -102,6 +102,25 @@ return {
}, },
{ text = { builtin.foldfunc, " " }, click = "v:lua.ScFa" }, { text = { builtin.foldfunc, " " }, click = "v:lua.ScFa" },
{ text = { "" } }, { text = { "" } },
{
text = { " " },
condition = {
function(args)
local pos = vim.api.nvim_win_get_cursor(0)
return args.lnum ~= pos[1]
end
}
},
{
text = { " " },
hl = "CursorLine",
condition = {
function(args)
local pos = vim.api.nvim_win_get_cursor(0)
return args.lnum == pos[1]
end
}
}
} }
} }
end, end,