Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backslash escapes shown in coc-json doHover float #752

Closed
RedBeard0531 opened this issue May 3, 2019 · 4 comments
Closed

backslash escapes shown in coc-json doHover float #752

RedBeard0531 opened this issue May 3, 2019 · 4 comments

Comments

@RedBeard0531
Copy link

Not sure if this is an issue with coc or coc-json. Not even sure if it is just with doHover but that is where I noticed it.

image

@chemzqm
Copy link
Member

chemzqm commented May 4, 2019

Can't reproduce with minimal vimrc.

@Congee
Copy link

Congee commented Apr 26, 2020

Actually see it a lot

@Dreomite
Copy link

Dreomite commented Jul 14, 2020

@chemzqm In my case, vim-polyglot was the problem.

NVIM v0.4.3
Minimal .vimrc:

call plug#begin('~/.local/share/nvim/plugged')
Plug 'sheerun/vim-polyglot'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
call plug#end()

" LSPs I have. Both are broken.
let g:coc_global_extensions = ['coc-json', 'coc-omnisharp']

nnoremap <silent> K :call <SID>show_documentation()<CR>
function! s:show_documentation()
  if (index(['vim','help'], &filetype) >= 0)
    execute 'h '.expand('<cword>')
  else
    call CocAction('doHover')
  endif
endfunction

EDIT
Well, seems like I still get backslashes, but rarely. With vim-polyglot on, it escapes all the colored characters (like in the OP's screenshot). With vim-polyglot off, it escapes characters selectively:

image
image
image

When I'll have time, I'll try to play with my config to triage the source of the issue.
It still persists when using vimrc I posted above (without vim-polyglot) and empty coc-settings.json.

@flw-cn
Copy link

flw-cn commented Sep 13, 2020

@RedBeard0531 You can try Plug “flw-cn/vim-markdown” which is a fork for plasticboy/vim-markdown and it automatically hides the backslash. see PR preservim/vim-markdown#515 to see exactly what it does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants