This repository has been archived by the owner on Jun 4, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.vim
197 lines (147 loc) · 3.96 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
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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
call plug#begin('~/.config/nvim/plugged')
" LSP configurations
Plug 'neovim/nvim-lspconfig'
Plug 'hrsh7th/vim-vsnip'
Plug 'hrsh7th/cmp-nvim-lsp'
Plug 'hrsh7th/cmp-buffer'
Plug 'hrsh7th/nvim-cmp'
Plug 'onsails/lspkind-nvim'
" treesitter
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
" git
Plug 'tpope/vim-fugitive'
Plug 'airblade/vim-gitgutter'
Plug 'APZelos/blamer.nvim'
" db
Plug 'tpope/vim-dadbod'
" indentlines
Plug 'Yggdroot/indentLine'
" trailing whitespace
Plug 'bronson/vim-trailing-whitespace'
" Filer
Plug 'lambdalisue/fern.vim'
Plug 'lambdalisue/nerdfont.vim'
Plug 'lambdalisue/fern-renderer-nerdfont.vim'
Plug 'lambdalisue/fern-git-status.vim'
Plug 'lambdalisue/glyph-palette.vim'
" telescope
Plug 'nvim-lua/popup.nvim'
Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-telescope/telescope.nvim'
" php
Plug 'stephpy/vim-php-cs-fixer'
" markdown
Plug 'plasticboy/vim-markdown'
" javascript
Plug 'pangloss/vim-javascript'
" typescript
Plug 'leafgarland/typescript-vim'
" vue
Plug 'posva/vim-vue'
Plug 'Shougo/context_filetype.vim'
" styled components
Plug 'styled-components/vim-styled-components'
" sass
Plug 'cakebaker/scss-syntax.vim'
" twig
Plug 'nelsyeung/twig.vim'
" blade
Plug 'jwalton512/vim-blade'
" pug
Plug 'digitaltoad/vim-pug'
" comment out
Plug 'tyru/caw.vim'
" auto pair
Plug 'jiangmiao/auto-pairs'
" emmet
Plug 'mattn/emmet-vim'
" istanbul
Plug 'retorillo/istanbul.vim'
" testing speed of thought
Plug 'janko/vim-test'
" theme
Plug 'EdenEast/nightfox.nvim'
" status line
Plug 'itchyny/lightline.vim'
" jsx
Plug 'leafgarland/typescript-vim'
Plug 'peitalin/vim-jsx-typescript'
" arduino
Plug 'sudar/vim-arduino-syntax'
" qml
Plug 'peterhoeg/vim-qml'
call plug#end()
" LSP
lua require'pippi/lsp'()
lua require'pippi/telescope'()
" treesitter
lua require'nvim-treesitter.configs'.setup { highlight = { enable = true } }
" git
set updatetime=400
let g:gitgutter_map_keys = 0
let g:gitgutter_signs = 0
let g:blamer_delay = 400
nnoremap <silent> <leader>hh :GitGutterLineHighlightsToggle<cr>
nnoremap <silent> <leader>hh :GitGutterLineHighlightsToggle<cr>
nnoremap <silent> <leader>hp :GitGutterPreviewHunk<cr>
nnoremap <silent> <leader>hs :GitGutterStageHunk<cr>
nnoremap <silent> <leader>hu :GitGutterUndoHunk<cr>
nnoremap <silent> [h :GitGutterPrevHunk<cr>
nnoremap <silent> ]h :GitGutterNextHunk<cr>
nnoremap <silent> <leader>b :BlamerToggle<cr>
" test
let g:test#php#phpunit#executable = './vendor/bin/phpunit'
nnoremap <silent> <leader>tf :TestFile<cr>
nnoremap <silent> <leader>tn :TestNearest<cr>
nnoremap <silent> <leader>tt :TestSuite<cr>
nnoremap <silent> <leader>tl :TestLast<cr>
nnoremap <silent> <leader>tv :TestVisit<cr>
" php
nnoremap <silent> <leader>pcd :call PhpCsFixerFixDirectory()<cr>
nnoremap <silent> <leader>pcf :call PhpCsFixerFixFile()<cr>
" indentlines
let g:indentLine_enabled = 0
" markdown
let g:vim_markdown_folding_disabled = 1
" lightline
function! BlamerEnabled()
return g:blamer_enabled ? 'Blame!' : ''
endfunction
function! GitgutterEnabled()
return g:gitgutter_highlight_lines ? 'Gitgutter' : ''
endfunction
let g:lightline = {
\ 'active': {'left': [['mode', 'paste'],['gitbranch','readonly','filename','modified','blamer','gitgutter']]},
\ 'component_function': {
\ 'gitbranch': 'FugitiveHead',
\ 'blamer': 'BlamerEnabled',
\ 'gitgutter': 'GitgutterEnabled'
\ }
\}
" vue
au FileType vue syntax sync fromstart
let g:vue_pre_processors = ['pug', 'typescript']
" filer
nnoremap <silent> <leader>r :Fern .<cr>
nnoremap <silent> - :Fern . -reveal=%:p<cr>
let g:fern#renderer = 'nerdfont'
"
augroup my-glyph-palette
autocmd! *
autocmd FileType fern call glyph_palette#apply()
autocmd FileType nerdtree,startify call glyph_palette#apply()
augroup END
" theme
lua require'nightfox'.setup({ options = { transparent = true } })
colorscheme nightfox
let g:vimsyn_embed='lPr'
set hidden
set noea
set noswapfile
set expandtab
set tabstop=4
set shiftwidth=4
set softtabstop=4
set number
set list
set listchars=tab:>-