Skip to content

Commit 011b280

Browse files
committed
Init
0 parents  commit 011b280

File tree

6 files changed

+1061
-0
lines changed

6 files changed

+1061
-0
lines changed

LICENSE

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
MIT License
2+
3+
Copyright 2020 github.com/adrian5
4+
5+
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:
6+
7+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8+
9+
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.

README.md

+103
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
# Oceanic Next
2+
3+
Adaptation of the [Sublime Text theme](https://github.com/voronianski/oceanic-next-color-scheme)
4+
for vim.
5+
6+
<img src="https://github.com/adrian5/oceanic-next-vim/blob/master/assets/theme-preview.png"
7+
width="600">
8+
9+
## Installation
10+
11+
[vim-plug](https://github.com/junegunn/vim-plug):
12+
13+
```viml
14+
Plug 'adrian5/oceanic-next-vim'
15+
```
16+
17+
[dein](https://github.com/Shougo/dein.vim):
18+
19+
```viml
20+
call dein#add('adrian5/oceanic-next-vim')
21+
```
22+
23+
Manually via [vim packages](https://vimhelp.org/repeat.txt.html#packages):
24+
25+
```sh
26+
# Example; nvim on Linux
27+
28+
mkdir -p ~/.local/share/nvim/site/pack/oceanic-next/start
29+
cd ~/.local/share/nvim/site/pack/oceanic-next/start
30+
git clone --depth 1 https://github.com/adrian5/oceanic-next-vim
31+
```
32+
33+
Finally, add the following to your vimrc and make sure you **restart vim**:
34+
35+
```viml
36+
colorscheme oceanicnext
37+
```
38+
39+
## Configuration
40+
41+
### Options
42+
43+
| option | value | default |
44+
| --------------------------- | ------------------------------------------------- | ----------------------------------- |
45+
| `g:oceanic_gutter_like_bg` | **1**: Give gutter same background as file buffer | **0**: Gutter is slightly darker |
46+
| `g:oceanic_transparent_bg` | **1**: Make buffer and gutter transparent | **0**: Use opaque background color |
47+
| `g:oceanic_bold` | **0**: Don't use bold text anywhere in theme | **1**: Make certain text items bold |
48+
| `g:oceanic_italic_comments` | **1**: Comments use italic font (if supported) | **0**: Comments are not italic |
49+
50+
Apply any of these before setting the colorscheme, e.g.:
51+
52+
```viml
53+
let g:oceanic_bold = 0
54+
colorscheme oceanicnext
55+
```
56+
57+
### vim-polyglot
58+
59+
If you use [vim-polyglot](https://github.com/sheerun/vim-polyglot), set the following option:
60+
61+
```viml
62+
let g:oceanic_for_polyglot = 1
63+
```
64+
65+
This tweaks syntax highlights for several languages, which can differ considerably from those
66+
shipping with vim.
67+
68+
### lightline
69+
70+
```viml
71+
let g:lightline = { 'colorscheme': 'oceanicnext' }
72+
```
73+
74+
Important: Make sure you don't have [mhartington/oceanic-next](
75+
https://github.com/mhartington/oceanic-next) loaded, or its styling will take precedence!
76+
77+
### vim-airline
78+
79+
Should be loaded automatically when setting `oceanicnext` colorscheme. As with lightline, make sure
80+
you don't have the _other_ Oceanic Next loaded.
81+
82+
To keep using the airline *default* theme, set:
83+
84+
```viml
85+
let g:airline_theme = 'default'
86+
```
87+
88+
## What about [mhartington/oceanic-next](https://github.com/mhartington/oceanic-next) ?
89+
90+
The hartington theme offers its own take on the original, and I found the difference sufficient to
91+
warrant another port.
92+
93+
## Contributing
94+
95+
For feedback and requests, please use the Issue tracker.
96+
97+
* For language requests, include code samples (or links thereto) in your report if possible; the
98+
more syntax I can check against, the better!
99+
* For plugin requests, consider listing features (commands) I should test, e.g. certain lists or
100+
menus to open.
101+
102+
If you want to submit a PR, please do so against the `dev` branch! Include a before/after screenshot
103+
if possible, in case I don't have the time to properly vet it. Thanks!

assets/theme-preview.png

78 KB
Loading
+117
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
" ==============================================================================
2+
" Name: Oceanic Next (airline theme)
3+
" Description: Addon to supply the vim-airline plugin with Oceanic Next colors
4+
" Repository: https://github.com/adrian5/oceanic-next-vim
5+
" License: MIT
6+
" ==============================================================================
7+
8+
" ----- Config ------------------------------------------------------------- {{{
9+
10+
" NOTE: I haven't been able to transparently override the default boldness
11+
" values of airline elements; the option will be ignored here for the time
12+
" being.
13+
14+
" }}}
15+
16+
" ----- Colors ------------------------------------------------------------- {{{
17+
18+
" Oceanic foreground shades
19+
let s:fg3 = ["#adb5c0", 249]
20+
let s:fg = ["#d8dee9", 253] " fg4
21+
22+
" Oceanic background shades
23+
let s:bg = ["#1b2b34", 235] " bg3
24+
25+
" Oceanic vivid base colors
26+
let s:red = ["#ec5f67", 167]
27+
let s:orange = ["#f99157", 209]
28+
let s:yellow = ["#fac863", 221]
29+
let s:green = ["#99c794", 108]
30+
let s:aqua = ["#5fb3b3", 73]
31+
let s:blue = ["#6699cc", 68]
32+
let s:lilac = ["#c594c5", 176]
33+
34+
" Custom shades for airline
35+
let s:b1 = ["#243945", 236]
36+
let s:b2 = ["#2d4857", 237]
37+
let s:b3 = ["#355466", 239]
38+
39+
" Custom shades for inactive (unfocused) airline
40+
let s:ib1 = ["#1d2f39", 234]
41+
let s:ib2 = ["#20343f", 236]
42+
let s:ib3 = ["#233845", 237]
43+
let s:ib4 = ["#767c84", 244]
44+
let s:ib5 = ["#5e666f", 241]
45+
46+
" Custom blues for insert mode
47+
let s:blue1 = ["#295a8a", 25]
48+
let s:blue2 = ["#224b73", 24]
49+
50+
" }}}
51+
52+
" ----- Airline ------------------------------------------------------------ {{{
53+
54+
" NOTE: `airline#themes#get_highlight(2)` is quirky to integrate; not worth the
55+
" hassle with an stable theme.
56+
57+
let g:airline#themes#oceanicnext#palette = {}
58+
59+
let s:N1 = [ s:b1[0], s:green[0], s:b1[1], s:green[1]]
60+
let s:N2 = [ s:fg[0], s:b3[0], s:fg[1], s:b3[1]]
61+
let s:N3 = [s:fg3[0], s:b1[0], s:fg3[1], s:b1[1]]
62+
let g:airline#themes#oceanicnext#palette.normal
63+
\ = airline#themes#generate_color_map(s:N1, s:N2, s:N3)
64+
65+
let s:IA1 = [s:ib4[0], s:ib3[0], s:ib4[1], s:ib3[1]]
66+
let s:IA2 = [s:ib5[0], s:ib2[0], s:ib5[1], s:ib2[1]]
67+
let s:IA3 = [s:ib5[0], s:ib1[0], s:ib5[1], s:ib1[1]]
68+
let g:airline#themes#oceanicnext#palette.inactive
69+
\ = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3)
70+
71+
let s:I1 = [s:blue2[0], s:fg[0], s:blue2[1], s:fg[1]]
72+
let s:I2 = [ s:fg[0], s:blue1[0], s:fg[1], s:blue1[1]]
73+
let s:I3 = [ s:fg[0], s:blue2[0], s:fg[1], s:blue2[1]]
74+
let g:airline#themes#oceanicnext#palette.insert
75+
\ = airline#themes#generate_color_map(s:I1, s:I2, s:I3)
76+
77+
let s:R1 = [s:b1[0], s:red[0], s:b1[1], s:red[1]]
78+
let g:airline#themes#oceanicnext#palette.replace
79+
\ = airline#themes#generate_color_map(s:R1, s:N2, s:N3)
80+
81+
let s:V1 = [s:b1[0], s:orange[0], s:b1[1], s:orange[1]]
82+
let g:airline#themes#oceanicnext#palette.visual
83+
\ = airline#themes#generate_color_map(s:V1, s:N2, s:N3)
84+
85+
let s:C1 = [s:b1[0], s:lilac[0], s:b1[1], s:lilac[1]]
86+
let g:airline#themes#oceanicnext#palette.commandline
87+
\ = airline#themes#generate_color_map(s:C1, s:N2, s:N3)
88+
89+
let g:airline#themes#oceanicnext#palette.terminal
90+
\ = airline#themes#generate_color_map(s:I1, s:I2, s:I3)
91+
let g:airline#themes#oceanicnext#palette.normal.airline_term = s:N1
92+
let g:airline#themes#oceanicnext#palette.terminal.airline_term = s:N1
93+
let g:airline#themes#oceanicnext#palette.visual.airline_term = s:N1
94+
95+
" Color default accents (`:help airline-accents`)
96+
let g:airline#themes#oceanicnext#palette.accents = {
97+
\ "red": [ s:red[0], "", s:red[1], "" ],
98+
\ "orange": [ s:orange[0], "", s:orange[1], "" ],
99+
\ "yellow": [ s:yellow[0], "", s:yellow[1], "" ],
100+
\ "green": [ s:green[0], "", s:green[1], "" ],
101+
\ "blue": [ s:blue[0], "", s:blue[1], "" ],
102+
\ "purple": [ s:lilac[0], "", s:lilac[1], "" ]
103+
\ }
104+
105+
" In airline theme tradition: ctrlp.vim styling
106+
if get(g:, "loaded_ctrlp", 0)
107+
let g:airline#themes#oceanicnext#palette.ctrlp
108+
\ = airline#extensions#ctrlp#generate_color_map(
109+
\ [s:fg3[0], s:b2[0], s:fg3[1], s:b2[1]],
110+
\ [ s:fg[0], s:b2[0], s:fg[1], s:b2[1]],
111+
\ [ s:bg[0], s:fg[0], s:bg[1], s:fg[1]]
112+
\ )
113+
endif
114+
115+
" }}}
116+
117+
" vim: sw=2 ts=2 sts=2 tw=80 cc=81 ft=vim fdm=marker fmr={{{,}}}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
" ==============================================================================
2+
" Name: Oceanic Next (lightline theme)
3+
" Description: Addon to supply the lightline plugin with Oceanic Next colors
4+
" Repository: https://github.com/adrian5/oceanic-next-vim
5+
" License: MIT
6+
" ==============================================================================
7+
8+
" ----- Config ------------------------------------------------------------- {{{
9+
10+
if get(g:, "oceanic_bold", 1)
11+
let s:bold = "bold"
12+
else
13+
let s:bold = ""
14+
endif
15+
16+
" }}}
17+
18+
" ----- Colors ------------------------------------------------------------- {{{
19+
20+
" Oceanic foreground shades
21+
let s:fg1 = ["#405860", "239"]
22+
let s:fg3 = ["#adb5c0", "249"]
23+
let s:fg4 = ["#d8dee9", "253"]
24+
let s:fg = s:fg4
25+
26+
" Oceanic background shades
27+
let s:bg1 = ["#17262e", "233"]
28+
let s:bg3 = ["#1b2b34", "235"]
29+
let s:bg = s:bg3
30+
31+
" Oceanic vivid base colors
32+
let s:red = ["#ec5f67", "167"]
33+
let s:orange = ["#f99157", "209"]
34+
let s:yellow = ["#fac863", "221"]
35+
let s:green = ["#99c794", "108"]
36+
let s:lilac = ["#c594c5", "176"]
37+
38+
" Custom shades for lightline
39+
let s:b1 = ["#243945", "236"]
40+
let s:b2 = ["#2d4857", "237"]
41+
let s:b3 = ["#355466", "239"]
42+
43+
" Custom shades for inactive (unfocused) lightline
44+
let s:ib1 = ["#1d2f39", "234"]
45+
let s:ib2 = ["#20343f", "236"]
46+
let s:ib3 = ["#233845", "237"]
47+
let s:ib4 = ["#767c84", "244"]
48+
let s:ib5 = ["#5e666f", "241"]
49+
50+
" Custom blues for insert mode
51+
let s:blue1 = ["#295a8a", "25"]
52+
let s:blue2 = ["#224b73", "24"]
53+
let s:blue3 = ["#86add5", "110"]
54+
55+
" }}}
56+
57+
" ----- Lightline ---------------------------------------------------------- {{{
58+
59+
let s:p = {"normal": {}, "inactive": {}, "insert": {}, "replace": {},
60+
\ "visual": {}, "command": {}, "tabline": {}}
61+
62+
let s:p.normal.left = [[s:b1, s:green, s:bold], [s:fg, s:b2]]
63+
let s:p.normal.middle = [[s:fg3, s:b1]]
64+
let s:p.normal.right = [[s:fg, s:b3], [s:fg, s:b2]]
65+
let s:p.normal.error = [[s:b1, s:red]]
66+
let s:p.normal.warning = [[s:b1, s:yellow]]
67+
68+
let s:p.inactive.left = [[s:ib4, s:ib1], [s:ib4, s:ib2]]
69+
let s:p.inactive.middle = [[s:ib5, s:ib1]]
70+
let s:p.inactive.right = [[s:ib4, s:ib3], [s:ib4, s:ib2]]
71+
72+
let s:p.insert.left = [[s:blue2, s:fg, s:bold], [s:fg, s:blue1]]
73+
let s:p.insert.middle = [[s:blue3, s:blue2]]
74+
let s:p.insert.right = [[s:blue2, s:fg], [s:fg, s:blue1]]
75+
76+
" Inherits from 'insert', hence the 'normal' copy/override
77+
let s:p.replace.left = [[s:b1, s:red, s:bold], [s:fg, s:b2]]
78+
let s:p.replace.middle = copy(s:p.normal.middle)
79+
let s:p.replace.right = copy(s:p.normal.right)
80+
81+
let s:p.visual.left = [[s:b1, s:orange, s:bold], [s:fg, s:b2]]
82+
83+
let s:p.command.left = [[s:b1, s:lilac, s:bold], [s:fg, s:b2]]
84+
85+
let s:p.tabline.left = [[s:fg1, s:bg1, s:bold]] " hl-TabLine
86+
let s:p.tabline.tabsel = [[["#bdc2cc", "250"], s:bg, s:bold]] " hl-TabLineSel
87+
let s:p.tabline.middle = [[s:fg3, s:bg1], s:bold] " hl-TabLineFill
88+
let s:p.tabline.right = [[s:fg3, s:bg, s:bold]] " Close button
89+
90+
let g:lightline#colorscheme#oceanicnext#palette
91+
\ = lightline#colorscheme#flatten(s:p)
92+
93+
" }}}
94+
95+
" vim: sw=2 ts=2 sts=2 tw=80 cc=81 ft=vim fdm=marker fmr={{{,}}}

0 commit comments

Comments
 (0)