Add new vim colourscheme for ElementaryOS

This commit is contained in:
Jake Bauer 2023-11-24 23:25:23 +01:00
parent d829790959
commit bc0c45d6a2
4 changed files with 261 additions and 2 deletions

View File

@ -15,7 +15,8 @@ lua require('neoscroll').setup({easing_function = "quadratic"})
" Syntax Highlighting and Colourscheme
syntax on
colorscheme monochrome-light
colorscheme elementary
set termguicolors
" Show Matching Parens/Brackets
set showmatch

View File

@ -0,0 +1,19 @@
Copyright © Refer to https://github.com/fxn/vim-monochrome/graphs/contributors
Copyright © 2023 Jake Bauer <jbauer@paritybit.ca>
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the “Software”), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -0,0 +1,239 @@
" elementary.vim
"
" Framework Author: Xavier Noria <fxn@hashref.com>
" License: MIT
" Colorscheme By: Jake Bauer <jbauer@paritybit.ca>
"
" A colourscheme inspired by the default dark terminal scheme on ElementaryOS
set background=dark
hi clear
if exists('syntax_on')
syntax reset
endif
let g:colors_name = 'elementary'
let s:black = ['#222222', 235]
let s:red = ['#A53C23', 130]
let s:green = ['#7B9246', 101]
let s:blue = ['#6C99BB', 67]
let s:yellow = ['#D3A04D', 179]
let s:purple = ['#9F4E85', 132]
let s:white = ['#D0D0D0', 252]
let s:accent = ['#5F5F5F', 59]
let s:cursorline = ['#4E4E4E', 239]
let s:comment = ['#6C6C6C', 242]
let s:faded = ['#444444', 238]
let s:italic = 'italic'
let s:bold = 'bold'
let s:underline = 'underline'
let s:none = 'NONE'
let s:default_fg = s:white
let s:default_bg = [s:black[0], s:none]
let s:default_lst = []
let s:default_str = ''
let s:comment_attr = s:italic
function! s:hi(...)
let group = a:1
let fg = get(a:, 2, s:default_fg)
let bg = get(a:, 3, s:default_bg)
let attr = get(a:, 4, s:default_str)
let cmd = ['hi', group]
if fg != s:default_lst
call add(cmd, 'guifg='.fg[0])
call add(cmd, 'ctermfg='.fg[1])
endif
if bg != s:default_lst
call add(cmd, 'guibg='.bg[0])
call add(cmd, 'ctermbg='.bg[1])
endif
if attr != s:default_str
call add(cmd, 'gui='.attr)
call add(cmd, 'cterm='.attr)
endif
exec "hi clear " group
exec join(cmd, ' ')
endfunction
" --- Vim interface ------------------------------------------------------------
call s:hi('Normal', s:white, s:black)
call s:hi('Cursor', s:black, s:white)
call s:hi('CursorLine', s:white, s:cursorline, s:none)
call s:hi('CursorLineNr', s:white, s:default_bg, s:bold)
call s:hi('ColorColumn', s:white, s:faded)
call s:hi('Search', s:white, s:accent)
call s:hi('Visual', s:white, s:accent)
call s:hi('ErrorMsg', s:red, s:default_bg)
" Status bar
call s:hi('StatusLine', s:white, s:faded)
call s:hi('StatusLineNC', s:white, s:faded)
" Tabs
call s:hi('TabLine', s:white, s:faded)
call s:hi('TabLineSel', s:white, s:accent, s:bold)
call s:hi('TabLineFill', s:white, s:black)
" Tildes at the bottom of a buffer, etc.
call s:hi('NonText', s:faded)
" Folding.
call s:hi('FoldColumn', s:faded)
call s:hi('Folded')
" Line numbers gutter.
call s:hi('LineNr', s:accent)
" Small arrow used for tabs.
call s:hi('SpecialKey', s:accent, s:default_bg, s:bold)
" File browsers.
call s:hi('Directory', s:white, s:default_bg, s:bold)
" Help.
call s:hi('helpSpecial')
call s:hi('helpHyperTextJump', s:accent, s:default_bg, s:underline)
call s:hi('helpNote')
" Popup menu.
call s:hi('Pmenu', s:white, s:accent)
call s:hi('PmenuSel', s:accent, s:white)
" Signs.
call s:hi('SignColumn')
" --- Diff Mode ----------------------------------------------------------------
call s:hi('DiffAdd', s:green, s:default_bg)
call s:hi('DiffDelete', s:red, s:default_bg)
call s:hi('DiffChange', s:white, s:default_bg)
call s:hi('DiffText', s:yellow, s:default_bg)
" --- Programming ----------------------------------------------------
call s:hi('Statement', s:green, s:default_bg, s:bold)
call s:hi('PreProc', s:blue, s:default_bg, s:bold)
call s:hi('String', s:blue)
call s:hi('Comment', s:comment, s:default_bg, s:comment_attr)
call s:hi('Constant', s:yellow, s:default_bg, s:bold)
call s:hi('Number', s:yellow)
call s:hi('Type', s:purple, s:default_bg)
call s:hi('Function', s:yellow)
call s:hi('Identifier', s:default_fg, s:default_bg, s:none)
call s:hi('Special')
call s:hi('MatchParen', s:white, s:black, s:underline)
call s:hi('Error', s:red, s:black, s:bold)
call s:hi('Todo', s:red, s:default_bg, s:bold)
" --- VimL ---------------------------------------------------------------------
call s:hi('vimOption')
call s:hi('vimGroup')
call s:hi('vimHiClear')
call s:hi('vimHiGroup')
call s:hi('vimHiAttrib')
call s:hi('vimHiGui')
call s:hi('vimHiGuiFgBg')
call s:hi('vimHiCTerm')
call s:hi('vimHiCTermFgBg')
call s:hi('vimSynType')
hi link vimCommentTitle Comment
" --- Shell --------------------------------------------------------------------
hi link shRange Special
hi link shQuote Special
hi link shOperator Special
" --- Ruby ---------------------------------------------------------------------
call s:hi('rubyConstant')
call s:hi('rubySharpBang', s:comment)
call s:hi('rubyStringDelimiter', s:accent)
call s:hi('rubyStringEscape', s:accent)
call s:hi('rubyRegexpEscape', s:accent)
call s:hi('rubyRegexpAnchor', s:accent)
call s:hi('rubyRegexpSpecial', s:accent)
" --- Elixir -------------------------------------------------------------------
call s:hi('elixirAlias', s:default_fg, s:default_bg, s:none)
call s:hi('elixirDelimiter', s:accent)
call s:hi('elixirSelf', s:default_fg, s:default_bg, s:none)
" For ||, ->, etc.
call s:hi('elixirOperator')
" Module attributes like @doc or @type.
hi link elixirVariable Statement
" While rendered as comments in other languages, docstrings are strings,
" experimental.
hi link elixirDocString String
hi link elixirDocTest String
hi link elixirStringDelimiter String
" --- Perl ---------------------------------------------------------------------
call s:hi('perlSharpBang', s:comment)
call s:hi('perlStringStartEnd', s:accent)
call s:hi('perlStringEscape', s:accent)
call s:hi('perlMatchStartEnd', s:accent)
" --- Python -------------------------------------------------------------------
call s:hi('pythonEscape', s:accent)
" --- C/C++ --------------------------------------------------------------------
call s:hi('cIncluded', s:yellow)
" --- JavaScript ---------------------------------------------------------------
hi link javaScriptIdentifier Statement
hi link javaScriptBraces Noise
" --- Diffs --------------------------------------------------------------------
call s:hi('diffFile', s:faded)
call s:hi('diffNewFile', s:faded)
call s:hi('diffIndexLine', s:comment)
call s:hi('diffLine', s:yellow)
call s:hi('diffSubname', s:faded)
call s:hi('diffAdded', s:green)
call s:hi('diffRemoved', s:red)
" --- Markdown -----------------------------------------------------------------
call s:hi('Title', s:white, s:default_bg, s:bold)
call s:hi('markdownHeadingDelimiter', s:white, s:default_bg, s:bold)
call s:hi('markdownHeadingRule', s:white, s:default_bg, s:bold)
call s:hi('markdownLinkText', s:blue, s:default_bg, s:underline)
" --- HTML ---------------------------------------------------------------------
call s:hi('htmlLink', s:blue, s:default_bg, s:underline)
call s:hi('htmlArg', s:default_fg, s:default_bg)
call s:hi('htmlTag', s:default_fg, s:default_bg)
" --- CSS ----------------------------------------------------------------------
hi link cssBraces Noise
" --- YAML ---------------------------------------------------------------------
call s:hi('yamlBlockMappingKey', s:green, s:default_bg, s:bold)
call s:hi('yamlBlockCollectionItemStart', s:red, s:default_bg, s:bold)
" --- Gemini -------------------------------------------------------------------
" Based on this plugin: https://tildegit.org/sloum/gemini-vim-syntax
call s:hi('gmiHeader', s:white, s:default_bg, s:bold)
call s:hi('gmiLinkStart', s:white, s:default_bg, s:bold)
call s:hi('gmiLinkURL', s:blue, s:default_bg, s:underline)
call s:hi('gmiLinkTitle', s:accent, s:default_bg, s:none)
call s:hi('gmiMono', s:accent, s:default_bg, s:bold)
call s:hi('gmiQuoteLine', s:accent, s:default_bg, s:bold)
" --- Spelling -----------------------------------------------------------------
call s:hi('SpellBad', s:red, s:default_bg, s:bold, s:underline)
call s:hi('SpellCap', s:white, s:default_bg, s:bold)
call s:hi('SpellLocal', s:default_fg, s:default_bg, s:none)
call s:hi('SpellRare', s:default_fg, s:default_bg, s:none)

View File

@ -99,7 +99,7 @@ function! StatusLine()
let statusline .= "%#Modi# %{CheckModified(&modified)} "
let statusline .= "%#Base#"
let statusline .= "%="
let statusline .= "%{gutentags#statusline('[', ']')} "
" let statusline .= "%{gutentags#statusline('[', ']')} "
let statusline .= "%#FileType# %{CheckFileType(&filetype)} "
let statusline .= "%#LineCol# %p%% Ln %l/%L : %c "
return statusline