robin/ivy
my custom neovim config
git clone https://git.robinwobin.dev/robin/ivy
082b337
main
1if not vim . g . neovide then 2return 3end 4 5-- background -- 6vim . g . neovide_opacity =1.0 7 8local neovide_alpha =function () 9return string . format ( "%x" , math . floor ( 255 * ( vim . g . transparency or 0.8 ))) 10end 11 12if vim . uv . os_uname (). sysname == "Darwin" then 13vim . g . neovide_normal_opacity =0.6 14-- options only currently available on macOS 15vim . g . neovide_window_blurred =true 16else 17-- helper function for transparency formatting 18vim . g . neovide_normal_opacity =0.9 19end 20 21vim . once . ColorScheme ( function () 22local normal =vim . api . nvim_get_hl ( 0 , { name ="Normal" } ) or { bg =0 , fg =0 } 23local bg =normal . bg and string . format ( "%x" , normal . bg ) 24local fg =normal . fg and string . format ( "%x" , normal . fg ) 25if bg then 26vim . g . neovide_background_color =bg .. neovide_alpha () 27vim . g . neovide_title_background_color =bg 28end 29if fg then 30vim . g . neovide_title_text_color =fg 31end 32end ) 33 34-- font & cursor -- 35 36vim . g . fontsize =12 37vim . opt . guifont ={ 38"Maple Mono" , 39"Symbols Nerd Font" , 40string . format ( ":h%d" , vim . g . fontsize ), 41} 42vim . g . lineheight =1.2 43 44vim . opt . linespace =math . floor (( vim . g . lineheight - 1 ) * vim . g . fontsize ) 45 46vim . g . neovide_cursor_smooth_blink =true 47 48-- behavior -- 49vim . g . neovide_detach_on_quit ="always_detach" 50 51vim . keymap . set ( "n" , "<m-enter>" , function () 52vim . g . neovide_fullscreen =not vim . g . neovide_fullscreen 53if vim . g . neovide_fullscreen then 54vim . notify ( "enabling fullscreen" ) 55else 56vim . notify ( "disabling fullscreen" ) 57end 58end , { silent =true } )