Closed hassec closed 9 years ago
Some improvements have been committed to master. See get_client function.
What do you think about getting rid of the whole get client logic and instead initializing a global variable SERVER
with an instance of http_client.YcmdClient(...)
?
This way we could just call all server functions with SERVER.function()
and would not read the settings and create a new client instance everytime we need to call a server function.
As was already discussed in #6 the current method of getting a server handle
cli = http_client.YcmdClient(...)
should be changed. I would suggest that these functions be directly called via the
LOCAL_SERVER
instance. This would only require assigning a ycmd handle with the server location etc. from the settings toLOCAL_SERVER
in the case that the server is not started automatically. If it is started automatically it's set anyway.This would render alot of calls to
read_settings()
obsolete.