[2024-10-12] New custom colour scheme, statusline updates
This commit is contained in:
parent
42920643c2
commit
d6b161f2d6
9
nvim/colors/gruv.vim
Normal file
9
nvim/colors/gruv.vim
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
" load the retrobox colorscheme
|
||||||
|
runtime colors/retrobox.vim
|
||||||
|
let g:colors_name = 'gruv'
|
||||||
|
highlight CursorLineNr guibg=NONE gui=bold
|
||||||
|
highlight SpellBad guibg=Normal guifg=Normal gui=undercurl guisp=red
|
||||||
|
highlight SpellCap guibg=Normal guifg=Normal gui=undercurl guisp=blue
|
||||||
|
highlight SpellLocal guibg=Normal guifg=Normal gui=undercurl guisp=pink
|
||||||
|
highlight SpellRare guibg=Normal guifg=Normal gui=undercurl guisp=aqua
|
||||||
|
"highlight StatusLine gui=bold "guibg=Normal guifg=Normal
|
@ -20,4 +20,4 @@ highlight Comment gui=italic
|
|||||||
highlight Constant guifg=#999999
|
highlight Constant guifg=#999999
|
||||||
highlight NormalFloat guibg=#666666
|
highlight NormalFloat guibg=#666666
|
||||||
highlight CursorLineNr guibg=NONE gui=bold
|
highlight CursorLineNr guibg=NONE gui=bold
|
||||||
highlight StatusLine guibg=Normal guifg=Normal
|
" highlight StatusLine guibg=Normal guifg=Normal
|
||||||
|
@ -11,7 +11,7 @@ Plug 'MunifTanjim/nui.nvim'
|
|||||||
"Plug 'nvim-neo-tree/neo-tree.nvim', { 'branch': 'v3.x' }
|
"Plug 'nvim-neo-tree/neo-tree.nvim', { 'branch': 'v3.x' }
|
||||||
Plug 'lewis6991/gitsigns.nvim' " OPTIONAL: for git status
|
Plug 'lewis6991/gitsigns.nvim' " OPTIONAL: for git status
|
||||||
" Plug 'nvim-tree/nvim-web-devicons' " OPTIONAL: for file icons
|
" Plug 'nvim-tree/nvim-web-devicons' " OPTIONAL: for file icons
|
||||||
Plug 'freddiehaddad/feline.nvim'
|
" Plug 'freddiehaddad/feline.nvim'
|
||||||
Plug 'neovim/nvim-lspconfig'
|
Plug 'neovim/nvim-lspconfig'
|
||||||
" main one
|
" main one
|
||||||
Plug 'ms-jpq/coq_nvim', {'branch': 'coq'}
|
Plug 'ms-jpq/coq_nvim', {'branch': 'coq'}
|
||||||
@ -32,7 +32,7 @@ endif
|
|||||||
|
|
||||||
colo mine
|
colo mine
|
||||||
set noshowmode
|
set noshowmode
|
||||||
set laststatus=3
|
set laststatus=2
|
||||||
set cmdheight=0
|
set cmdheight=0
|
||||||
|
|
||||||
set statusline=%{%v:lua.require('plugins.statusline').statusline()%}
|
set statusline=%{%v:lua.require('plugins.statusline').statusline()%}
|
||||||
|
@ -2,12 +2,16 @@ local M = {}
|
|||||||
|
|
||||||
M.modeMap = {
|
M.modeMap = {
|
||||||
n = "NORMAL", i = "INSERT", R = "REPLACE", v = "VISUAL", V = "V-LINE", [''] = "V-BLOCK",
|
n = "NORMAL", i = "INSERT", R = "REPLACE", v = "VISUAL", V = "V-LINE", [''] = "V-BLOCK",
|
||||||
c = "COMMAND", s = "SELECT", S = "S-LINE", [''] = "S-BLOCK", t = "TERMINAL"
|
c = "COMMAND", s = "SELECT", S = "S-LINE", [''] = "S-BLOCK", nt = "NORMAL", t = "TERMINAL"
|
||||||
}
|
}
|
||||||
|
|
||||||
GetMode = function()
|
GetMode = function()
|
||||||
local m = vim.api.nvim_get_mode().mode
|
local m = vim.api.nvim_get_mode().mode
|
||||||
return M.modeMap[m] .. " "
|
if M.modeMap[m] ~= nil then
|
||||||
|
return M.modeMap[m] .. " "
|
||||||
|
else
|
||||||
|
return ""
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
GetDate = function()
|
GetDate = function()
|
||||||
@ -28,9 +32,9 @@ GetLSP = function()
|
|||||||
local sandbox = root:match(".+/([^/]+)$")
|
local sandbox = root:match(".+/([^/]+)$")
|
||||||
--local handle = io.popen('p4 opened | grep tnrCRCDecode | sed \'s/^[^#]*//g\'')
|
--local handle = io.popen('p4 opened | grep tnrCRCDecode | sed \'s/^[^#]*//g\'')
|
||||||
--local result = handle:read("*a")
|
--local result = handle:read("*a")
|
||||||
return string.format('[%s -> %s]',name,sandbox)
|
return string.format('| %s -> %s ',name,sandbox)
|
||||||
else
|
else
|
||||||
return "[" .. name .. "] "
|
return "| " .. name .. " "
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
return ''
|
return ''
|
||||||
@ -42,14 +46,14 @@ GetGitStatus = function()
|
|||||||
local inRepo = signs.head ~= ''
|
local inRepo = signs.head ~= ''
|
||||||
|
|
||||||
return inRepo and string.format(
|
return inRepo and string.format(
|
||||||
'[%s: +%s ~%s -%s] ',
|
'| %s: +%s ~%s -%s ',
|
||||||
signs.head, signs.added, signs.changed, signs.removed
|
signs.head, signs.added, signs.changed, signs.removed
|
||||||
) or ''
|
) or ''
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.statusline()
|
function M.statusline()
|
||||||
local sline = " "
|
local sline = " "
|
||||||
sline = sline .. GetMode() .. GetGitStatus() .. GetLSP() .. "%=" .. GetDate() .. " " .. GetTime() .. " "
|
sline = sline .. GetMode() .. GetGitStatus() .. GetLSP() .. "%=" .. GetDate() .. " | " .. GetTime() .. " "
|
||||||
return sline
|
return sline
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user