From 7a853c9a5e967ca6cf1334e4020b731e713ea4af Mon Sep 17 00:00:00 2001 From: "Nicolas A. Ortega Froysa" Date: Fri, 7 Nov 2025 13:54:40 +0100 Subject: [PATCH 1/5] Set a scrolloff. --- init.vim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/init.vim b/init.vim index 528e4f9..3f8a880 100644 --- a/init.vim +++ b/init.vim @@ -48,6 +48,9 @@ set foldmethod=syntax "set foldlevel=0 "set foldnestmax=1 +" Scrolloff +set scrolloff=7 + " CoC settings inoremap \ coc#pum#visible() ? coc#pum#next(1) : From c503a456be249f0bd80b63d290a1abfdbc2cebb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Ortega=20Froysa?= Date: Thu, 13 Nov 2025 08:10:14 +0100 Subject: [PATCH 2/5] Enable parameter/snippet jumping. --- init.vim | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/init.vim b/init.vim index 3f8a880..7e4df94 100644 --- a/init.vim +++ b/init.vim @@ -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 \ coc#pum#visible() ? coc#pum#next(1) : + \ coc#expandableOrJumpable() ? "\=coc#snippet#next()\" : \ CheckBackspace() ? "\" : \ coc#refresh() -inoremap coc#pum#visible() ? coc#pum#prev(1) : "\" -"inoremap pumvisible() ? "\" : "\" -"inoremap pumvisible() ? "\" : "\" -nmap :CocAction +inoremap + \ coc#pum#visible() ? coc#pum#prev(1) : "\" + \ coc#expandableOrJumpable() ? "\=coc#snippet#prev()\" : + \ CheckBackspace() ? "\" : + \ coc#refresh() let g:coc_disable_startup_warning = 1 inoremap coc#pum#visible() ? coc#pum#confirm() \: "\u\\=coc#on_enter()\" -function! CheckBackspace() abort - let col = col('.') - 1 - return !col || getline('.')[col - 1] =~# '\s' -endfunction +let g:coc_snippet_next = '' +let g:coc_snippet_prev = '' func! s:my_colors_setup() abort " this is an example From 648c5320a74106cb06d611fbd0f0051eb4005950 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Ortega=20Froysa?= Date: Thu, 13 Nov 2025 08:11:47 +0100 Subject: [PATCH 3/5] Add temporary fix to CoC localstorage error. Found here: https://github.com/neoclide/coc.nvim/issues/5469 --- init.vim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/init.vim b/init.vim index 7e4df94..d7697da 100644 --- a/init.vim +++ b/init.vim @@ -90,6 +90,10 @@ nmap [g (coc-diagnostic-prev) nmap ]g (coc-diagnostic-next) nmap ]f (coc-fix-current) +" Temporary!!! Remove after CoC update +let storage_file = stdpath('data') . '/coc-localstorage' +let g:coc_node_args = ['--localstorage-file=' . storage_file] + " syntax highlighting syntax on set background=dark From f2379207141e1db099a75e24bf07011ffc341d07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Ortega=20Froysa?= Date: Thu, 13 Nov 2025 08:18:06 +0100 Subject: [PATCH 4/5] Add CoC renaming bind. --- init.vim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/init.vim b/init.vim index d7697da..4a12d15 100644 --- a/init.vim +++ b/init.vim @@ -90,6 +90,9 @@ nmap [g (coc-diagnostic-prev) nmap ]g (coc-diagnostic-next) nmap ]f (coc-fix-current) +" Symbol renaming +nmap rn (coc-rename) + " Temporary!!! Remove after CoC update let storage_file = stdpath('data') . '/coc-localstorage' let g:coc_node_args = ['--localstorage-file=' . storage_file] From 28c0e1cc0dab8a7110998d4504d46b5bee134fd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Ortega=20Froysa?= Date: Thu, 13 Nov 2025 08:20:10 +0100 Subject: [PATCH 5/5] Add CoC GoTo code navigation. --- init.vim | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/init.vim b/init.vim index 4a12d15..f105de3 100644 --- a/init.vim +++ b/init.vim @@ -93,6 +93,12 @@ nmap ]f (coc-fix-current) " Symbol renaming nmap rn (coc-rename) +" GoTo code navigation +nmap gd (coc-definition) +nmap gy (coc-type-definition) +nmap gi (coc-implementation) +nmap gr (coc-references) + " Temporary!!! Remove after CoC update let storage_file = stdpath('data') . '/coc-localstorage' let g:coc_node_args = ['--localstorage-file=' . storage_file]