MCPcopy Create free account
hub / github.com/ycm-core/YouCompleteMe / Initialise

Function Initialise

python/ycm/inlay_hints.py:34–56  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

32
33
34def Initialise():
35 if vimsupport.VimIsNeovim():
36 return False
37
38 props = tp.GetTextPropertyTypes()
39 if 'YCM_INLAY_UNKNOWN' not in props:
40 tp.AddTextPropertyType( 'YCM_INLAY_UNKNOWN',
41 highlight = 'YcmInlayHint',
42 start_incl = 1 )
43 if 'YCM_INLAY_PADDING' not in props:
44 tp.AddTextPropertyType( 'YCM_INLAY_PADDING',
45 highlight = 'YcmInvisible',
46 start_incl = 1 )
47
48 for token_type, group in HIGHLIGHT_GROUP.items():
49 prop = f'YCM_INLAY_{ token_type }'
50 if prop not in props and vimsupport.GetIntValue(
51 f"hlexists( '{ vimsupport.EscapeForVim( group ) }' )" ):
52 tp.AddTextPropertyType( prop,
53 highlight = group,
54 start_incl = 1 )
55
56 return True
57
58
59class InlayHints( sr.ScrollingBufferRange ):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected