atom / atom-languageclient

Language Server Protocol support for Atom (the basis of Atom-IDE)
https://ide.atom.io/
MIT License
388 stars 78 forks source link

Convert to custom Suggestion type & filter text with `filterText` key #262

Closed Aerijo closed 5 years ago

Aerijo commented 5 years ago

Converts the internal uses of ac.AnySuggestion to the new Suggestion, which is an extended version of the original. In particular, it has the property filterText, used for custom filtering. It also makes it easier to add features, such as the replacement prefix tracking in #254

Regarding filtering using filterText, it seems not even VS Code had a solid idea on the difference between filterText and sortText for a time

The latest I could find is in that last issue, where they say [paraphrasing] "use sort text for no prefix" and "use filterText for when there's a prefix" (and they base on other things like match index). The source code also supports using filterText to sort as well when there's a prefix.

Aerijo commented 5 years ago

@50Wliu The package-lock.json looks quite different to the one you committed earlier, specifically the version range symbols have been removed. Is this fine?

winstliu commented 5 years ago

Yeah, that's fine. Just commit whatever the result of npm install is.