-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.vim.back
executable file
·162 lines (128 loc) · 3.89 KB
/
init.vim.back
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
call plug#begin('~/.vim/plugged')
Plug 'cohama/lexima.vim'
Plug 'nvim-lua/popup.nvim'
Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-telescope/telescope.nvim'
" Neovim Tree shitter
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
Plug 'nvim-treesitter/playground'
Plug 'JoosepAlviste/nvim-ts-context-commentstring', {'branch': 'main'}
Plug 'theHamsta/nvim-treesitter-pairs'
Plug 'windwp/nvim-ts-autotag', {'branch': 'main'}
Plug 'nvim-treesitter/nvim-treesitter-textobjects'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'vim-utils/vim-man'
Plug 'mbbill/undotree'
Plug 'vuciv/vim-bujo'
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-surround'
Plug 'tpope/vim-repeat'
Plug 'tpope/vim-commentary'
Plug 'skywind3000/vim-terminal-help'
Plug 'gruvbox-community/gruvbox'
Plug 'overcache/NeoSolarized'
Plug 'drewtempelmeyer/palenight.vim'
Plug 'sainnhe/gruvbox-material'
" Plug 'vim-airline/vim-airline'
Plug 'flazz/vim-colorschemes'
Plug 'vim-airline/vim-airline-themes'
Plug 'hardcoreplayers/oceanic-material'
Plug 'phanviet/vim-monokai-pro'
" Plug 'ryanoasis/vim-devicons'
Plug 'nvim-lualine/lualine.nvim'
" If you want to have icons in your statusline choose one of these
Plug 'kyazdani42/nvim-web-devicons'
Plug 'puremourning/vimspector'
call plug#end()
lua require("lqf")
" \ 'coc-tabnine',
" \ 'coc-vetur',
let g:coc_global_extensions=[
\ 'coc-json',
\ 'coc-tsserver',
\ 'coc-prettier',
\ 'coc-html',
\ 'coc-emmet',
\ 'coc-explorer',
\ 'coc-translator',
\ 'coc-eslint',
\ 'coc-snippets',
\ ]
let g:airline_powerline_fonts = 0
let g:airline#extensions#tabline#enabled = 0
if executable('rg')
let g:rg_derive_root='true'
endif
let loaded_matchparen = 1
let mapleader = " "
let g:netrw_browse_split = 2
let g:netrw_banner = 0
let g:netrw_winsize = 25
" Save & quit
noremap Q :q<CR>
noremap <A-s> :w<CR>
nnoremap <leader>f :s/<C-R>=expand("<cword>")<CR>/
" nnoremap <leader>pv :CocCommand explorer<CR>
nnoremap <leader>pv :CocCommand explorer<CR>
nnoremap <leader>pp :CocCommand explorer --position floating<CR>
nnoremap <Leader><CR> :so <C-R>=<SID>sourceInit()<CR><CR>
nnoremap <Leader>+ :vertical resize +5<CR>
nnoremap <Leader>- :vertical resize -5<CR>
nnoremap <Leader>rp :resize 100<CR>
nnoremap <Leader>ee oconsole.log()<esc>i
" coc-translator
nmap ts <Plug>(coc-translator-p)
function! s:sourceInit () abort
if empty($XDG_CONFIG_HOME)
return $HOME . '/.config/nvim/init.vim'
else
return $XDG_CONFIG_HOME . '/nvim/init.vim'
endif
endfunction
" inoremap <silent><expr> <C-space> coc#refresh()
" command! -nargs=0 Prettier :CocCommand prettier.formatFile
" command! -nargs=0 Eslint :CocCommand eslint.executeAutofix
" vim TODO
nmap <Leader>tu <Plug>BujoChecknormal
nmap <Leader>th <Plug>BujoAddnormal
let g:bujo#todo_file_path = $HOME . "/.cache/bujo"
" greatest remap ever
vnoremap <leader>p "_dP
" next greatest remap ever : asbjornHaland
nnoremap <leader>y "+y
vnoremap <leader>y "+y
nnoremap <leader>Y gg"+yG
nnoremap <leader>d "_d
vnoremap <leader>d "_d
" insert keymap like emacs {{
" inoremap <C-w> <C-[>diwa
inoremap <C-d> <Del>
inoremap <C-b> <Left>
inoremap <C-f> <Right>
inoremap <C-a> <Home>
inoremap <expr><C-e> pumvisible() ? "\<C-e>" : "\<End>"
" }}}
function s:exit_to_normal() abort
if &filetype ==# 'fzf'
return "\<Esc>"
endif
return "\<C-\>\<C-n>"
endfunction
tnoremap <expr> <Esc> <SID>exit_to_normal()
let g:tcomment#filetype#guess_vue = 0
let g:vimspector_enable_mappings = 'HUMAN'
augroup highlight_yank
autocmd!
autocmd TextYankPost * silent! lua require'vim.highlight'.on_yank({timeout = 40})
augroup END
augroup LQF autocmd!
autocmd BufWritePre * %s/\s\+$//e
augroup END
" Add `:Format` command to format current buffer.
command! -nargs=0 Format :call CocAction('format')
augroup fmt
autocmd!
autocmd BufWritePre * Format
augroup END
"
" autocmd CursorHold * silent call CocActionAsync('highlight')