Skip to content

Commit

Permalink
Fix the way we prepare a hierarchy item for resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
bstaletic committed May 13, 2024
1 parent b6d65ba commit e663097
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions ycmd/completers/language_server/language_server_completer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2699,10 +2699,9 @@ def Hierarchy( self, request_data, args ):

preparation_item, direction, kind = args

# Remove ycmd things
if 'fromRanges' in preparation_item:
name_and_kind_key = 'to' if direction == 'outgoing' else 'from'
preparation_item = preparation_item[ name_and_kind_key ]
if item := ( preparation_item.get( 'from' ) or
preparation_item.get( 'to' ) ):
preparation_item = item
else:
del preparation_item[ 'locations' ]
kind_number = lsp.SYMBOL_KIND.index( preparation_item[ 'kind' ] )
Expand Down

0 comments on commit e663097

Please sign in to comment.