Compare commits
8 Commits
7242d257d0
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 2fc078fd3b | |||
| 7439b8f0a7 | |||
| 6ab3026ae1 | |||
| 28c0e1cc0d | |||
| f237920714 | |||
| 648c5320a7 | |||
| c503a456be | |||
| 7a853c9a5e |
@@ -9,11 +9,6 @@
|
||||
"command": "/sbin/texlab",
|
||||
"filetypes": [ "tex","bib","plaintex","context" ]
|
||||
},
|
||||
"bash": {
|
||||
"command": "bash-language-server",
|
||||
"args": ["start"],
|
||||
"filetypes": ["sh","bash"]
|
||||
},
|
||||
"golang": {
|
||||
"command": "gopls",
|
||||
"rootPatterns": ["go.mod"],
|
||||
|
||||
38
init.vim
38
init.vim
@@ -30,7 +30,7 @@ filetype plugin on
|
||||
" indentation
|
||||
set tabstop=4 " tabs only count for 4 spaces
|
||||
set shiftwidth=4 " when indenting use 4 spaces
|
||||
set expandtab " use tab characters
|
||||
set noexpandtab " use tab characters
|
||||
set autoindent
|
||||
|
||||
" view
|
||||
@@ -52,23 +52,28 @@ set foldmethod=syntax
|
||||
set scrolloff=7
|
||||
|
||||
" CoC settings
|
||||
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()
|
||||
inoremap <expr><S-TAB> coc#pum#visible() ? coc#pum#prev(1) : "\<C-h>"
|
||||
"inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
|
||||
"inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
|
||||
nmap <C-a> :CocAction<CR>
|
||||
\ coc#pum#visible() ? coc#pum#next(1) :
|
||||
\ CheckBackspace() ? "\<Tab>" :
|
||||
\ coc#expandableOrJumpable() ? "\<C-r>=coc#snippet#next()\<CR>" :
|
||||
\ coc#refresh()
|
||||
inoremap <silent><expr> <S-TAB>
|
||||
\ coc#pum#visible() ? coc#pum#prev(1) :
|
||||
\ CheckBackspace() ? "\<S-Tab>" :
|
||||
\ coc#expandableOrJumpable() ? "\<C-r>=coc#snippet#prev()\<CR>" :
|
||||
\ coc#refresh()
|
||||
let g:coc_disable_startup_warning = 1
|
||||
|
||||
inoremap <silent><expr> <CR> coc#pum#visible() ? coc#pum#confirm()
|
||||
\: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
|
||||
|
||||
function! CheckBackspace() abort
|
||||
let col = col('.') - 1
|
||||
return !col || getline('.')[col - 1] =~# '\s'
|
||||
endfunction
|
||||
let g:coc_snippet_next = '<Tab>'
|
||||
let g:coc_snippet_prev = '<S-Tab>'
|
||||
|
||||
func! s:my_colors_setup() abort
|
||||
" this is an example
|
||||
@@ -85,6 +90,15 @@ nmap <silent> [g <Plug>(coc-diagnostic-prev)
|
||||
nmap <silent> ]g <Plug>(coc-diagnostic-next)
|
||||
nmap <silent> ]f <Plug>(coc-fix-current)
|
||||
|
||||
" Symbol renaming
|
||||
nmap <leader>rn <Plug>(coc-rename)
|
||||
|
||||
" GoTo code navigation
|
||||
nmap <silent><nowait> gd <Plug>(coc-definition)
|
||||
nmap <silent><nowait> gy <Plug>(coc-type-definition)
|
||||
nmap <silent><nowait> gi <Plug>(coc-implementation)
|
||||
nmap <silent><nowait> gr <Plug>(coc-references)
|
||||
|
||||
" syntax highlighting
|
||||
syntax on
|
||||
set background=dark
|
||||
|
||||
Reference in New Issue
Block a user