|
@@ -60,6 +60,10 @@ NO_COMPLETIONS = {
|
|
|
|
|
|
YCM_NEOVIM_NS_ID = vim.eval( 'g:ycm_neovim_ns_id' )
|
|
|
|
|
|
+# Virtual text is not a feature in itself and early patches don't work well, so
|
|
|
+# we need to keep changing this at the moment
|
|
|
+VIM_VIRTUAL_TEXT_VERSION_REQ = '9.0.193'
|
|
|
+
|
|
|
|
|
|
def CurrentLineAndColumn():
|
|
|
"""Returns the 0-based current line and 0-based current column."""
|
|
@@ -1414,6 +1418,11 @@ def VimSupportsPopupWindows():
|
|
|
'popup_close' )
|
|
|
|
|
|
|
|
|
+@memoize()
|
|
|
+def VimSupportsVirtualText():
|
|
|
+ return not VimIsNeovim() and VimVersionAtLeast( VIM_VIRTUAL_TEXT_VERSION_REQ )
|
|
|
+
|
|
|
+
|
|
|
@memoize()
|
|
|
def VimHasFunction( func ):
|
|
|
return bool( GetIntValue( f"exists( '*{ EscapeForVim( func ) }' )" ) )
|