-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.vim
76 lines (65 loc) · 2.02 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
set termguicolors
call plug#begin('~/.config/nvim/plugins/')
Plug 'ItsTerm1n4l/spice.nvim'
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
Plug 'nvim-tree/nvim-web-devicons' " optional, for file icons
Plug 'norcalli/nvim-colorizer.lua'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'akinsho/bufferline.nvim'
Plug 'nvim-tree/nvim-tree.lua'
Plug 'lukas-reineke/indent-blankline.nvim'
Plug 'nvim-lualine/lualine.nvim'
Plug 'ItsTerm1n4l/spice.nvim'
Plug 'windwp/nvim-autopairs'
Plug 'windwp/nvim-ts-autotag'
call plug#end()
lua require('init')
set foldmethod=expr
set foldexpr=nvim_treesitter#foldexpr()
set nofoldenable
set cursorline
" Set colorscheme
colorscheme spice
set tabstop=4
set shiftwidth=4
set number
set numberwidth=2
filetype indent on
" Open nvim-tree
" NvimTreeOpen
" Keybinds
imap <C-s> <esc>:w<enter>i<Right>
imap <C-q> <esc>:q<enter>
map <C-q> <esc>:q<enter>
imap <C-\> <esc>:undo<enter>i<Right>
map <C-\> <esc>:undo<enter><Right>
imap <C-r> <esc>:redo<enter>i<Right>
map <C-t> <esc>:NvimTreeToggle<enter>
imap <C-t> <esc>:NvimTreeToggle<enter>i<Right>
nnoremap ; :
vnoremap ; :
set nowrap
" Various settings
command Tree NvimTreeToggle
"CoC settings
" use <tab> for trigger completion and navigate to the next complete item
function! CheckBackspace() abort
let col = col('.') - 1
return !col || getline('.')[col - 1] =~# '\s'
endfunction
inoremap <silent><expr> <Tab>
\ coc#pum#visible() ? coc#pum#next(1) :
\ CheckBackspace() ? "\<Tab>" :
\ coc#refresh()
let g:clipboard = {
\ 'name': 'WslClipboard',
\ 'copy': {
\ '+': 'clip.exe',
\ '*': 'clip.exe',
\ },
\ 'paste': {
\ '+': 'powershell.exe -c [Console]::Out.Write($(Get-Clipboard -Raw).tostring().replace("`r", ""))',
\ '*': 'powershell.exe -c [Console]::Out.Write($(Get-Clipboard -Raw).tostring().replace("`r", ""))',
\ },
\ 'cache_enabled': 0,
\ }