-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.vim
96 lines (78 loc) · 3.91 KB
/
init.vim
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
" ==================================================================
"
" init.vim. The Newer Version From
" Scratch.
"
" Amir Reza Sadeghi
" Email:: www.e.a.sadeqi@gmail.com
"
"===================================================================
" I have ported most of my settings to lua. Note that some settings like 'au'
" and highlighting have not proper lua interface yet, so I use init.vim for
" them.
lua require('impatient').enable_profile() -- keep it near the start, as lewis did.
" I found the bellow command from the following link:
" 'https://github.com/junegunn/fzf.vim/issues/251#issuecomment-769787221'
" using this we can have option to open/cd to a directory with fzf, so we can
" have a workflow like vscode that we run vscode from gui and open a directory
" as workspace and continue to work. I have created a mapping for it inside of
" telescope mappings section. Note:use ! sign to get from root directories
" otherwise uses the current working directory as base.
command! -bang -bar -nargs=? -complete=dir Cd
\ call fzf#run(fzf#wrap(
\ {'source': 'find '.( empty("<args>") ? ( <bang>0 ? "~" : "." ) : "<args>" ) .' -type d',
\ 'sink': 'cd'}))
" Define a variable to choose between coc and builtin neovim lsp.
" valid values are "coc" and "nvim_lsp".
let g:wlsp = "nvim_lsp"
" Define a variable to choose between general and neovim-specfic sumneko lsp
" configs. valid values are "general" and "neovim".
let g:wlua = "neovim"
" Define a flag to specify the diagnostic source in lualine. Valid values are
" 'coc', 'nvim_diagnostic', 'nvim_lsp'. Note that nvim_lsp is deprecated in
" favour of nvim_diagnostic, so I just mentioned it for comprehension.
let g:wdig = "nvim_diagnostic"
" source configurations from lua files
lua require('init')
" source vimscript files for configuration of specific plugins
if g:wlsp == "coc" " if using coc source this file
source ~/.config/nvim/vim_scripts/coc_configs.vim
endif
" source ~/.config/nvim/vim_scripts/tagbar_configs.vim
" to cache the packer_compiled(I don't know for what we need to cache this):
" lua require('packer_compiled')
"====================================================================
" Here is the configs from the plugins that I used before porting of con-
" figs to lua and now I use other plugins instead of them. So I just hold
" them here for completness and emeregency situations.
"====================================================================
"====================================================================
" airline theme config
"====================================================================
" let g:airline_theme='dracula'
" let g:airline#extensions#tabline#enabled = 1
"====================================================================
" NerdTree configs
"====================================================================
"some mappings
" nnoremap <leader>n : NERDTreeToggle<CR>
" let g:NERDTreeMinimalUI = 1 " Hide help text
""====================================================================
" fzf configs
"====================================================================
" Bellow Lines are for fzf.vim plugin
" let g:fzf_command_prefix = 'Fz'
" nnoremap <C-p> : FzFiles<Cr>
" nnoremap <leader>fb :FzBuffers<CR>
" nnoremap <leader>fw :FzWindows<CR>
" nnoremap <leader>flt :FzBTags<CR>
" nnoremap <leader>ft :FzTags<CR>
" nnoremap <leader>fh :FzHistory<CR>
" coc-fzf-preview settings
"####################################################################
" cxx-highlight
"####################################################################
"let g:lsp_cxx_hl_use_text_props = 1
"###################################################################
" The End
"###################################################################