From 6876de02c974a6d94704487dbbb80e6b1baa6684 Mon Sep 17 00:00:00 2001 From: Szwendacz99 Date: Fri, 7 Oct 2022 10:12:37 +0200 Subject: [PATCH] add more settings to coc --- init.vim | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/init.vim b/init.vim index 9c648d3..748d943 100644 --- a/init.vim +++ b/init.vim @@ -67,8 +67,6 @@ if has('nvim-0.4.0') || has('patch-8.2.0750') vnoremap coc#float#has_scroll() ? coc#float#scroll(0) : "\" endif -" Run the Code Lens action on the current line. -nmap cl (coc-codelens-action) " Find files using Telescope command-line sugar. nnoremap ff Telescope find_files @@ -76,6 +74,34 @@ nnoremap fg Telescope live_grep nnoremap fb Telescope buffers nnoremap fh Telescope help_tags +" config for coc#pum#visible + +" Some servers have issues with backup files, see #649. +set nobackup +set nowritebackup + +" Having longer updatetime (default is 4000 ms = 4 s) leads to noticeable +" delays and poor user experience. +set updatetime=300 + +" Always show the signcolumn, otherwise it would shift the text each time +" diagnostics appear/become resolved. +set signcolumn=yes + + +" Symbol renaming. +nmap rn (coc-rename) + +" Formatting selected code. +xmap f (coc-format-selected) +nmap f (coc-format-selected) + +" GoTo code navigation. +nmap gd (coc-definition) +nmap gy (coc-type-definition) +nmap gi (coc-implementation) +nmap gr (coc-references) + " Use tab for trigger completion with characters ahead and navigate. " NOTE: There's always complete item selected by default, you may want to enable " no select by `"suggest.noselect": true` in your configuration file.