~wintershadows/dotfiles

ref: 8d34f2571e0dfbc995e1d5c9cb04f9acf02df4c5 dotfiles/.config/nvim/ginit.vim -rw-r--r-- 3.1 KiB
8d34f257 — Mysterious Grass Add rust, adjust gitignores 2 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
" vim: set foldmethod=marker:
augroup vimrc_ginit
  autocmd!
augroup END

" Font {{{
if has('mac')
  " let g:gui_default_font_name = 'Monoid Nerd Font'
  " let g:gui_default_font_opts = {'size': 12, 'weight': 'Retina'}
  " let g:gui_default_font_name = 'VictorMono Nerd Font'
  " let g:gui_default_font_opts = {'size': 14}
  let g:gui_default_font_name = 'Rec Mono Duotone'
  let g:gui_default_font_opts = {'size': 14}
  " let g:gui_default_font_name = 'M+ 1mn'
  " let g:gui_default_font_opts = {'size': 14}
elseif hostname() == 'freedombox'
  " For some reason it's 'ypn envypn' on Suse, but 'envypn' on Debian...
  let g:gui_default_font_name = 'Iosevka SS01'
  let g:gui_default_font_opts = {'size': 11, 'weight': 60}
elseif hostname() == 'freedom-slab'
  let g:gui_default_font_spec = 'envypn'
  let g:gui_default_font_opts = {'size': 8}
endif

call local#gui#set_font(g:gui_default_font_name, g:gui_default_font_opts)
" if exists(':Guifont')
"   execute 'Guifont! '.g:gui_default_font_spec
" elseif ! has('gui_vimr')
"   " VimR doesn't support 'guifont'
"   let &guifont = g:gui_default_font_spec
" endif

"command! -nargs=1 GuiFontsize call local#gui#fontsize_set(<f-args>)
"command! GuiFontsizeInc call local#gui#fontsize_inc()
"command! GuiFontsizeDec call local#gui#fontsize_dec()
" TODO:
"   Guifont h+=1
"   Guifont h-=1
"   Guifont h=114
" Figure out how GUI font stuff actually works in Neovim internally.

noremap <C-0> <cmd>call local#gui#fontsize_reset()<cr>
noremap <C-+> <cmd>call local#gui#fontsize_inc()<cr>
noremap <C--> <cmd>call local#gui#fontsize_dec()<cr>
" }}}

"" Extensions for clients that support the Neovim-QT GUI Shim interface {{{
" https://github.com/equalsraf/neovim-qt/blob/v0.2.16.1/src/gui/runtime/doc/nvim_gui_shim.txt
if local#getvar('g:GuiLoaded', 0)
  " Neovim-QT specific extensions
  if local#gui#nvim_gui_name() == 'nvim-qt'
    if local#gui#nvim_client_version_string() > '0.2.16'
      autocmd VimEnter * GuiAdaptiveColor 1
      autocmd VimEnter * GuiAdaptiveFont 1
      autocmd VimEnter * GuiAdaptiveStyle qt5ct-style
      GuiPopupmenu 1
      "GuiRenderLigatures 1
      GuiRenderLigatures 0
      GuiScrollBar 0
      GuiTabline 0
      nnoremap <rightmouse> <cmd>call GuiShowContextMenu()<cr>
      inoremap <rightmouse> <cmd>call GuiShowContextMenu()<cr>
      vnoremap <rightmouse> <cmd>call GuiShowContextMenu()<cr>
    endif
  endif
endif


" Toggle conceal
nnoremap [oL <cmd>GuiRenderLigatures 1<cr>
nnoremap ]oL <cmd>GuiRenderLigatures 0<cr>

" }}}

"" Appearance {{{
"colorscheme base16-atelier-estuary
"AirlineTheme base16_vim

"colorscheme ayu
"AirlineTheme ayu

"colorscheme srcery
"if exists(':AirlineTheme')
"  AirlineTheme srcery
"endif

function! s:patch_mountaineer_colors()
  let g:terminal_color_9  = '#EDAFCA'
  let g:terminal_color_10 = '#87E1B2'
  let g:terminal_color_11 = '#E9D771'
  let g:terminal_color_12 = '#98A7F0'
  let g:terminal_color_13 = '#E288F5'
  let g:terminal_color_14 = '#79E8E8'
endfunction

augroup GINIT
  autocmd!
  autocmd ColorScheme mountaineer call s:patch_mountaineer_colors()
augroup END

colorscheme mountaineer
AirlineTheme minimalist

let g:indentLine_char = '┊'
" }}}

" For debugging
let g:ginit_success = 1