mirror of
https://github.com/pnx/dotfiles
synced 2026-06-16 19:30:01 +02:00
nvim/lua/user/plugins/editor.lua: fix cursorline for status colum
This commit is contained in:
parent
cdfafa96d6
commit
cc7b66feed
3 changed files with 232 additions and 96 deletions
|
|
@ -1,41 +1,66 @@
|
|||
return {
|
||||
prompt = "",
|
||||
current = " ",
|
||||
selected = "",
|
||||
local iconset = {
|
||||
middle_dot = "·",
|
||||
check = "",
|
||||
close = "",
|
||||
modified = "",
|
||||
pinned = "",
|
||||
edit = "",
|
||||
buffer = "",
|
||||
search = "",
|
||||
|
||||
|
||||
-- default = "",
|
||||
-- warn = "",
|
||||
-- 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 = {
|
||||
tab = "»",
|
||||
space = "·",
|
||||
eol = "",
|
||||
nbsp = "␣",
|
||||
newline = "",
|
||||
},
|
||||
fold = {
|
||||
open = "",
|
||||
close = "",
|
||||
sep = " ",
|
||||
|
||||
star = "★",
|
||||
ignored = "◌",
|
||||
git = {
|
||||
merge = "",
|
||||
},
|
||||
tree = {
|
||||
horizontal = "─",
|
||||
vertical = "│",
|
||||
expanded = "┐",
|
||||
node = "├",
|
||||
nodelast = "└",
|
||||
|
||||
-- Arrows
|
||||
arrow = {
|
||||
right = "➜",
|
||||
},
|
||||
files = {
|
||||
caret = {
|
||||
right = "",
|
||||
down = "",
|
||||
},
|
||||
chevron = {
|
||||
double = {
|
||||
right = "»"
|
||||
}
|
||||
},
|
||||
|
||||
file = {
|
||||
default = "",
|
||||
text = "",
|
||||
symlink = "",
|
||||
},
|
||||
file_status = {
|
||||
modified = "",
|
||||
readonly = "",
|
||||
hidden = "",
|
||||
},
|
||||
|
||||
folder = {
|
||||
closed = "",
|
||||
open = "",
|
||||
|
|
@ -44,89 +69,182 @@ return {
|
|||
symlink = "",
|
||||
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 = {
|
||||
added = "",
|
||||
modified = "",
|
||||
removed = "",
|
||||
added = iconset.plus,
|
||||
modified = iconset.square,
|
||||
removed = iconset.minus,
|
||||
},
|
||||
diff_gutter = {
|
||||
add = "▊",
|
||||
change = "▊",
|
||||
delete = "",
|
||||
untracked = "▊",
|
||||
add = iconset.box.vertical_line_thick,
|
||||
change = iconset.box.vertical_line_thick,
|
||||
delete = iconset.caret.right,
|
||||
untracked = iconset.box.vertical_line_thick,
|
||||
},
|
||||
gitsigns = {
|
||||
-- Change type
|
||||
added = "",
|
||||
modified = "",
|
||||
deleted = "",
|
||||
renamed = "➜",
|
||||
added = iconset.circle,
|
||||
modified = iconset.circle,
|
||||
deleted = iconset.minus,
|
||||
renamed = iconset.arrow.right,
|
||||
-- Status type
|
||||
untracked = "★",
|
||||
ignored = "◌",
|
||||
untracked = iconset.star,
|
||||
ignored = iconset.circle_dotted,
|
||||
unstaged = "",
|
||||
staged = "✓",
|
||||
conflict = "",
|
||||
staged = iconset.check,
|
||||
conflict = iconset.git.merge,
|
||||
},
|
||||
todo = {
|
||||
default = "",
|
||||
warn = "",
|
||||
perf = "",
|
||||
bug = "",
|
||||
hack = "",
|
||||
test = "",
|
||||
default = iconset.exclamation_circle,
|
||||
warn = iconset.exclamation_triangle,
|
||||
perf = iconset.clock,
|
||||
bug = iconset.bug,
|
||||
hack = iconset.fire,
|
||||
test = iconset.stopwatch,
|
||||
},
|
||||
diagnostics = {
|
||||
error = "",
|
||||
warn = "",
|
||||
info = "",
|
||||
hint = "",
|
||||
error = iconset.circle_dot,
|
||||
warn = iconset.triangle_outline,
|
||||
info = iconset.info_circle_outline,
|
||||
hint = iconset.chat,
|
||||
},
|
||||
test = {
|
||||
ok = "",
|
||||
failed = "",
|
||||
ok = iconset.check,
|
||||
failed = iconset.close,
|
||||
running = "",
|
||||
skipped = "",
|
||||
watch = "",
|
||||
unknown = "",
|
||||
unknown = iconset.circle,
|
||||
},
|
||||
symbols = {
|
||||
Text = "",
|
||||
Method = "",
|
||||
Function = "",
|
||||
Constructor = "",
|
||||
Field = "",
|
||||
Variable = "",
|
||||
Class = "",
|
||||
Interface = "",
|
||||
Module = "",
|
||||
Namespace = "",
|
||||
Package = "",
|
||||
Property = "",
|
||||
Unit = "",
|
||||
Value = "",
|
||||
String = "",
|
||||
Number = "",
|
||||
NumberHex = "",
|
||||
Boolean = "",
|
||||
Array = "",
|
||||
Object = "",
|
||||
Enum = "",
|
||||
Keyword = "",
|
||||
Snippet = "",
|
||||
Color = "",
|
||||
File = "",
|
||||
Reference = "",
|
||||
Folder = "",
|
||||
Key = ' ',
|
||||
Null = ' ',
|
||||
EnumMember = "",
|
||||
Constant = "",
|
||||
Struct = "",
|
||||
Event = "",
|
||||
Operator = "",
|
||||
TypeParameter = "",
|
||||
Spell = "",
|
||||
Text = iconset.text,
|
||||
Method = iconset.code.method,
|
||||
Function = iconset.math["function"],
|
||||
Constructor = iconset.cogwheel,
|
||||
Field = iconset.code.field,
|
||||
Variable = iconset.code.variable,
|
||||
Class = iconset.code.class,
|
||||
Interface = iconset.code.interface,
|
||||
Module = iconset.bracket,
|
||||
Namespace = iconset.bracket,
|
||||
Package = iconset.package,
|
||||
Property = iconset.wrench,
|
||||
Unit = iconset.ruler,
|
||||
Value = iconset.hash,
|
||||
String = iconset.text_boxed,
|
||||
Number = iconset.number,
|
||||
NumberHex = iconset.hexadecimal,
|
||||
Boolean = iconset.code.boolean,
|
||||
Array = iconset.square_bracket,
|
||||
Object = iconset.bracket,
|
||||
Enum = iconset.sort_desc,
|
||||
Keyword = iconset.code.keyword,
|
||||
Snippet = iconset.bracket_dots,
|
||||
Color = iconset.color,
|
||||
File = iconset.file.text,
|
||||
Reference = iconset.code.reference,
|
||||
Folder = iconset.folder.closed,
|
||||
Key = iconset.text,
|
||||
Null = iconset.code.boolean,
|
||||
EnumMember = iconset.sort_desc,
|
||||
Constant = iconset.math.pi,
|
||||
Struct = iconset.code.struct,
|
||||
Event = iconset.code.event,
|
||||
Operator = iconset.math.plus_minus,
|
||||
TypeParameter = iconset.code.type_parameter,
|
||||
Spell = iconset.wand,
|
||||
},
|
||||
filetypes = {
|
||||
php = "",
|
||||
|
|
|
|||
|
|
@ -74,8 +74,7 @@ vim.o.foldcolumn = "auto"
|
|||
-- See `:help 'list'`
|
||||
-- and `:help 'listchars'`
|
||||
vim.o.list = false
|
||||
vim.o.listchars = string.format([[tab: %s,space:%s,eol:%s,nbsp:%s]],
|
||||
icons.whitespace.tab, icons.whitespace.space, icons.whitespace.eol, icons.whitespace.nbsp)
|
||||
vim.o.listchars = [[tab: ,space:·,eol:␍,nbsp:␣]]
|
||||
|
||||
vim.o.fillchars = string.format([[eob: ,fold: ,foldopen:%s,foldsep:%s,foldclose:%s]],
|
||||
icons.fold.open, icons.fold.sep, icons.fold.close)
|
||||
|
|
|
|||
|
|
@ -101,7 +101,26 @@ return {
|
|||
click = "v:lua.ScLa",
|
||||
},
|
||||
{ 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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue