Solargraph: Feature request: remove documentation items option

Created on 10 Nov 2017  路  4Comments  路  Source: castwide/solargraph

Hi. It is excellent!

But it is too huge that the "documentation" items in the result.
I want to ignore the "documentation" items from the result.

enhancement

All 4 comments

Yes, the response of /suggest api is too huge, and sometimes slow

Is there any possbile to separate the api to /suggest and /doc ?

Sounds good. There's already a plan for getting certain methods' type inferences from a separate API call. It makes sense to let the client get the documentation the same way.

Change pushed to master.

The /suggest endpoint accepts an all parameter. If it's set to 1, the response will include documentation in the suggestions (i.e., Suggestion#as_json(all: true)). The default is false.

Suggestions have a path attribute that can be used to uniquely identify classes and methods, e.g., ActiveRecord::Base or String#chomp.

The /resolve endpoint accepts path and workspace parameters. It returns the suggestion(s) for the path with the documentation.

The development version of vscode-solargraph takes advantage of this feature now. Completion items load documentation on demand.

I plan to include these changes in gem v0.14.0. Feedback is appreciated.

The /suggest response excludes documentation by default v0.14.2.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dansdantas picture dansdantas  路  5Comments

siumennel picture siumennel  路  5Comments

clmay picture clmay  路  3Comments

wh1le picture wh1le  路  5Comments

bry-guy picture bry-guy  路  3Comments