tern icon indicating copy to clipboard operation
tern copied to clipboard

Simple text search for tern

Open ApekshaBhosale opened this issue 3 years ago • 4 comments

I am writing autocomplete for codeMirror and i have options such as API, API.data, API.isLoading, API.data.list so rather than just providing API and then getting next values i show both ways. But when i write API.data, i want API.data and in suggestion API.data.list (ie just text match). I am not sure if this is possible today coz i wasn't able to find it anywhere. Can someone please guide me with this?

ApekshaBhosale avatar May 13 '21 08:05 ApekshaBhosale

Sorry, I don't understand what you are talking about. Can you provide a demo or describe more details.

othree avatar May 13 '21 09:05 othree

@othree sure! sorry for being so clear about problem.

below is before behaviour for autocomplete using tern

https://user-images.githubusercontent.com/7846888/118257810-ab961580-b4cc-11eb-9276-8bb377e13dba.mov

below is after i made modification for the options being provided for autocomplete

https://user-images.githubusercontent.com/7846888/118257320-1e52c100-b4cc-11eb-91d6-0b38ac452166.mov

So now when i search with 'API.data', autocomplete should show up everything which has 'API.data' as string because 'API.data' might have more properties eg API.data.list. API.data.isLoading etc. Is this possible today? I went through the docs but couldn't find it.

ApekshaBhosale avatar May 14 '21 10:05 ApekshaBhosale

Yes, AFAIK the child properties of an object still possible to provide such information.

othree avatar May 17 '21 01:05 othree

@othree can you please elaborate on that? or can tell me how do this?

ApekshaBhosale avatar May 17 '21 09:05 ApekshaBhosale