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"]
helper = !gh auth git-credential
[diff]
colorWords = true
tool = vimdiff
ignoreSubmodules = dirty
[merge]
tool = vimdiff
conflictstyle = zdiff3
[interactive]
diffFilter = delta --color-only
[delta]
navigate = true
dark = true
side-by-side = true
plus-style = 'syntax "#142e20"'
zero-style = 'syntax "#1d1f21" dim'
@ -126,3 +130,6 @@
commit-decoration-style = bold yellow box ul
file-style = bold yellow ul
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({})
local mode_map = {
NORMAL = "N",
INSERT = "I",
REPLACE = "R",
COMMAND = "C",
VISUAL = "v",
["V-BLOCK"] = "V",
["V-LINE"] = "V-LINE",
NORMAL = "N",
INSERT = "I",
REPLACE = "R",
COMMAND = "C",
VISUAL = "v",
["V-BLOCK"] = "V",
["V-LINE"] = "V-LINE",
}
local function format_diff_element(val, sym)
if val == nil or val < 1 then
return ""
end
if val == nil or val < 1 then
return ""
end
return sym .. val
return sym .. val
end
local diagnostics = {
"diagnostics",
sources = { "nvim_lsp" },
diagnostics_color = {
error = { fg = "#ffffff", bg = "#bf616a" },
warn = { fg = "#ebcb8b" },
info = { fg = "#81a1c1" },
hint = { fg = "#a3be8c" },
},
always_visible = false,
separator = { left = " " },
symbols = {
error = function(count)
return count .. "E"
end,
warn = function(count)
return count .. "W"
end,
info = function(count)
return count .. "I"
end,
hint = function(count)
return count .. "H"
end,
},
"diagnostics",
sources = { "nvim_lsp" },
diagnostics_color = {
error = { fg = "#ffffff", bg = "#bf616a" },
warn = { fg = "#ebcb8b" },
info = { fg = "#81a1c1" },
hint = { fg = "#a3be8c" },
},
always_visible = false,
separator = { left = " " },
symbols = {
error = function(count)
return count .. "E"
end,
warn = function(count)
return count .. "W"
end,
info = function(count)
return count .. "I"
end,
hint = function(count)
return count .. "H"
end,
},
}
require("lualine").setup({
options = {
icons_enabled = false,
theme = "gruxbox_dark",
component_separators = "",
section_separators = { left = "", right = "" },
},
sections = {
lualine_a = {
{
"mode",
fmt = function(mode)
return mode_map[mode] or mode
end,
},
"paste",
},
lualine_b = { "filename" },
lualine_c = {
{
"branch",
padding = 1,
},
-- render coloured output from gitsigns, this doesn't seem to work with b:gitsigns_status:
{
function()
return format_diff_element(vim.b.gitsigns_status_dict.added, "+")
end,
color = { fg = "#a3be8c" },
},
{
function()
return format_diff_element(vim.b.gitsigns_status_dict.changed, "~")
end,
color = { fg = "#ebcb8b" },
},
{
function()
return format_diff_element(vim.b.gitsigns_status_dict.removed, "-")
end,
color = { fg = "#bf616a" },
},
diagnostics,
},
lualine_x = {
{
function()
return vim.bo.filetype
end,
padding = { left = 1, right = 0 },
},
},
lualine_y = { { "progress", padding = { left = 1, right = 1 } } },
lualine_z = { { "location", padding = { left = 1, right = 1 } } },
},
inactive_sections = {
lualine_a = {},
lualine_b = {},
lualine_c = { "filename", diagnostics },
lualine_x = { { "location", padding = { right = 0 } } },
lualine_y = {},
lualine_z = {},
},
options = {
icons_enabled = false,
theme = "gruvbox_dark",
component_separators = "",
section_separators = { left = "", right = "" },
},
sections = {
lualine_a = {
{
"mode",
fmt = function(mode)
return mode_map[mode] or mode
end,
},
"paste",
},
lualine_b = { "filename" },
lualine_c = {
{
"branch",
padding = 1,
},
-- render coloured output from gitsigns, this doesn't seem to work with b:gitsigns_status:
{
function()
return format_diff_element(vim.b.gitsigns_status_dict.added, "+")
end,
color = { fg = "#a3be8c" },
},
{
function()
return format_diff_element(vim.b.gitsigns_status_dict.changed, "~")
end,
color = { fg = "#ebcb8b" },
},
{
function()
return format_diff_element(vim.b.gitsigns_status_dict.removed, "-")
end,
color = { fg = "#bf616a" },
},
diagnostics,
},
lualine_x = {
{
function()
return vim.bo.filetype
end,
padding = { left = 1, right = 0 },
},
},
lualine_y = { { "progress", padding = { left = 1, right = 1 } } },
lualine_z = { { "location", padding = { left = 1, right = 1 } } },
},
inactive_sections = {
lualine_a = {},
lualine_b = {},
lualine_c = { "filename", diagnostics },
lualine_x = { { "location", padding = { right = 0 } } },
lualine_y = {},
lualine_z = {},
},
})