liuchengxu / vista.vim

:cactus: Viewer & Finder for LSP symbols and tags
https://liuchengxu.github.io/vista.vim
MIT License
1.9k stars 87 forks source link

font with coc is not working #419

Closed laoshaw closed 2 years ago

laoshaw commented 2 years ago

Describe the bug

after :Vista coc, the list shows strange icons

Environment:

Vista info

- Have you tried updated to the latest version of this LSP client: Yes/No
    Current FileType: cpp
Avaliable Executives: ['coc', 'ctags']
    Global Variables:
    let g:vista = {'get_tagline_under_cursor': function('378'), 'winnr': function('376'), 'source': {'fname': 'btop.cpp', 'bufnr': 1, 'get_winid': function('380'), 'winid':
1000, 'winnr': 1, 'extension': function('385'), 'line': function('383'), 'get_winnr': function('379'), 'filetype': function('381'), 'lines': function('382'), 'line_trimmed':
 function('384'), 'scope_seperator': function('386'), 'fpath': '/home/laoshaw/tmp/c.cpp/study-code-read/btop/src/btop.cpp'}, 'winid': function('377'), 'tmps': []}
    let g:vista#executives = ['ale', 'coc', 'ctags', 'lcn', 'nvim_lsp', 'vim_lsc', 'vim_lsp']
    let g:vista#extensions = ['markdown', 'rst']
    let g:vista#finders = ['clap', 'fzf', 'skim']
    let g:vista#renderer#icons = {'function': '', 'variable': ''}
    let g:vista_blink = [2, 100]
    let g:vista_close_on_fzf_select = 0
    let g:vista_close_on_jump = 0
    let g:vista_cursor_delay = 400
    let g:vista_default_executive = 'coc'
    let g:vista_disable_statusline = 0
    let g:vista_echo_cursor = 1
    let g:vista_enable_centering_jump = 1
    let g:vista_executive_for = {}
    let g:vista_find_absolute_nearest_method_or_function = 0
    let g:vista_find_nearest_method_or_function_delay = 300
    let g:vista_fold_toggle_icons = ['▼', '▶']
    let g:vista_fzf_preview = []
    let g:vista_icon_indent = ['└ ', '│ ']
    let g:vista_ignore_kinds = []
    let g:vista_no_mappings = 0
    let g:vista_sidebar_position = 'vertical botright'
    let g:vista_sidebar_width = 30
    let g:vista_stay_on_open = 1
    let g:vista_top_level_blink = [2, 100]
    let g:vista_update_on_text_changed = 0
    let g:vista_update_on_text_changed_delay = 500
let g:vista#renderer#icons = {'subroutine': '羚', 'method': '', 'func': '', 'variables': '', 'constructor': '略', 'field': '', 'interface': '', 'type': '', 'packag
es': '', 'property': '襁', 'implementation': '', 'default': '', 'augroup': 'פּ', 'macro': '', 'enumerator': '', 'const': '', 'macros': '', 'map': 'פּ', 'fields': '', '
functions': '', 'enum': '', 'function': '', 'target': '', 'typedef': '', 'namespace': '', 'enummember': '', 'variable': '', 'modules': '', 'constant': '', 'struct'
: '', 'types': '', 'module': '', 'typeParameter': '', 'package': '', 'class': '', 'member': '', 'var': '', 'union': '鬒'}

It looks like the g:vista#renderer#icons is incorrect, I'm using gnome-terminal.

MajorDallas commented 2 years ago

Facing a similar issue.

My terminal emulator is Kitty and the font is monofur, which is a powerline-ready font (I also have PowerlineSymbols installed). This was all rendering just fine with the default icon and indent_icon settings until I updated last week.

liuchengxu commented 2 years ago

I don't think it's related to vista.vim as there are almost no updates in the last a few months. If you don't see the other way around, just override g:vista#renderer#icons in your vimrc to replace the strange icons on your side.

laoshaw commented 2 years ago

Yes I ended up override all of them with ascii

MajorDallas commented 2 years ago

Would it at least be possible to recommend some unicode fonts that provide reasonable glyphs? Of the 25 unique codepoints in renderer.vim, 9 of them are not covered by any font on my system and 10 of them are covered by only one font that has assigned calligraphic Tibetan glyphs to those codepoints. They're beautiful, but not helpful 😃 .