This is just better in every way, and the vscode-python typescript adapter is being phased out.
51 lines
1.1 KiB
Python
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
|