Skip to content

Error with tagbar addon: E716: Key not present in Dictionary: n #313

@reinerh

Description

@reinerh

When using rust.vim with tagbar, vim throws an error in Rust files that contain a module when opening the tagbar.
(When using also the airline addon, it shows the error immediately on start, as airline is also using tag data for the status line.)
Without rust.vim (i.e., only with the tagbar addon active), the tagbar is shown correctly and without any errors (that's why I'm filing this bug here and not for tagbar).

  • rust.vim version: fdb2d39 (Feb 18 2019)

Steps to reproduce:

Create a new library cargo project.

$ cargo new --lib hello

Open src/lib.rs with vim and open tagbar with :Tagbar.

Expected behavior:

vim displays the tagbar with tags of the current .rs file.

Actual behavior:

vim throws this error:

Error detected while processing function tagbar#ToggleWindow[2]..<SNR>37_ToggleWindow[9]..<SNR>37_OpenWindow[83]..<SNR>37_AutoUpdate[63]..<SNR>37_ProcessFile[84]..<SNR>37_ParseTagline[76]..<SNR>37_ProcessTag[74]..<SNR>37_add_tag_recursive[
96]..<SNR>37_create_pseudotag[32]..<SNR>43_initFoldState:
line   13:
E716: Key not present in Dictionary: n

RustInfo:

rust.vim Global Variables:

let g:ftplugin_rust_source_path = v:null
let g:loaded_syntastic_rust_cargo_checker = v:null
let g:loaded_syntastic_rust_filetype = v:null
let g:loaded_syntastic_rust_rustc_checker = v:null
let g:rust_bang_comment_leader = v:null
let g:rust_cargo_avoid_whole_workspace = v:null
let g:rust_clip_command = v:null
let g:rust_conceal = v:null
let g:rust_conceal_mod_path = v:null
let g:rust_conceal_pub = v:null
let g:rust_fold = v:null
let g:rust_last_args = v:null
let g:rust_last_rustc_args = v:null
let g:rust_original_delimitMate_excluded_regions = v:null
let g:rust_playpen_url = v:null
let g:rust_prev_delimitMate_quotes = v:null
let g:rust_recent_nearest_cargo_tol = v:null
let g:rust_recent_root_cargo_toml = v:null
let g:rust_recommended_style = v:null
let g:rust_set_conceallevel = v:null
let g:rust_set_conceallevel=1 = v:null
let g:rust_set_foldmethod = v:null
let g:rust_set_foldmethod=1 = v:null
let g:rust_shortener_url = v:null
let g:rustc_makeprg_no_percent = v:null
let g:rustc_path = v:null
let g:rustfmt_autosave = 0
let g:rustfmt_autosave_because_of_config = v:null
let g:rustfmt_autosave_if_config_present = v:null
let g:rustfmt_command = 'rustfmt'
let g:rustfmt_emit_files = 1
let g:rustfmt_fail_silently = 0
let g:rustfmt_options = ''
let g:syntastic_extra_filetypes = ['rust']
let g:syntastic_rust_cargo_fname = v:null
rustfmt 1.0.1-stable (be13559 2018-12-10)

rustc 1.32.0

cargo 1.32.0


VIM - Vi IMproved 8.1 (2018 May 18, compiled Feb 22 2019 12:55:04)
Included patches: 1-875, 878, 884, 948
Modified by team+vim@tracker.debian.org
Compiled by team+vim@tracker.debian.org
Huge version with GTK3 GUI.  Features included (+) or not (-):
+acl               +cindent           +cursorshape       +file_in_path      +jumplist          +mksession         +mouse_xterm       +printer           +startuptime       +termresponse      +visualextra       +xsmp_interact
+arabic            +clientserver      +dialog_con_gui    +find_in_path      +keymap            +modify_fname      +multi_byte        +profile           +statusline        +textobjects       +viminfo           +xterm_clipboard
+autocmd           +clipboard         +diff              +float             +lambda            +mouse             +multi_lang        -python            -sun_workshop      +textprop          +vreplace          -xterm_save
+autochdir         +cmdline_compl     +digraphs          +folding           +langmap           +mouseshape        -mzscheme          +python3           +syntax            +timers            +wildignore        
-autoservername    +cmdline_hist      +dnd               -footer            +libcall           +mouse_dec         +netbeans_intg     +quickfix          +tag_binary        +title             +wildmenu          
+balloon_eval      +cmdline_info      -ebcdic            +fork()            +linebreak         +mouse_gpm         +num64             +reltime           +tag_old_static    +toolbar           +windows           
+balloon_eval_term +comments          +emacs_tags        +gettext           +lispindent        -mouse_jsbterm     +packages          +rightleft         -tag_any_white     +user_commands     +writebackup       
+browse            +conceal           +eval              -hangul_input      +listcmds          +mouse_netterm     +path_extra        +ruby              +tcl               +vartabs           +X11               
++builtin_terms    +cryptv            +ex_extra          +iconv             +localmap          +mouse_sgr         +perl              +scrollbind        +termguicolors     +vertsplit         -xfontset          
+byte_offset       +cscope            +extra_search      +insert_expand     +lua               -mouse_sysmouse    +persistent_undo   +signs             +terminal          +virtualedit       +xim               
+channel           +cursorbind        +farsi             +job               +menu              +mouse_urxvt       +postscript        +smartindent       +terminfo          +visual            +xpm               
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  system gvimrc file: "$VIM/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
    system menu file: "$VIMRUNTIME/menu.vim"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  -pthread -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0 -I/usr/include/cairo -I/usr/include/libdrm -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/fribidi -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/uuid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -Wdate-time  -g -O2 -fdebug-prefix-map=/build/vim-nWVbVg/vim-8.1.0875=. -fstack-protector-strong -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1       
Linking: gcc   -L. -Wl,-z,relro -Wl,-z,now -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,-E  -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim   -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE  -lm -ltinfo -lnsl  -lselinux  -lacl -lattr -lgpm -ldl  -L/usr/lib -llua5.2 -Wl,-E  -fstack-protector-strong -L/usr/local/lib  -L/usr/lib/x86_64-linux-gnu/perl/5.28/CORE -lperl -ldl -lm -lpthread -lcrypt  -L/usr/lib/python3.7/config-3.7m-x86_64-linux-gnu -lpython3.7m -lcrypt -lpthread -ldl -lutil -lm -L/usr/lib/x86_64-linux-gnu -ltcl8.6 -ldl -lz -lpthread -lm -lruby-2.5 -lpthread -lgmp -ldl -lcrypt -lm     

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions