Skip to content

Instantly share code, notes, and snippets.

@RobertBuhren
RobertBuhren / coc_fzf.vim
Created January 3, 2019 08:49
Display coc.nvim diagnostics using FZF
function! s:format_coc_diagnostic(item) abort
return (has_key(a:item,'file') ? bufname(a:item.file) : '')
\ . '|' . (a:item.lnum ? a:item.lnum : '')
\ . (a:item.col ? ' col ' . a:item.col : '')
\ . '| ' . a:item.severity
\ . ': ' . a:item.message
endfunction
function! s:get_current_diagnostics() abort
" Remove entries not belonging to the current file.