add os detect function

This commit is contained in:
Nachuan Tang
2023-02-15 23:59:16 -05:00
parent a9efbe46f6
commit dd7c1d8903
4 changed files with 23 additions and 4 deletions
+6 -3
View File
@@ -312,7 +312,7 @@ endfunction
endfunction
call airline#parts#define_function('bufnum', 'BufferNumber')
let g:airline_extensions = ['bufferline', 'filetype']
let g:airline_extensions = ['bufferline']
let g:airline_section_x = airline#section#create(['bufnum'])
let g:airline_section_y = ''
let g:airline_section_z = airline#section#create(['filetype'])
@@ -355,7 +355,11 @@ endfunction
" - Preview window on the right with 50% width
" - CTRL-/ will toggle preview window.
let g:fzf_preview_window = ['right:50%', 'ctrl-/']
if g:os == 'Windows'
let g:fzf_preview_window = []
else
let g:fzf_preview_window = ['right:50%', 'ctrl-/']
end
" check if ripgrep is installed
@@ -373,7 +377,6 @@ endfunction
if HasPlug("coc.nvim") && executable('node')
" add desired extensions to the following global variable
" coc-clangd: c/c++, may need to install clangd seperatly
let g:coc_global_extensions = ['coc-pyright', 'coc-rls', 'coc-clangd', 'coc-tsserver', 'coc-html', 'coc-cmake', 'coc-json', 'coc-sh', 'coc-java']
if filereadable(g:mydotfiles_directory . "/coc-nvim-config.vim")
exec "source " . g:mydotfiles_directory . "/coc-nvim-config.vim"