Add schema definition for the config
This commit is contained in:
parent
25b22d2a9e
commit
7297e12605
6 changed files with 656 additions and 0 deletions
35
.ycm_extra_conf.py
Normal file
35
.ycm_extra_conf.py
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
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'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if IgnoreExtraConf:
|
||||
raise IgnoreExtraConf()
|
||||
|
||||
return None
|
||||
Loading…
Add table
Add a link
Reference in a new issue