1
0

Compare commits

...

13 Commits

2 changed files with 36 additions and 14 deletions

View File

@@ -8,6 +8,11 @@
"latex": {
"command": "/sbin/texlab",
"filetypes": [ "tex","bib","plaintex","context" ]
},
"golang": {
"command": "gopls",
"rootPatterns": ["go.mod"],
"filetypes": ["go"]
}
}
}

View File

@@ -48,24 +48,32 @@ set foldmethod=syntax
"set foldlevel=0
"set foldnestmax=1
" Scrolloff
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#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()
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>
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
@@ -82,11 +90,20 @@ 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
"colorscheme solarized8_dark
highlight Normal ctermbg=none
colorscheme solarized8_dark
""" Project-Specific Settings
@@ -139,5 +156,5 @@ let g:licenses_authors_name = 'Nicolás Ortega Froysa <nicolas@ortegas.org>'
let g:licenses_default_command = [ 'Affero' ]
" FZF
nnoremap <leader>f :FZF<CR>
nnoremap <leader>F :tabnew<CR>:FZF<CR>
nnoremap <leader>f :GFiles<CR>
nnoremap <leader>F :tabnew<CR>:GFiles<CR>