vimspector/.ycm_extra_conf.py
Ben Jackson a56bee7b0a Switch to debugpy over vscode-python
This is just better in every way, and the vscode-python typescript
adapter is being phased out.
2020-02-08 21:15:27 +00:00

51 lines
1.1 KiB
Python

try:
from ycmd.extra_conf_support import IgnoreExtraConf
except ImportError:
IgnoreExtraConf = None
import os.path as p
PATH_TO_THIS_DIR = p.dirname( p.abspath( __file__ ) )
def Settings( **kwargs ):
if kwargs[ 'language' ] == 'json':
return {
'ls': {
'json': {
'schemas': [
{
'fileMatch': [ '.vimspector.json' ],
'url':
f'file://{PATH_TO_THIS_DIR}/docs/schema/vimspector.schema.json'
},
{
'fileMatch': [ '.gadgets.json', '.gadgets.d/*.json' ],
'url':
f'file://{PATH_TO_THIS_DIR}/docs/schema/gadgets.schema.json'
}
]
}
},
'capabilities': {
'textDocument': {
'completion': {
'completionItem': {
'snippetSupport': True
}
}
}
}
}
if kwargs[ 'language' ] == 'python':
return {
'sys_path': [
p.join( PATH_TO_THIS_DIR, 'python3' )
]
}
if IgnoreExtraConf:
raise IgnoreExtraConf()
return None