
    ueL                     T    d dl Z d dlmZmZmZ  e j
                  e      Zed        Zy)    N)_utilshookimpllspc           	          t        j                   |      }  j                         j                  di |}d } fd}|D cg c]  } ||      r ||      r|j                  dz
  |j
                  d|j                  dz
  |j
                  t        |j                        z   dd|j                         rt        j                  j                  nt        j                  j                  d c}S c c}w )Nc                 >    | j                   d uxr | j                  d uS N)linecolumn)
definitions    9/usr/lib/python3/dist-packages/pylsp/plugins/highlight.pyis_validz*pylsp_document_highlight.<locals>.is_valid   s!    d*Lz/@/@/LL    c                 f    | j                    xs" t        | j                         j                  k(  S r   )module_pathstrpath)r   documents    r   local_to_documentz3pylsp_document_highlight.<locals>.local_to_document   s-    &&&V#j.D.D*E*V	
r      )r	   	character)startend)rangekind )r   position_to_jedi_linecolumnjedi_scriptget_referencesr	   r
   lennameis_definitionr   DocumentHighlightKindWriteRead)r   positioncode_positionusagesr   r   ds   `      r   pylsp_document_highlightr)      s    66xJM2X!!#22C]CFM
  A;,Q/ #$&&1*188D !
CK9OP
   --33**//	
  s   B+C2)	loggingpylspr   r   r   	getLogger__name__logr)   r   r   r   <module>r/      s6     ' 'g! 
 
r   