Compare commits

...

3 Commits

Author SHA1 Message Date
Rob Watson 17e44a6338 fix(nvim): typo
continuous-integration/drone/push Build is passing Details
2024-12-03 04:39:44 +01:00
Rob Watson aa312d252e style(nvim): remove tabs from lua 2024-12-03 04:39:31 +01:00
Rob Watson d6dbebea76 chore(git): delta config 2024-12-03 04:22:23 +01:00
2 changed files with 104 additions and 97 deletions

View File

@ -112,13 +112,17 @@
[credential "https://github.com"] [credential "https://github.com"]
helper = !gh auth git-credential helper = !gh auth git-credential
[diff] [diff]
colorWords = true
tool = vimdiff tool = vimdiff
ignoreSubmodules = dirty ignoreSubmodules = dirty
[merge] [merge]
tool = vimdiff tool = vimdiff
conflictstyle = zdiff3
[interactive] [interactive]
diffFilter = delta --color-only diffFilter = delta --color-only
[delta] [delta]
navigate = true
dark = true
side-by-side = true side-by-side = true
plus-style = 'syntax "#142e20"' plus-style = 'syntax "#142e20"'
zero-style = 'syntax "#1d1f21" dim' zero-style = 'syntax "#1d1f21" dim'
@ -126,3 +130,6 @@
commit-decoration-style = bold yellow box ul commit-decoration-style = bold yellow box ul
file-style = bold yellow ul file-style = bold yellow ul
file-decoration-style = none file-decoration-style = none
wrap-max-lines=unlimited
wrap-right-percent=1
wrap-left-symbol=" "

View File

@ -1,111 +1,111 @@
require("nvim-web-devicons").setup({}) require("nvim-web-devicons").setup({})
local mode_map = { local mode_map = {
NORMAL = "N", NORMAL = "N",
INSERT = "I", INSERT = "I",
REPLACE = "R", REPLACE = "R",
COMMAND = "C", COMMAND = "C",
VISUAL = "v", VISUAL = "v",
["V-BLOCK"] = "V", ["V-BLOCK"] = "V",
["V-LINE"] = "V-LINE", ["V-LINE"] = "V-LINE",
} }
local function format_diff_element(val, sym) local function format_diff_element(val, sym)
if val == nil or val < 1 then if val == nil or val < 1 then
return "" return ""
end end
return sym .. val return sym .. val
end end
local diagnostics = { local diagnostics = {
"diagnostics", "diagnostics",
sources = { "nvim_lsp" }, sources = { "nvim_lsp" },
diagnostics_color = { diagnostics_color = {
error = { fg = "#ffffff", bg = "#bf616a" }, error = { fg = "#ffffff", bg = "#bf616a" },
warn = { fg = "#ebcb8b" }, warn = { fg = "#ebcb8b" },
info = { fg = "#81a1c1" }, info = { fg = "#81a1c1" },
hint = { fg = "#a3be8c" }, hint = { fg = "#a3be8c" },
}, },
always_visible = false, always_visible = false,
separator = { left = " " }, separator = { left = " " },
symbols = { symbols = {
error = function(count) error = function(count)
return count .. "E" return count .. "E"
end, end,
warn = function(count) warn = function(count)
return count .. "W" return count .. "W"
end, end,
info = function(count) info = function(count)
return count .. "I" return count .. "I"
end, end,
hint = function(count) hint = function(count)
return count .. "H" return count .. "H"
end, end,
}, },
} }
require("lualine").setup({ require("lualine").setup({
options = { options = {
icons_enabled = false, icons_enabled = false,
theme = "gruxbox_dark", theme = "gruvbox_dark",
component_separators = "", component_separators = "",
section_separators = { left = "", right = "" }, section_separators = { left = "", right = "" },
}, },
sections = { sections = {
lualine_a = { lualine_a = {
{ {
"mode", "mode",
fmt = function(mode) fmt = function(mode)
return mode_map[mode] or mode return mode_map[mode] or mode
end, end,
}, },
"paste", "paste",
}, },
lualine_b = { "filename" }, lualine_b = { "filename" },
lualine_c = { lualine_c = {
{ {
"branch", "branch",
padding = 1, padding = 1,
}, },
-- render coloured output from gitsigns, this doesn't seem to work with b:gitsigns_status: -- render coloured output from gitsigns, this doesn't seem to work with b:gitsigns_status:
{ {
function() function()
return format_diff_element(vim.b.gitsigns_status_dict.added, "+") return format_diff_element(vim.b.gitsigns_status_dict.added, "+")
end, end,
color = { fg = "#a3be8c" }, color = { fg = "#a3be8c" },
}, },
{ {
function() function()
return format_diff_element(vim.b.gitsigns_status_dict.changed, "~") return format_diff_element(vim.b.gitsigns_status_dict.changed, "~")
end, end,
color = { fg = "#ebcb8b" }, color = { fg = "#ebcb8b" },
}, },
{ {
function() function()
return format_diff_element(vim.b.gitsigns_status_dict.removed, "-") return format_diff_element(vim.b.gitsigns_status_dict.removed, "-")
end, end,
color = { fg = "#bf616a" }, color = { fg = "#bf616a" },
}, },
diagnostics, diagnostics,
}, },
lualine_x = { lualine_x = {
{ {
function() function()
return vim.bo.filetype return vim.bo.filetype
end, end,
padding = { left = 1, right = 0 }, padding = { left = 1, right = 0 },
}, },
}, },
lualine_y = { { "progress", padding = { left = 1, right = 1 } } }, lualine_y = { { "progress", padding = { left = 1, right = 1 } } },
lualine_z = { { "location", padding = { left = 1, right = 1 } } }, lualine_z = { { "location", padding = { left = 1, right = 1 } } },
}, },
inactive_sections = { inactive_sections = {
lualine_a = {}, lualine_a = {},
lualine_b = {}, lualine_b = {},
lualine_c = { "filename", diagnostics }, lualine_c = { "filename", diagnostics },
lualine_x = { { "location", padding = { right = 0 } } }, lualine_x = { { "location", padding = { right = 0 } } },
lualine_y = {}, lualine_y = {},
lualine_z = {}, lualine_z = {},
}, },
}) })