Merge pull request 'Update to use nvim for mergetool & battery config update' (#10) from move-diff-tool-to-nvim into main

Reviewed-on: https://git.softinio.com/softinio/nix-config/pulls/10
This commit is contained in:
Salar Rahmanian 2022-09-22 03:15:04 +00:00
commit 44d9115424
3 changed files with 12 additions and 10 deletions

View file

@ -7,16 +7,16 @@ let
pager = "diff-so-fancy | less --tabs=4 -RFX"; pager = "diff-so-fancy | less --tabs=4 -RFX";
}; };
init.defaultBranch = "main"; init.defaultBranch = "main";
merge.conflictStyle = "diff3"; merge.conflictstyle = "diff3";
merge.tool = "intellij"; merge.tool = "nvim";
mergetool = { mergetool.nvim = {
cmd = "idea merge \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$MERGED\""; cmd = "nvim -d -c \"wincmd l\" -c \"norm ]c\" \"$LOCAL\" \"$MERGED\" \"$REMOTE\"";
trustExitCode = true;
prompt = false; prompt = false;
keepBackup = false;
}; };
diff.tool = "intellij"; diff.tool = "nvim";
difftool = { difftool.nvim = {
cmd = "idea diff \"$LOCAL\" \"$REMOTE\""; cmd = "nvim -d \"$LOCAL\" \"$REMOTE\"";
prompt = false; prompt = false;
}; };
url = { url = {

View file

@ -85,7 +85,7 @@ _G.load_config = function()
show_status_when_no_battery = true, -- Don't show any icon or text when no battery found (desktop for example) show_status_when_no_battery = true, -- Don't show any icon or text when no battery found (desktop for example)
show_plugged_icon = true, -- If true show a cable icon alongside the battery icon when plugged in show_plugged_icon = true, -- If true show a cable icon alongside the battery icon when plugged in
show_unplugged_icon = true, -- When true show a diconnected cable icon when not plugged in show_unplugged_icon = true, -- When true show a diconnected cable icon when not plugged in
show_percent = false, -- Whether or not to show the percent charge remaining in digits show_percent = true, -- Whether or not to show the percent charge remaining in digits
vertical_icons = true, -- When true icons are vertical, otherwise shows horizontal battery icon vertical_icons = true, -- When true icons are vertical, otherwise shows horizontal battery icon
}) })

View file

@ -181,7 +181,9 @@ gls.right[4] = {
gls.right[5] = { gls.right[5] = {
BatteryNvim = { BatteryNvim = {
provider = function() provider = function()
return require 'battery'.get_status_line() local status = require 'battery'.get_status_line()
local formatted = string.format(status)
return formatted
end, end,
separator = '', separator = '',
separator_highlight = { colors.bg, colors.purple }, separator_highlight = { colors.bg, colors.purple },