" vim: ft=vim:fdm=marker:fdl=0:noml:
scriptencoding utf-8

if exists('g:neovide')
  set gfn=IosevkaTerm\ NFM:h15
  set linespace=0
  " see: https://neovide.dev/configuration.html
  "set keyprotocol=ghostty:kitty
  let g:neovide_cursor_antialiasing = v:true
  let g:neovide_fullscreen = v:false
  let g:neovide_show_border = v:false
  let g:neovide_floating_blur_amount_x = 2.0
  let g:neovide_floating_blur_amount_y = 2.0
  let g:neovide_input_macos_option_key_is_meta = 'both'
  "let g:neovide_remember_window_size = v:false
  let g:neovide_cursor_animate_command_line = v:false
  let g:neovide_cursor_animate_in_insert_mode = v:false
  let g:neovide_cursor_animation_length = 0.00
  let g:neovide_cursor_trail_size = 0
  let g:neovide_position_animation_length = 0
  let g:neovide_scroll_animation_far_lines = 0
  let g:neovide_scroll_animation_length = 0.2
endif

" &guioptions = 'agirtcMk'
if has('gui_running') || exists('g:fvim_loaded') || exists('g:neovide') || exists('g:nvui')
  " stop the cursor from blinking.
  set guicursor+=a:blinkon0
  " no system GUI clipboard
  "set guioptions-=a
  " use console dialogs, not popup windows
  set guioptions+=c
  " no menu.vim
  "set guioptions+=M
  " no menubar
  set guioptions-=m
  " no toolbar
  set guioptions-=T
  " scrollbar left-side
  set guioptions-=l
  set guioptions-=L
  " no scrollbar right-hand
  set guioptions-=r
  set guioptions-=R
  "set guitablabel=%M\ %t

  set mouse=
  " don't use mousewheel.
  map <ScrollWheelUp>      <Nop>
  map <S-ScrollWheelUp>    <Nop>
  map <C-ScrollWheelUp>    <Nop>
  map <ScrollWheelDown>    <Nop>
  map <S-ScrollWheelDown>  <Nop>
  map <C-ScrollWheelDown>  <Nop>
  map <ScrollWheelLeft>    <Nop>
  map <S-ScrollWheelLeft>  <Nop>
  map <C-ScrollWheelLeft>  <Nop>
  map <ScrollWheelRight>   <Nop>
  map <S-ScrollWheelRight> <Nop>
  map <C-ScrollWheelRight> <Nop>

  augroup _gvimrc
    autocmd!
    " gutter color default is annoying. make it blend in.
    autocmd ColorScheme * hi SignColumn guibg=NONE
    " FZF uses ctermfg for some colors.
    autocmd ColorScheme * hi Number ctermfg=7
    autocmd ColorScheme * hi Conditional ctermfg=7
    autocmd ColorScheme * hi Special ctermfg=7
  augroup END
endif
