-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.vim
110 lines (105 loc) · 3.36 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
set nocompatible
set number rnu
set expandtab shiftwidth=2 smarttab
set backspace=indent,eol,start
set incsearch
set mouse=a
set ruler
set hidden
set fillchars+=vert:\
syntax on
filetype plugin indent on
autocmd FileType text,tex,mail,markdown,rst setlocal spell
autocmd FileType text,tex,markdown,rst setlocal tw=76
autocmd FileType mail setlocal tw=0
autocmd FileType go setlocal noexpandtab tabstop=4 shiftwidth=4
autocmd FileType python setlocal shiftwidth=4
hi VertSplit ctermfg=235
hi Search cterm=NONE ctermfg=red ctermbg=lightyellow
if has('nvim')
autocmd TermOpen * setlocal nonumber nornu
endif
call plug#begin('~/.vim/plugged')
Plug 'junegunn/vim-plug'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'FStarLang/VimFStar', {'for': 'fstar'}
Plug 'tpope/vim-fugitive'
Plug 'airblade/vim-gitgutter'
Plug 'fatih/vim-go'
Plug 'junegunn/goyo.vim'
Plug 'elzr/vim-json'
Plug 'junegunn/limelight.vim'
Plug 'imsnif/kdl.vim'
Plug 'preservim/vim-markdown'
Plug 'preservim/nerdcommenter'
Plug 'digitaltoad/vim-pug'
Plug 'wlangstroth/vim-racket'
Plug 'rust-lang/rust.vim'
Plug 'cespare/vim-toml'
Plug 'leafgarland/typescript-vim'
Plug 'mbbill/undotree'
" Plug 'autozimu/LanguageClient-neovim', { 'branch': 'next', 'do': 'bash install.sh' }
Plug 'github/copilot.vim'
call plug#end()
" let g:LanguageClient_autoStart = 0
" let g:LanguageClient_serverCommands = {
" \ 'python': ['pyls'],
" \ 'rust': ['rls'],
" \ 'javascript': ['javascript-typescript-stdio'],
" \ 'typescript': ['javascript-typescript-stdio'],
" \ 'go': ['go-langserver'] }
" let g:LanguageClient_diagnosticsDisplay = {
" \ 1: {
" \ "name": "Error",
" \ "texthl": "ALEError",
" \ "signText": "E",
" \ "signTexthl": "ALEErrorSign",
" \ },
" \ 2: {
" \ "name": "Warning",
" \ "texthl": "ALEWarning",
" \ "signText": "W",
" \ "signTexthl": "ALEWarningSign",
" \ },
" \ 3: {
" \ "name": "Information",
" \ "texthl": "ALEInfo",
" \ "signText": "I",
" \ "signTexthl": "ALEInfoSign",
" \ },
" \ 4: {
" \ "name": "Hint",
" \ "texthl": "ALEInfo",
" \ "signText": "➤",
" \ "signTexthl": "ALEInfoSign",
" \ },
" \ }
noremap <silent> ,h :call LanguageClient_textDocument_hover()<CR>
noremap <silent> ,d :call LanguageClient_textDocument_definition()<CR>
noremap <silent> ,r :call LanguageClient_textDocument_references()<CR>
noremap <silent> ,n :call LanguageClient_textDocument_rename()<CR>
noremap <silent> ,s :call LanguageClient_textDocument_documentSymbol()<CR>
noremap <silent> ,! :LanguageClientStart<CR>
colorscheme lore
let g:airline_theme = "simple"
let g:go_fmt_command = "goimports"
let g:go_highlight_methods = 1
let g:go_highlight_operators = 1
let g:NERDSpaceDelims = 1
let g:rustfmt_autosave = 1
let g:vim_markdown_folding_disabled = 1
let g:limelight_conceal_ctermfg = 'darkgrey'
let g:goyo_width = '90%'
let g:goyo_height = '88%'
inoremap <S-Tab> <C-V><Tab>
noremap <C-e> $
command MyGoyo :Goyo | :Limelight!!
noremap = :MyGoyo<CR>
command M :w | :make
noremap M :M<CR>
noremap W :w<CR>
noremap <C-c> :call NERDComment(0, 'toggle')<CR>
vnoremap <C-c> :call NERDComment(1, 'minimal')<CR>
noremap <silent> ,u :UndotreeToggle<CR>
noremap T :.-1r !date -Idate<CR>