File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed
Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 2222
2323
2424def GetCompleter ( user_options ):
25- if ShouldEnableTernCompleter ():
25+ if ShouldEnableTernCompleter ( user_options ):
2626 return TernCompleter ( user_options )
2727 if ShouldEnableTypeScriptCompleter ( user_options ):
2828 return TypeScriptCompleter ( user_options )
Original file line number Diff line number Diff line change 5454LOGFILE_FORMAT = 'tern_{port}_{std}_'
5555
5656
57- def ShouldEnableTernCompleter ():
57+ def ShouldEnableTernCompleter ( user_options ):
5858 """Returns whether or not the tern completer is 'installed'. That is whether
5959 or not the tern submodule has a 'node_modules' directory. This is pretty much
6060 the only way we can know if the user added '--js-completer' on
6161 install or manually ran 'npm install' in the tern submodule directory."""
6262
63+ if user_options .get ( 'disable_tern' ):
64+ LOGGER .info ( 'Not using Tern completer: disabled by user' )
65+ return False
66+
6367 if not PATH_TO_NODE :
6468 LOGGER .warning ( 'Not using Tern completer: unable to find node' )
6569 return False
Original file line number Diff line number Diff line change @@ -39,10 +39,8 @@ def setUpModule():
3939 subserver, should be done here."""
4040 global shared_app
4141
42- with patch ( 'ycmd.completers.javascript.hook.'
43- 'ShouldEnableTernCompleter' , return_value = False ):
44- shared_app = SetUpApp ()
45- WaitUntilCompleterServerReady ( shared_app , 'javascript' )
42+ shared_app = SetUpApp ( { 'disable_tern' : True } )
43+ WaitUntilCompleterServerReady ( shared_app , 'javascript' )
4644
4745
4846def tearDownModule ():
You can’t perform that action at this time.
0 commit comments