diff --git a/autoload/vimspector/internal/balloon.vim b/autoload/vimspector/internal/balloon.vim index 4dc5096..b8be41a 100644 --- a/autoload/vimspector/internal/balloon.vim +++ b/autoload/vimspector/internal/balloon.vim @@ -138,7 +138,10 @@ function! s:MatchKey( key, candidates ) abort let mapped = '' for candidate in a:candidates try - " Try and expand the key code + " Try and expand the key code. Note this won't work for non-special keys + " and it won't work for multple keys, which is kinda shitty. + " + " There's no vim api to run expand_keycodes() i don't think. execute 'let mapped = "\' . candidate . '"' if mapped ==# a:key return v:true diff --git a/python3/vimspector/settings.py b/python3/vimspector/settings.py index e72bedf..9ad9e41 100644 --- a/python3/vimspector/settings.py +++ b/python3/vimspector/settings.py @@ -17,7 +17,6 @@ import vim import builtins from vimspector import utils -from collections.abc import Mapping DEFAULTS = { # UI @@ -85,9 +84,7 @@ if hasattr( vim, 'Dictionary' ): def Dict( option ): return _UpdateDict( DICT_TYPE( DEFAULTS.get( option, {} ) ), - utils.GetVimValue( vim.vars, - f'vimspector_{ option }', - {} ) ) + vim.vars.get( f'vimspector_{ option }', DICT_TYPE() ) ) def _UpdateDict( target, override ): @@ -118,9 +115,9 @@ def _UpdateDict( target, override ): for key, value in override.items(): current_value = target.get( key ) - if not isinstance( current_value, Mapping ): + if not isinstance( current_value, DICT_TYPE ): target[ key ] = value - elif isinstance( value, Mapping ): + elif isinstance( value, DICT_TYPE ): target[ key ] = _UpdateDict( current_value, value ) else: target[ key ] = value diff --git a/support/custom_ui_vimrc b/support/custom_ui_vimrc index b1ffda1..3b132b4 100644 --- a/support/custom_ui_vimrc +++ b/support/custom_ui_vimrc @@ -142,4 +142,15 @@ augroup END " }}} +" Custom mappings for special buffers {{{ + +let g:vimspector_mappings = { + \ 'stack_trace': {}, + \ 'variables': { + \ 'set_value': [ '', '' ], + \ }, + \ } + +" }}} + " vim: foldmethod=marker