neoclide / coc.nvim

Nodejs extension host for vim & neovim, load extensions like VSCode and host language servers.
Other
24.31k stars 954 forks source link

macOs 12.4 the newest neovim #4029

Closed jiadsii closed 2 years ago

jiadsii commented 2 years ago

Result from CocInfo

Describe the bug

when i open it and it starts to show it.

image

and when i use it , but word not appear, just change a line

image image

Reproduce the bug

We will close your issue when you don't provide minimal vimrc and we can't reproduce it

let g:nvim_plugins_installation_completed=1 if empty(glob($HOME.'/.config/nvim/plugged/wildfire.vim/autoload/wildfire.vim')) let g:nvim_plugins_installation_completed=0 autocmd VimEnter * PlugInstall --sync | source $MYVIMRC endif

" Create a _machine_specific.vim file to adjust machine specific stuff, like python interpreter location let has_machine_specific_file = 1 if empty(glob('~/.config/nvim/_machine_specific.vim')) let has_machine_specific_file = 0 silent! exec "!cp ~/.config/nvim/default_configs/_machine_specific_default.vim ~/.config/nvim/_machine_specific.vim" endif source $HOME/.config/nvim/_machine_specific.vim

" ==================== Editor behavior ==================== "set clipboard=unnamedplus let &t_ut='' set autochdir set exrc set secure set number set relativenumber set cursorline set noexpandtab set tabstop=2 set shiftwidth=2 set softtabstop=2 set autoindent set list set listchars=tab:|\ ,trail:▫ set scrolloff=4 set ttimeoutlen=0 set notimeout set viewoptions=cursor,folds,slash,unix set wrap set tw=0 set indentexpr= set foldmethod=indent set foldlevel=99 set foldenable set formatoptions-=tc set splitright set splitbelow set noshowmode set ignorecase set smartcase set shortmess+=c set inccommand=split set completeopt=longest,noinsert,menuone,noselect,preview set lazyredraw set visualbell silent !mkdir -p $HOME/.config/nvim/tmp/backup silent !mkdir -p $HOME/.config/nvim/tmp/undo "silent !mkdir -p $HOME/.config/nvim/tmp/sessions set backupdir=$HOME/.config/nvim/tmp/backup,. set directory=$HOME/.config/nvim/tmp/backup,. if has('persistent_undo') set undofile set undodir=$HOME/.config/nvim/tmp/undo,. endif set colorcolumn=100 set updatetime=100 set virtualedit=block

au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif

" ==================== Terminal Behaviors ==================== let g:neoterm_autoscroll = 1 autocmd TermOpen term://* startinsert tnoremap <C-> tnoremap <C->

" ==================== Basic Mappings ==================== let mapleader=" " noremap ; : nnoremap Q :q nnoremap S :w " Open the vimrc file anytime nnoremap rc :e $HOME/.config/nvim/init.vim nnoremap rv :e .nvimrc augroup NVIMRC autocmd! autocmd BufWritePost .nvimrc exec ":so %" augroup END " Undo operations noremap l u " Insert Key noremap k i noremap K I " Copy to system clipboard vnoremap Y "+y " Find pair noremap ,. % vnoremap ki $% " Search noremap :nohlsearch " Adjacent duplicate words noremap dw /(\<\w+>)_s\1 " Space to Tab nnoremap tt :%s/ /\t/g vnoremap tt :s/ /\t/g " Folding noremap o za

" ==================== Cursor Movement ==================== " New cursor movement (the default arrow keys are used for resizing windows) " ^ " u " < n i > " e " v noremap u k noremap n h noremap e j noremap i l noremap gu gk noremap ge gj noremap \v v$h " U/E keys for 5 times u/e (faster navigation) noremap U 5k noremap E 5j " N key: go to the start of the line noremap N 0 " I key: go to the end of the line noremap I $ " Faster in-line navigation noremap W 5w noremap B 5b " set h (same as n, cursor left) to 'end of word' noremap h e " Ctrl + U or E will move up/down the view port without moving the cursor noremap 5 noremap 5 " Custom cursor movement source $HOME/.config/nvim/cursor.vim " If you use Qwerty keyboard, uncomment the next line. " source $HOME/nvim/cursor_for_qwerty.vim

" ==================== Insert Mode Cursor Movement ==================== inoremap A

" ==================== Command Mode Cursor Movement ==================== cnoremap cnoremap cnoremap cnoremap cnoremap cnoremap cnoremap cnoremap

" ==================== Window management ==================== " Use + new arrow keys for moving the cursor around windows noremap w w noremap u k noremap e j noremap n h noremap i l noremap qf o " Disable the default s key noremap s " split the screens to up (horizontal), down (horizontal), left (vertical), right (vertical) noremap su :set nosplitbelow:split:set splitbelow noremap se :set splitbelow:split noremap sn :set nosplitright:vsplit:set splitright noremap si :set splitright:vsplit " Resize splits with arrow keys noremap :res +5 noremap :res -5 noremap :vertical resize-5 noremap :vertical resize+5 " Place the two screens up and down noremap sh tK " Place the two screens side by side noremap sv tH " Rotate screens noremap srh bK noremap srv bH " Press + q to close the window below the current window noremap q j:q

" ==================== Tab management ==================== " Create a new tab with tu noremap tu :tabe noremap tU :tab split " Move around tabs with tn and ti noremap tn :-tabnext noremap ti :+tabnext " Move the tabs with tmn and tmi noremap tmn :-tabmove noremap tmi :+tabmove

" ==================== Markdown Settings ==================== " Snippets source $HOME/.config/nvim/md-snippets.vim " auto spell autocmd BufRead,BufNewFile *.md setlocal spell

" ==================== Other useful stuff ==================== " Open a new instance of st with the cwd nnoremap \t :tabe:-tabmove:term sh -c 'st'<C->:q " Opening a terminal window noremap / :set splitbelow:split:res +10:term " Press space twice to jump to the next '<++>' and edit it noremap /<++>:nohlsearchc4l " Spelling Check with sc noremap sc :set spell! " Press to change case (instead of ~) noremap ~ noremap zz " Auto change directory to current dir autocmd BufEnter * silent! lcd %:p:h " Call figlet noremap tx :r !figlet " find and replace noremap \s :%s//g " set wrap noremap sw :set wrap " press f10 to show hlgroup function! SynGroup() let l:s = synID(line('.'), col('.'), 1) echo synIDattr(l:s, 'name') . ' -> ' . synIDattr(synIDtrans(l:s), 'name') endfun map :call SynGroup()

" Compile function noremap r :call CompileRunGcc() func! CompileRunGcc() exec "w" if &filetype == 'c' set splitbelow :sp :res -5 term gcc % -o %< && time ./%< elseif &filetype == 'cpp' set splitbelow exec "!g++ -std=c++11 % -Wall -o %<" :sp :res -15 :term ./%< elseif &filetype == 'cs' set splitbelow silent! exec "!mcs %" :sp :res -5 :term mono %<.exe elseif &filetype == 'java' set splitbelow :sp :res -5 term javac % && time java %< elseif &filetype == 'sh' :!time bash % elseif &filetype == 'python' set splitbelow :sp :term python3 % elseif &filetype == 'html' silent! exec "!".g:mkdp_browser." % &" elseif &filetype == 'markdown' exec "InstantMarkdownPreview" elseif &filetype == 'tex' silent! exec "VimtexStop" silent! exec "VimtexCompile" elseif &filetype == 'dart' exec "CocCommand flutter.run -d ".g:flutter_default_device." ".g:flutter_run_args silent! exec "CocCommand flutter.dev.openDevLog" elseif &filetype == 'javascript' set splitbelow :sp :term export DEBUG="INFO,ERROR,WARNING"; node --trace-warnings . elseif &filetype == 'racket' set splitbelow :sp :res -5 term racket % elseif &filetype == 'go' set splitbelow :sp :term go run . endif endfunc

" ==================== Install Plugins with Vim-Plug ==================== call plug#begin('$HOME/.config/nvim/plugged')

" Github Copilot Plug 'github/copilot.vim'

" Treesitter Plug 'nvim-treesitter/nvim-treesitter' Plug 'nvim-treesitter/playground'

" Pretty Dress Plug 'theniceboy/nvim-deus' "Plug 'arzg/vim-colors-xcode'

" Status line Plug 'theniceboy/eleline.vim', { 'branch': 'no-scrollbar' }

" General Highlighter Plug 'RRethy/vim-hexokinase', { 'do': 'make hexokinase' } Plug 'RRethy/vim-illuminate'

" File navigation Plug 'ibhagwan/fzf-lua' Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } Plug 'junegunn/fzf.vim' Plug 'kevinhwang91/rnvimr' Plug 'airblade/vim-rooter' Plug 'pechorin/any-jump.vim'

" Debugger " Plug 'puremourning/vimspector', {'do': './install_gadget.py --enable-c --enable-python --enable-go'}

" Auto Complete Plug 'neoclide/coc.nvim', {'branch': 'release'} " Plug 'neoclide/coc.nvim', {'branch': 'release', 'tag': 'v0.0.79'} Plug 'wellle/tmux-complete.vim'

" Snippets " Plug 'SirVer/ultisnips' Plug 'theniceboy/vim-snippets'

" Undo Tree Plug 'mbbill/undotree'

" Git Plug 'theniceboy/vim-gitignore', { 'for': ['gitignore', 'vim-plug'] } Plug 'theniceboy/fzf-gitignore', { 'do': ':UpdateRemotePlugins' } "Plug 'mhinz/vim-signify' Plug 'airblade/vim-gitgutter' Plug 'cohama/agit.vim' Plug 'kdheepak/lazygit.nvim'

" Tex " Plug 'lervag/vimtex'

" CSharp Plug 'OmniSharp/omnisharp-vim' Plug 'ctrlpvim/ctrlp.vim' , { 'for': ['cs', 'vim-plug'] } " omnisharp-vim dependency

" HTML, CSS, JavaScript, Typescript, PHP, JSON, etc. Plug 'elzr/vim-json' Plug 'neoclide/jsonc.vim' Plug 'othree/html5.vim' Plug 'alvan/vim-closetag' " Plug 'hail2u/vim-css3-syntax' " , { 'for': ['vim-plug', 'php', 'html', 'javascript', 'css', 'less'] } " Plug 'spf13/PIV', { 'for' :['php', 'vim-plug'] } " Plug 'pangloss/vim-javascript', { 'for': ['vim-plug', 'php', 'html', 'javascript', 'css', 'less'] } Plug 'yuezk/vim-js', { 'for': ['vim-plug', 'php', 'html', 'javascript', 'css', 'less'] } " Plug 'MaxMEllon/vim-jsx-pretty', { 'for': ['vim-plug', 'php', 'html', 'javascript', 'css', 'less'] } " Plug 'jelera/vim-javascript-syntax', { 'for': ['vim-plug', 'php', 'html', 'javascript', 'css', 'less'] } "Plug 'jaxbot/browserlink.vim' Plug 'HerringtonDarkholme/yats.vim' " Plug 'posva/vim-vue' " Plug 'evanleck/vim-svelte', {'branch': 'main'} " Plug 'leafOfTree/vim-svelte-plugin' " Plug 'leafgarland/typescript-vim' Plug 'MaxMEllon/vim-jsx-pretty' Plug 'pangloss/vim-javascript' Plug 'leafgarland/typescript-vim' Plug 'peitalin/vim-jsx-typescript' Plug 'styled-components/vim-styled-components', { 'branch': 'main' } Plug 'pantharshit00/vim-prisma'

" Go Plug 'fatih/vim-go' , { 'for': ['go', 'vim-plug'], 'tag': '*' }

" Python Plug 'Vimjas/vim-python-pep8-indent', { 'for' :['python', 'vim-plug'] } Plug 'numirias/semshi', { 'do': ':UpdateRemotePlugins', 'for' :['python', 'vim-plug'] } Plug 'tweekmonster/braceless.vim', { 'for' :['python', 'vim-plug'] } "Plug 'vim-scripts/indentpython.vim', { 'for' :['python', 'vim-plug'] } "Plug 'plytophogy/vim-virtualenv', { 'for' :['python', 'vim-plug'] } "Plug 'tmhedberg/SimpylFold', { 'for' :['python', 'vim-plug'] }

" Flutter Plug 'dart-lang/dart-vim-plugin'

" Swift Plug 'keith/swift.vim' Plug 'arzg/vim-swift'

" Markdown Plug 'suan/vim-instant-markdown', {'for': 'markdown'} Plug 'dhruvasagar/vim-table-mode', { 'on': 'TableModeToggle', 'for': ['text', 'markdown', 'vim-plug'] } Plug 'mzlogin/vim-markdown-toc', { 'for': ['gitignore', 'markdown', 'vim-plug'] } Plug 'dkarter/bullets.vim'

" Other filetypes Plug 'wlangstroth/vim-racket' " Plug 'jceb/vim-orgmode', {'for': ['vim-plug', 'org']}

" Editor Enhancement Plug 'petertriho/nvim-scrollbar' Plug 'kevinhwang91/nvim-hlslens' Plug 'ggandor/lightspeed.nvim' "Plug 'Raimondi/delimitMate' Plug 'jiangmiao/auto-pairs' Plug 'mg979/vim-visual-multi' Plug 'tomtom/tcomment_vim' " in cn to comment a line Plug 'theniceboy/antovim' " gs to switch Plug 'tpope/vim-surround' " type yskw' to wrap the word with '' or type cs'to change 'word' toword` Plug 'gcmt/wildfire.vim' " in Visual mode, type k' to select all text in '', or type k) k] k} kp Plug 'junegunn/vim-after-object' " da= to delete what's after = Plug 'godlygeek/tabular' " ga, or :Tabularize to align Plug 'tpope/vim-capslock' " Ctrl+L (insert) to toggle capslock " Plug 'Konfekt/FastFold' "Plug 'junegunn/vim-peekaboo' "Plug 'wellle/context.vim' Plug 'svermeulen/vim-subversive' Plug 'theniceboy/argtextobj.vim' Plug 'rhysd/clever-f.vim' Plug 'AndrewRadev/splitjoin.vim' Plug 'theniceboy/pair-maker.vim' Plug 'theniceboy/vim-move' " Plug 'jeffkreeftmeijer/vim-numbertoggle' Plug 'Yggdroot/indentLine'

" For general writing Plug 'junegunn/goyo.vim' Plug 'reedes/vim-wordy' "Plug 'ron89/thesaurus_query.vim'

" Bookmarks " Plug 'MattesGroeger/vim-bookmarks'

" Find & Replace Plug 'nvim-lua/plenary.nvim' " nvim-spectre dep Plug 'nvim-pack/nvim-spectre'

" Documentation " Plug 'KabbAmine/zeavim.vim' " z to find doc

" Mini Vim-APP "Plug 'jceb/vim-orgmode' "Plug 'mhinz/vim-startify' Plug 'skywind3000/asynctasks.vim' Plug 'skywind3000/asyncrun.vim'

" Vim Applications Plug 'itchyny/calendar.vim'

" Other visual enhancement Plug 'luochen1990/rainbow' Plug 'mg979/vim-xtabline' Plug 'ryanoasis/vim-devicons' Plug 'wincent/terminus' Plug 'kyazdani42/nvim-web-devicons'

" Other useful utilities Plug 'lambdalisue/suda.vim' " do stuff like :sudowrite " Plug 'makerj/vim-pdf'

call plug#end()

set re=0

" ==================== Dress up my vim ==================== set termguicolors " enable true colors support let $NVIM_TUI_ENABLE_TRUE_COLOR=1 silent! color deus

hi NonText ctermfg=gray guifg=grey10 "hi SpecialKey ctermfg=blue guifg=grey70

" ==================== eleline.vim ==================== let g:airline_powerline_fonts = 0

" ==================== GitGutter ==================== " let g:gitgutter_signs = 0 let g:gitgutter_sign_allow_clobber = 0 let g:gitgutter_map_keys = 0 let g:gitgutter_override_sign_column_highlight = 0 let g:gitgutter_preview_win_floating = 1 let g:gitgutter_sign_added = '▎' let g:gitgutter_sign_modified = '░' let g:gitgutter_sign_removed = '▏' let g:gitgutter_sign_removed_first_line = '▔' let g:gitgutter_sign_modified_removed = '▒' nnoremap gf :GitGutterFold nnoremap H :GitGutterPreviewHunk nnoremap g- :GitGutterPrevHunk nnoremap g= :GitGutterNextHunk

" ==================== coc.nvim ==================== let g:coc_global_extensions = [ \ 'coc-css', \ 'coc-diagnostic', \ 'coc-docker', \ 'coc-eslint', \ 'coc-explorer', \ 'coc-flutter-tools', \ 'coc-gitignore', \ 'coc-html', \ 'coc-import-cost', \ 'coc-java', \ 'coc-jest', \ 'coc-json', \ 'coc-lists', \ 'coc-omnisharp', \ 'coc-prettier', \ 'coc-prisma', \ 'coc-pyright', \ 'coc-snippets', \ 'coc-sourcekit', \ 'coc-stylelint', \ 'coc-syntax', \ 'https://github.com/theniceboy/coc-tailwindcss', \ 'coc-tasks', \ 'coc-translator', \ 'coc-tsserver', \ 'coc-vetur', \ 'coc-vimlsp', \ 'coc-yaml', \ 'coc-yank'] inoremap \ pumvisible() ? "\" : \ check_back_space() ? "\" : \ coc#refresh() inoremap pumvisible() ? "\" : "\" inoremap complete_info()["selected"] != "-1" ? "\" : "\u\" function! s:check_back_space() abort let col = col('.') - 1 return !col || getline('.')[col - 1] =~# '\s' endfunction inoremap coc#refresh() inoremap coc#refresh() function! Show_documentation() call CocActionAsync('highlight') if (index(['vim','help'], &filetype) >= 0) execute 'h '.expand('') else call CocAction('doHover') endif endfunction nnoremap h :call Show_documentation() " set runtimepath^=~/.config/nvim/coc-extensions/coc-flutter-tools/ " let g:coc_node_args = ['--nolazy', '--inspect-brk=6045'] " let $NVIM_COC_LOG_LEVEL = 'debug' " let $NVIM_COC_LOG_FILE = '/Users/david/Desktop/log.txt'

nnoremap d :CocList diagnostics nmap - (coc-diagnostic-prev) nmap = (coc-diagnostic-next) nnoremap :CocCommand " Text Objects xmap kf (coc-funcobj-i) xmap af (coc-funcobj-a) omap kf (coc-funcobj-i) omap af (coc-funcobj-a) xmap kc (coc-classobj-i) omap kc (coc-classobj-i) xmap ac (coc-classobj-a) omap ac (coc-classobj-a) " Useful commands nnoremap y :CocList -A --normal yank nmap gd (coc-definition) nmap gD :tab sp(coc-definition) nmap gy (coc-type-definition) " nmap gi (coc-implementation) nmap gr (coc-references) nmap rn (coc-rename) nmap tt :CocCommand explorer " coc-translator nmap ts (coc-translator-p) " Remap for do codeAction of selected region function! s:cocActionsOpenFromSelected(type) abort execute 'CocCommand actions.open ' . a:type endfunction xmap a (coc-codeaction-selected) nmap aw (coc-codeaction-selected)w " coctodolist " nnoremap tn :CocCommand todolist.create " nnoremap tl :CocList todolist " nnoremap tu :CocCommand todolist.download:CocCommand todolist.upload " coc-tasks noremap ts :CocList tasks " coc-snippets imap (coc-snippets-expand) vmap (coc-snippets-select) let g:coc_snippet_next = '' let g:coc_snippet_prev = '' imap (coc-snippets-expand-jump) autocmd BufRead,BufNewFile tsconfig.json set filetype=jsonc

" ==================== vim-instant-markdown ==================== let g:instant_markdown_slow = 0 let g:instant_markdown_autostart = 0 " let g:instant_markdown_open_to_the_world = 1 " let g:instant_markdown_allow_unsafe_content = 1 " let g:instant_markdown_allow_external_content = 0 " let g:instant_markdown_mathjax = 1 let g:instant_markdown_autoscroll = 1

" ==================== vim-table-mode ==================== noremap tm :TableModeToggle "let g:table_mode_disable_mappings = 1 let g:table_mode_cell_text_object_i_map = 'k'

" ==================== FZF ==================== let g:fzf_preview_window = 'right:40%' let g:fzf_commits_log_options = '--graph --color=always --format="%C(auto)%h%d %s %C(black)%C(bold)%cr"'

function! s:list_buffers() redir => list silent ls redir END return split(list, "\n") endfunction

function! s:deletebuffers(lines) execute 'bwipeout' join(map(a:lines, {, line -> split(line)[0]})) endfunction

command! BD call fzf#run(fzf#wrap({ \ 'source': s:list_buffers(), \ 'sink*': { lines -> s:delete_buffers(lines) }, \ 'options': '--multi --reverse --bind ctrl-a:select-all+accept' \ }))

noremap :BD

let g:fzf_layout = { 'window': { 'width': 0.95, 'height': 0.95 } }

" ==================== CTRLP (Dependency for omnisharp) ==================== let g:ctrlp_map = '' let g:ctrlp_cmd = 'CtrlP'

" ==================== wildfire ==================== map (wildfire-quick-select) let g:wildfire_objects = { \ "*" : ["i'", 'i"', "i)", "i]", "i}", "it"], \ "html,xml" : ["at", "it"], \ }

" ==================== Undotree ==================== noremap L :UndotreeToggle let g:undotree_DiffAutoOpen = 1 let g:undotree_SetFocusWhenToggle = 1 let g:undotree_ShortIndicators = 1 let g:undotree_WindowLayout = 2 let g:undotree_DiffpanelHeight = 8 let g:undotree_SplitWidth = 24 function g:Undotree_CustomMap() nmap u UndotreeNextState nmap e UndotreePreviousState nmap U 5UndotreeNextState nmap E 5UndotreePreviousState endfunc

" ==================== vim-visual-multi ==================== "let g:VM_theme = 'iceblue' "let g:VM_default_mappings = 0 let g:VM_leader = {'default': ',', 'visual': ',', 'buffer': ','} let g:VM_maps = {} let g:VM_custom_motions = {'n': 'h', 'i': 'l', 'u': 'k', 'e': 'j', 'N': '0', 'I': '$', 'h': 'e'} let g:VM_maps['i'] = 'k' let g:VM_maps['I'] = 'K' let g:VM_maps['Find Under'] = '' let g:VM_maps['Find Subword Under'] = '' let g:VM_maps['Find Next'] = '' let g:VM_maps['Find Prev'] = '' let g:VM_maps['Remove Region'] = 'q' let g:VM_maps['Skip Region'] = '' let g:VM_maps["Undo"] = 'l' let g:VM_maps["Redo"] = ''

" ==================== nvim-spectre ==================== nnoremap f lua require('spectre').open() vnoremap f lua require('spectre').open_visual()

" ==================== Bullets.vim ==================== " let g:bullets_set_mappings = 0 let g:bullets_enabled_file_types = [ \ 'markdown', \ 'text', \ 'gitcommit', \ 'scratch' ]

" ==================== fzf-gitignore ==================== noremap gi :FzfGitignore

" ==================== Ultisnips ==================== " let g:tex_flavor = "latex" " inoremap " let g:UltiSnipsExpandTrigger="" " let g:UltiSnipsJumpForwardTrigger="" " let g:UltiSnipsJumpBackwardTrigger="" " let g:UltiSnipsSnippetDirectories = [$HOME.'/.config/nvim/Ultisnips/', $HOME.'/.config/nvim/plugged/vim-snippets/UltiSnips/'] " silent! au BufEnter,BufRead,BufNewFile silent! unmap " " Solve extreme insert-mode lag on macOS (by disabling autotrigger) " augroup ultisnips_no_auto_expansion " au! " au VimEnter au! UltiSnips_AutoTrigger " augroup END

" ==================== vim-calendar ==================== "noremap \c :Calendar -position=here noremap \ :Calendar -view=clock -position=here let g:calendar_google_calendar = 1 let g:calendar_google_task = 1 augroup calendar-mappings autocmd! " diamond cursor autocmd FileType calendar nmap u (calendar_up) autocmd FileType calendar nmap n (calendar_left) autocmd FileType calendar nmap e (calendar_down) autocmd FileType calendar nmap i (calendar_right) autocmd FileType calendar nmap (calendar_move_up) autocmd FileType calendar nmap (calendar_move_left) autocmd FileType calendar nmap (calendar_move_down) autocmd FileType calendar nmap (calendar_move_right) autocmd FileType calendar nmap k (calendar_start_insert) autocmd FileType calendar nmap K (calendar_start_insert_head) " unmap , for other plugins autocmd FileType calendar nunmap autocmd FileType calendar nunmap augroup END

" ==================== vim-go ==================== let g:go_echo_go_info = 0 let g:go_doc_popup_window = 1 let g:go_def_mapping_enabled = 0 let g:go_template_autocreate = 0 let g:go_textobj_enabled = 0 let g:go_auto_type_info = 1 let g:go_def_mapping_enabled = 0 let g:go_highlight_array_whitespace_error = 1 let g:go_highlight_build_constraints = 1 let g:go_highlight_chan_whitespace_error = 1 let g:go_highlight_extra_types = 1 let g:go_highlight_fields = 1 let g:go_highlight_format_strings = 1 let g:go_highlight_function_calls = 1 let g:go_highlight_function_parameters = 1 let g:go_highlight_functions = 1 let g:go_highlight_generate_tags = 1 let g:go_highlight_methods = 1 let g:go_highlight_operators = 1 let g:go_highlight_space_tab_error = 1 let g:go_highlight_string_spellcheck = 1 let g:go_highlight_structs = 1 let g:go_highlight_trailing_whitespace_error = 1 let g:go_highlight_types = 1 let g:go_highlight_variable_assignments = 0 let g:go_highlight_variable_declarations = 0 let g:go_doc_keywordprg_enabled = 0

" ==================== OmniSharp ==================== let g:OmniSharp_typeLookupInPreview = 1 let g:omnicomplete_fetch_full_documentation = 1 let g:OmniSharp_server_use_mono = 1 let g:OmniSharp_server_stdio = 1 let g:OmniSharp_highlight_types = 2 let g:OmniSharp_selector_ui = 'ctrlp' autocmd Filetype cs nnoremap gd :OmniSharpPreviewDefinition autocmd Filetype cs nnoremap gr :OmniSharpFindUsages autocmd Filetype cs nnoremap gy :OmniSharpTypeLookup autocmd Filetype cs nnoremap ga :OmniSharpGetCodeActions autocmd Filetype cs nnoremap rn :OmniSharpRename:res +5 sign define OmniSharpCodeActions text=💡 let g:coc_sources_disable_map = { 'cs': ['cs', 'cs-1', 'cs-2', 'cs-3'] }

" ==================== goyo ==================== map gy :Goyo

" ==================== jsx ==================== let g:vim_jsx_pretty_colorful_config = 1

" ==================== tabular ==================== vmap ga :Tabularize /

" ==================== vim-after-object ==================== autocmd VimEnter * call after_object#enable('=', ':', '-', '#', ' ')

" ==================== rainbow ==================== let g:rainbow_active = 1

" ==================== xtabline ==================== let g:xtabline_settings = {} let g:xtabline_settings.enable_mappings = 0 let g:xtabline_settings.tabline_modes = ['tabs', 'buffers'] let g:xtabline_settings.enable_persistance = 0 let g:xtabline_settings.last_open_first = 1 noremap to :XTabCycleMode noremap \p :echo expand('%:p')

" ==================== context.vim ==================== "let g:context_add_mappings = 0 "noremap ct :ContextToggle

" ==================== suda.vim ==================== cnoreabbrev sudowrite w suda://% cnoreabbrev sw w suda://%

" ==================== vimspector ==================== let g:vimspector_enable_mappings = 'HUMAN' function! s:read_template_into_buffer(template) " has to be a function to avoid the extra space fzf#run insers otherwise execute '0r ~/.config/nvim/sample_vimspector_json/'.a:template endfunction command! -bang -nargs=* LoadVimSpectorJsonTemplate call fzf#run({ \ 'source': 'ls -1 ~/.config/nvim/sample_vimspector_json', \ 'down': 20, \ 'sink': function('read_template_into_buffer') \ }) " noremap vs :tabe .vimspector.json:LoadVimSpectorJsonTemplate sign define vimspectorBP text=☛ texthl=Normal sign define vimspectorBPDisabled text=☞ texthl=Normal sign define vimspectorPC text=🔶 texthl=SpellBad

" ==================== vim-markdown-toc ==================== "let g:vmt_auto_update_on_save = 0 "let g:vmt_dont_insert_fence = 1 let g:vmt_cycle_list_item_markers = 1 let g:vmt_fence_text = 'TOC' let g:vmt_fence_closing_text = '/TOC'

" ==================== rnvimr ==================== let g:rnvimr_ex_enable = 1 let g:rnvimr_pick_enable = 1 let g:rnvimr_draw_border = 0 " let g:rnvimr_bw_enable = 1 highlight link RnvimrNormal CursorLine nnoremap R :RnvimrToggle<C->:RnvimrResize 0 let g:rnvimr_action = { \ '': 'NvimEdit tabedit', \ '': 'NvimEdit split', \ '': 'NvimEdit vsplit', \ 'gw': 'JumpNvimCwd', \ 'yw': 'EmitRangerCwd' \ } let g:rnvimr_layout = { 'relative': 'editor', \ 'width': &columns, \ 'height': &lines, \ 'col': 0, \ 'row': 0, \ 'style': 'minimal' } let g:rnvimr_presets = [{'width': 1.0, 'height': 1.0}]

" ==================== vim-subversive ==================== nmap s (SubversiveSubstitute) nmap ss (SubversiveSubstituteLine)

" ==================== vim-illuminate ==================== let g:Illuminate_delay = 750 hi illuminatedWord cterm=undercurl gui=undercurl

" ==================== vim-rooter ==================== let g:rooter_patterns = ['__vim_project_root', '.git/'] let g:rooter_silent_chdir = 1

" ==================== AsyncRun ==================== noremap gp :AsyncRun git push

" ==================== AsyncTasks ==================== let g:asyncrun_open = 6

" ==================== dart-vim-plugin ==================== let g:dart_style_guide = 2 let g:dart_format_on_save = 1 let g:dartfmt_options = ["-l 100"]

" ==================== tcomment_vim ==================== nnoremap ci cl let g:tcomment_textobject_inlinecomment = '' nmap cn g>c vmap cn g> nmap cu g<c vmap cu g<

" ==================== vim-move ==================== let g:move_key_modifier = 'C'

" ==================== any-jump ==================== nnoremap j :AnyJump let g:any_jump_window_width_ratio = 0.8 let g:any_jump_window_height_ratio = 0.9

" ==================== typescript-vim ==================== let g:typescript_ignore_browserwords = 1

" ==================== Agit ==================== nnoremap gl :Agit let g:agit_no_default_mappings = 1

" ==================== nvim-treesitter ==================== if g:nvim_plugins_installation_completed == 1 lua <<EOF require'nvim-treesitter.configs'.setup { -- one of "all", "language", or a list of languages ensure_installed = {"typescript", "dart", "java", "c", "prisma", "bash", "go"}, highlight = { enable = true, -- false will disable the whole extension disable = { "rust" }, -- list of language that will be disabled }, } EOF endif

" ==================== nvim-scrollbar ==================== if g:nvim_plugins_installation_completed == 1 lua <<EOF require("scrollbar").setup() require("scrollbar.handlers.search").setup() require("scrollbar").setup({ show = true, handle = { text = " ", color = "#928374", hide_if_all_visible = true, }, marks = { Search = { color = "yellow" }, Misc = { color = "purple" }, }, handlers = { diagnostic = true, search = true, }, }) EOF endif

" ==================== nvim-hlslens ==================== noremap = execute('normal! ' . v:count1 . 'n') \lua require('hlslens').start() noremap - execute('normal! ' . v:count1 . 'N') \lua require('hlslens').start() noremap lua require('hlslens').start() noremap # #lua require('hlslens').start() noremap g glua require('hlslens').start() noremap g# g#lua require('hlslens').start()

" ==================== fzf-lua ==================== noremap :FzfLua files noremap :Rg noremap :FzfLua oldfiles cwd=~ noremap :FzfLua builtin noremap :FzfLua lines " noremap :FzfLua resume noremap z= :FzfLua spell_suggest noremap :FzfLua buffers noremap ; :History: augroup fzf_commands autocmd! autocmd FileType fzf tnoremap autocmd FileType fzf tnoremap augroup end if g:nvim_plugins_installation_completed == 1 lua <<EOF require'fzf-lua'.setup { global_resume = true, global_resume_query = true, winopts = { height = 0.95, width = 0.95, preview = { scrollbar = 'float', }, fullscreen = false, vertical = 'down:45%', -- up|down:size horizontal = 'right:60%', -- right|left:size hidden = 'nohidden', title = true, }, keymap = { -- These override the default tables completely -- no need to set to false to disable a bind -- delete or modify is sufficient builtin = { [""] = "toggle-fullscreen", [""] = "toggle-preview-wrap", [""] = "toggle-preview", [""] = "preview-page-down", [""] = "preview-page-up", [""] = "preview-page-reset", }, fzf = { ["esc"] = "abort", ["ctrl-h"] = "unix-line-discard", ["ctrl-k"] = "half-page-down", ["ctrl-b"] = "half-page-up", ["ctrl-n"] = "beginning-of-line", ["ctrl-a"] = "end-of-line", ["alt-a"] = "toggle-all", ["f3"] = "toggle-preview-wrap", ["f4"] = "toggle-preview", ["shift-down"] = "preview-page-down", ["shift-up"] = "preview-page-up", ["ctrl-e"] = "down", ["ctrl-u"] = "up", }, }, previewers = { cat = { cmd = "cat", args = "--number", }, bat = { cmd = "bat", args = "--style=numbers,changes --color always", theme = 'Coldark-Dark', -- bat preview theme (bat --list-themes) config = nil, -- nil uses $BAT_CONFIG_PATH }, head = { cmd = "head", args = nil, }, git_diff = { cmd_deleted = "git diff --color HEAD --", cmd_modified = "git diff --color HEAD", cmd_untracked = "git diff --color --no-index /dev/null", -- pager = "delta", -- if you have delta installed }, man = { cmd = "man -c %s | col -bx", }, builtin = { syntax = true, -- preview syntax highlight? syntax_limit_l = 0, -- syntax limit (lines), 0=nolimit syntax_limit_b = 10241024, -- syntax limit (bytes), 0=nolimit }, }, files = { -- previewer = "bat", -- uncomment to override previewer -- (name from 'previewers' table) -- set to 'false' to disable prompt = 'Files❯ ', multiprocess = true, -- run command in a separate process git_icons = true, -- show git icons? file_icons = true, -- show file icons? color_icons = true, -- colorize file|git icons -- executed command priority is 'cmd' (if exists) -- otherwise auto-detect prioritizes fd:rg:find -- default options are controlled by 'fd|rg|find|_opts' -- NOTE: 'find -printf' requires GNU find -- cmd = "find . -type f -printf '%P\n'", find_opts = [[-type f -not -path '/.git/*' -printf '%P\n']], rg_opts = "--color=never --files --hidden --follow -g '!.git'", fd_opts = "--color=never --type f --hidden --follow --exclude .git", }, buffers = { prompt = 'Buffers❯ ', file_icons = true, -- show file icons? color_icons = true, -- colorize file|git icons sort_lastused = true, -- sort buffers() by last used }, } EOF endif

" ==================== lazygit.nvim ==================== noremap :LazyGit let g:lazygit_floating_window_winblend = 0 " transparency of floating window let g:lazygit_floating_window_scaling_factor = 1.0 " scaling factor for floating window let g:lazygit_floating_window_corner_chars = ['╭', '╮', '╰', '╯'] " customize lazygit popup window corner characters let g:lazygit_use_neovim_remote = 1 " for neovim-remote support

" ==================== lightspeed ==================== nmap f reg_recording() . reg_executing() == "" ? "Lightspeed_f" : "f" nmap F reg_recording() . reg_executing() == "" ? "Lightspeed_F" : "F" nmap t reg_recording() . reg_executing() == "" ? "Lightspeed_t" : "t" nmap T reg_recording() . reg_executing() == "" ? "Lightspeed_T" : "T" " autocmd BufEnter * map { Lightspeed_S map " Lightspeed_omni_s if g:nvim_plugins_installation_completed == 1 lua <<EOF require'lightspeed'.setup { ignore_case = true, -- exit_after_idle_msecs = { unlabeled = 1000, labeled = nil }, -- --- s/x --- -- jump_to_unique_chars = { safety_timeout = 400 }, -- match_only_the_start_of_same_char_seqs = true, force_beacons_into_match_width = true, -- -- Display characters in a custom way in the highlighted matches. -- substitute_chars = { ['\r'] = '¬', }, -- -- Leaving the appropriate list empty effectively disables "smart" mode, -- -- and forces auto-jump to be on or off. safe_labels= {"a", "r", "s", "t", "n", "e", "i", "o", "w", "f", "u", "y", "x", 'c', "v", "k", "m"}, -- labels = {}, special_keys = { next_match_group = '', prev_match_group = '', }, } EOF endif

" ==================== Terminal Colors ==================== let g:terminal_color_0 = '#000000' let g:terminal_color_1 = '#FF5555' let g:terminal_color_2 = '#50FA7B' let g:terminal_color_3 = '#F1FA8C' let g:terminal_color_4 = '#BD93F9' let g:terminal_color_5 = '#FF79C6' let g:terminal_color_6 = '#8BE9FD' let g:terminal_color_7 = '#BFBFBF' let g:terminal_color_8 = '#4D4D4D' let g:terminal_color_9 = '#FF6E67' let g:terminal_color_10 = '#5AF78E' let g:terminal_color_11 = '#F4F99D' let g:terminal_color_12 = '#CAA9FA' let g:terminal_color_13 = '#FF92D0' let g:terminal_color_14 = '#9AEDFE'

" ==================== Necessary Commands to Execute ==================== exec "nohlsearch"

" Open the _machine_specific.vim file if it has just been created if has_machine_specific_file == 0 exec "e ~/.config/nvim/_machine_specific.vim" endif



- Start (neo)vim with command: `vim -u mini.vim`

- Operate vim.

## Screenshots (optional)

If applicable, add screenshots to help explain your problem.
chemzqm commented 2 years ago

Custom popup menu is used from coc.nvim 0.0.82, see https://github.com/neoclide/coc.nvim/discussions/3985

jiadsii commented 2 years ago

great, i solve it by this, thanks.

fabOnReact commented 2 years ago

if you want to introduce new feature, no problem.. but please user decides to enable it

chemzqm commented 2 years ago

if you want to introduce new feature, no problem.. but please user decides to enable it

Not possible for this case since we can't afford to support old behavior at the same time, you can decide to use old version, check the release note.

fabOnReact commented 2 years ago

yes, I ended up restoring my backup. My opinion. VIM is very time-consuming to use. Adding new features like this does not help us be more productive. Hopefully when I have more money, I sponsor your opensource project!

chemzqm commented 1 year ago

That popup was removed, coc.nvim will detect wrong key-mappings and change them automatically, open new issue if there's something wrong with that behavior.