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

Some of the errors reported when used in markdown #384

Open
pittcat opened this issue Feb 12, 2021 · 3 comments
Open

Some of the errors reported when used in markdown #384

pittcat opened this issue Feb 12, 2021 · 3 comments

Comments

@pittcat
Copy link

pittcat commented Feb 12, 2021

Describe the bug
A clear and concise description of what the bug is.

Environment:

  • OS:

  • Vim/Neovim version:
    :version
    NVIM v0.5.0-dev+1083-g1aec5ba85

  • This plugin version:
    lastest version

  • I'm using universal-ctags:

    • Ctags version:
      Universal Ctags 5.9.0(p5.9.20210110.0), Copyright (C) 2015 Universal Ctags Team
      Universal Ctags is derived from Exuberant Ctags.
      Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
      Compiled: Jan 15 2021, 00:04:58
      URL: https://ctags.io/
      Optional compiled features: +wildcards, +regex, +iconv, +option-directory, +xpath, +json, +interactive, +sandbox, +yaml, +packcc

Vista info

Current FileType: vista_markdown
Avaliable Executives: ['coc', 'ctags']
    Global Variables:
    let g:vista = {'get_tagline_under_cursor': function('52'), 'winnr': function('50'), 'floating_visible': v:false, 'source': {'fpath': '/home/pittcat/test.md', 'bufnr': 3, 'get_winid': function('54'), 'fname': '/home/pittcat/test.md', 'winnr': 1, 'extension': function('59'), 'line': function('57'), 'get_winnr': function('53'), 'filetype': function('55'), 'lines': function('56'), 'winid': 1000, 'line_trimmed': function('58'), 'scope_seperator': function('60')}, 'bufnr': 4, 'provider': 'markdown', 'ctags_cmd': 'ctags --format=2 --excmd=pattern --fields=nksSaf --extras=+F --sort=no --append=no --extras=   --output-format=json --fields=-PF -f- /home/pittcat/.cache/nvim/vista/c6d3e476a53f38b8ea15fc9823bcd73bebdfa7851dc258bffa1183f714709c83.startify', 'winid': 1002, 'tmps': [], 'pos': [{'lnum': 1, 'leftcol': 0, 'col': 0, 'topfill': 0, 'topline': 1, 'coladd': 0, 'skipcol': 0, 'curswant': 0}, 1, '1resize 34|vert 1resize 40|2resize 34|vert 2resize 31|3resize 1|vert 3resize 40|']}
    let g:vista#executive#ctags#support_json_format = 1
    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#enable_icon = 1
    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 = 'ctags'
    let g:vista_disable_statusline = 0
    let g:vista_echo_cursor = 1
    let g:vista_enable_centering_jump = 1
    let g:vista_executive_for = {'go': 'coc', 'c': 'coc', 'cpp': 'coc', 'python': 'coc'}
    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 topleft'
    let g:vista_sidebar_width = 40
    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

Steps to reproduce given the above info

source file for reproduce the ctags issue:

minimal vimrc (neccessary when this issue is about some Vim LSP client):

let g:vista_sidebar_position = 'vertical topleft'
let g:vista_sidebar_width = 40
let g:vista_icon_indent = ["╰─▸ ", "├─▸ "]
let g:vista_default_executive = 'ctags'
let g:vista_executive_for = {
  \ 'cpp': 'coc',
  \ 'c': 'coc',
  \ 'go': 'coc',
  \ 'python': 'coc',
  \ }
let g:vista#renderer#enable_icon = 1
let g:vista#renderer#icons = {
\   "function": "\uf794",
\   "variable": "\uf71b",
\  }
function! NearestMethodOrFunction() abort
  return get(b:, 'vista_nearest_method_or_function', '')
endfunction

set statusline+=%{NearestMethodOrFunction()}

" By default vista.vim never run if you don't call it explicitly.
"
" If you want to show the nearest function in your statusline automatically,
" you can add the following line to your vimrc 
autocmd VimEnter * call vista#RunForNearestMethodOrFunction()

Screenshot or gif (if possible)
https://asciinema.org/a/D4aDiiajJTGAdP5b7ZgxjmPKu

@pittcat
Copy link
Author

pittcat commented Feb 28, 2021

It seems like that vista_enable_markdown_extension = 0 can't disable the markdown extension. At same time, vista markdown extension is always buggy as above.

@pittcat
Copy link
Author

pittcat commented Jul 1, 2021

I located the error of Vista fzf ctags is generated because the markdown heading is too long. Is there a workaround?

@pittcat
Copy link
Author

pittcat commented Jul 1, 2021

Error info of Vista fzf ctags is as follow:

Error detected while processing function 83[30]..<SNR>186_callback:                                                                                                                       
line   23:
Vim(let):E684: list index out of range: 1

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

No branches or pull requests

1 participant