@ -6,7 +6,7 @@ end
local gls = gl.section
gl.short_line_list = { " " }
gl.short_line_list = { " " }
local left_separator = " " -- or " "
local right_separator = " " -- or ""
@ -19,8 +19,8 @@ gls.left[1] = {
provider = function ( )
return " ▋ "
end ,
highlight = { colors.nord_blue , colors.nord_blue }
}
highlight = { colors.nord_blue , colors.nord_blue } ,
} ,
}
gls.left [ 2 ] = {
@ -28,31 +28,31 @@ gls.left[2] = {
provider = function ( )
return " "
end ,
highlight = { colors.statusline_bg , colors.nord_blue } ,
highlight = { colors.statusline_bg , colors.nord_blue } ,
separator = right_separator .. " " ,
separator_highlight = { colors.nord_blue , colors.lightbg }
}
separator_highlight = { colors.nord_blue , colors.lightbg } ,
} ,
}
gls.left [ 3 ] = {
FileIcon = {
provider = " FileIcon " ,
condition = condition.buffer_not_empty ,
highlight = { colors.white , colors.lightbg }
}
highlight = { colors.white , colors.lightbg } ,
} ,
}
gls.left [ 4 ] = {
FileName = {
provider = function ( )
local fileinfo = require ( ' galaxyline.provider_fileinfo ' )
local fileinfo = require " galaxyline.provider_fileinfo "
return fileinfo.get_current_file_name ( " " , " " )
end ,
condition = condition.buffer_not_empty ,
highlight = { colors.white , colors.lightbg } ,
highlight = { colors.white , colors.lightbg } ,
separator = right_separator ,
separator_highlight = { colors.lightbg , colors.lightbg2 }
}
separator_highlight = { colors.lightbg , colors.lightbg2 } ,
} ,
}
gls.left [ 5 ] = {
@ -61,10 +61,10 @@ gls.left[5] = {
local dir_name = vim.fn . fnamemodify ( vim.fn . getcwd ( ) , " :t " )
return " " .. dir_name .. " "
end ,
highlight = { colors.grey_fg2 , colors.lightbg2 } ,
highlight = { colors.grey_fg2 , colors.lightbg2 } ,
separator = right_separator ,
separator_highlight = { colors.lightbg2 , colors.statusline_bg }
}
separator_highlight = { colors.lightbg2 , colors.statusline_bg } ,
} ,
}
local checkwidth = function ( )
@ -80,8 +80,8 @@ gls.left[6] = {
provider = " DiffAdd " ,
condition = checkwidth ,
icon = " " ,
highlight = { colors.white , colors.statusline_bg }
}
highlight = { colors.white , colors.statusline_bg } ,
} ,
}
gls.left [ 7 ] = {
@ -89,8 +89,8 @@ gls.left[7] = {
provider = " DiffModified " ,
condition = checkwidth ,
icon = " " ,
highlight = { colors.grey_fg2 , colors.statusline_bg }
}
highlight = { colors.grey_fg2 , colors.statusline_bg } ,
} ,
}
gls.left [ 8 ] = {
@ -98,24 +98,24 @@ gls.left[8] = {
provider = " DiffRemove " ,
condition = checkwidth ,
icon = " " ,
highlight = { colors.grey_fg2 , colors.statusline_bg }
}
highlight = { colors.grey_fg2 , colors.statusline_bg } ,
} ,
}
gls.left [ 9 ] = {
DiagnosticError = {
provider = " DiagnosticError " ,
icon = " " ,
highlight = { colors.red , colors.statusline_bg }
}
highlight = { colors.red , colors.statusline_bg } ,
} ,
}
gls.left [ 10 ] = {
DiagnosticWarn = {
provider = " DiagnosticWarn " ,
icon = " " ,
highlight = { colors.yellow , colors.statusline_bg }
}
highlight = { colors.yellow , colors.statusline_bg } ,
} ,
}
gls.right [ 1 ] = {
@ -135,8 +135,8 @@ gls.right[1] = {
return " "
end
end ,
highlight = { colors.grey_fg2 , colors.statusline_bg }
}
highlight = { colors.grey_fg2 , colors.statusline_bg } ,
} ,
}
gls.right [ 2 ] = {
@ -145,31 +145,31 @@ gls.right[2] = {
return " "
end ,
condition = require ( " galaxyline.condition " ) . check_git_workspace ,
highlight = { colors.grey_fg2 , colors.statusline_bg } ,
highlight = { colors.grey_fg2 , colors.statusline_bg } ,
separator = " " ,
separator_highlight = { colors.statusline_bg , colors.statusline_bg }
}
separator_highlight = { colors.statusline_bg , colors.statusline_bg } ,
} ,
}
gls.right [ 3 ] = {
GitBranch = {
provider = " GitBranch " ,
condition = require ( " galaxyline.condition " ) . check_git_workspace ,
highlight = { colors.grey_fg2 , colors.statusline_bg }
}
highlight = { colors.grey_fg2 , colors.statusline_bg } ,
} ,
}
local mode_colors = {
[ 110 ] = { " NORMAL " , colors.red } ,
[ 105 ] = { " INSERT " , colors.dark_purple } ,
[ 99 ] = { " COMMAND " , colors.pink } ,
[ 116 ] = { " TERMINAL " , colors.green } ,
[ 118 ] = { " VISUAL " , colors.cyan } ,
[ 22 ] = { " V-BLOCK " , colors.cyan } ,
[ 86 ] = { " V_LINE " , colors.cyan } ,
[ 82 ] = { " REPLACE " , colors.orange } ,
[ 115 ] = { " SELECT " , colors.nord_blue } ,
[ 83 ] = { " S-LINE " , colors.nord_blue }
[ 110 ] = { " NORMAL " , colors.red } ,
[ 105 ] = { " INSERT " , colors.dark_purple } ,
[ 99 ] = { " COMMAND " , colors.pink } ,
[ 116 ] = { " TERMINAL " , colors.green } ,
[ 118 ] = { " VISUAL " , colors.cyan } ,
[ 22 ] = { " V-BLOCK " , colors.cyan } ,
[ 86 ] = { " V_LINE " , colors.cyan } ,
[ 82 ] = { " REPLACE " , colors.orange } ,
[ 115 ] = { " SELECT " , colors.nord_blue } ,
[ 83 ] = { " S-LINE " , colors.nord_blue } ,
}
local mode = function ( n )
@ -183,9 +183,9 @@ gls.right[4] = {
return left_separator
end ,
separator = " " ,
separator_highlight = { colors.statusline_bg , colors.statusline_bg } ,
highlight = { " GalaxyViMode " , colors.statusline_bg }
}
separator_highlight = { colors.statusline_bg , colors.statusline_bg } ,
highlight = { " GalaxyViMode " , colors.statusline_bg } ,
} ,
}
gls.right [ 5 ] = {
@ -194,8 +194,8 @@ gls.right[5] = {
vim.cmd ( " hi GalaxyviMode_icon guibg= " .. mode ( 2 ) )
return " "
end ,
highlight = { colors.statusline_bg , colors.red }
}
highlight = { colors.statusline_bg , colors.red } ,
} ,
}
gls.right [ 6 ] = {
@ -204,8 +204,8 @@ gls.right[6] = {
vim.cmd ( " hi GalaxyViMode guifg= " .. mode ( 2 ) )
return " " .. mode ( 1 ) .. " "
end ,
highlight = { " GalaxyViMode " , colors.lightbg }
}
highlight = { " GalaxyViMode " , colors.lightbg } ,
} ,
}
gls.right [ 7 ] = {
@ -214,25 +214,25 @@ gls.right[7] = {
return " "
end ,
separator = left_separator ,
separator_highlight = { colors.green , colors.lightbg } ,
highlight = { colors.lightbg , colors.green }
}
separator_highlight = { colors.green , colors.lightbg } ,
highlight = { colors.lightbg , colors.green } ,
} ,
}
gls.right [ 8 ] = {
line_percentage = {
provider = function ( )
local current_line = vim.fn . line ( " . " )
local total_line = vim.fn . line ( " $ " )
local current_line = vim.fn . line " . "
local total_line = vim.fn . line " $ "
if current_line == 1 then
return " Top "
elseif current_line == vim.fn . line ( " $ " ) then
elseif current_line == vim.fn . line " $ " then
return " Bot "
end
local result , _ = math.modf ( ( current_line / total_line ) * 100 )
return " " .. result .. " % "
end ,
highlight = { colors.green , colors.lightbg }
}
highlight = { colors.green , colors.lightbg } ,
} ,
}