This repository was archived by the owner on Jul 27, 2024. It is now read-only.
Define the domain for the theme-liquid-docs files#643
Merged
karreiro merged 3 commits intolanguage-server-docs-mainfrom Oct 5, 2022
Merged
Define the domain for the theme-liquid-docs files#643karreiro merged 3 commits intolanguage-server-docs-mainfrom
theme-liquid-docs files#643karreiro merged 3 commits intolanguage-server-docs-mainfrom
Conversation
mgmanzella
reviewed
Sep 27, 2022
Contributor
mgmanzella
left a comment
There was a problem hiding this comment.
🔥 love the data structure and how things are separated, had one comment!
mgmanzella
added a commit
that referenced
this pull request
Dec 9, 2022
* Define the domain for the `theme-liquid-docs` files (#643) * Introduce the `ObjectAttributeCompletionProvider` module (#654) * Download theme-liquid-docs on package deploy or while running theme-check (#661) * Download theme-liquid-docs on package deploy * Add data fixtures to test downloading theme-liquid-docs * Introduce the `AssignmentsCompletionProvider` to suggest variables (#667) * Refresh theme-liquid-docs on theme-check startup (#671) * Add async download in SourceManager#refresh and mechanism to notify SourceIndex liquid schema is out of date * Tests for SourceIndex state classes and SourceManager#refresh, create helper for shared stubs * Cleanup -- fix test dir name to source_index, aggr requires * Remove class method mock (Net::HTTP.any_instance), affects other tests * Change SourceIndex#local_path to #local_path! to indicate danger, fix syntax of filename const * Suggest filters compatible with the object type (#669) ### WHY are these changes introduced? Fixes #658 ### WHAT is this pull request doing? 1. Adds logic to `FilterCompletionProvider` to… - determine the type of the variable/literal (string, number, array, …) sitting before the filter separator ("input type") - suggest filters that match the specific input type, and filters whose input type is _variable_ (i.e. for more than 1 specific type, e.g. ` | default`) 2. Displays deprecated filters too, so that users can still see the filter they wanted to use. Co-authored-by: Morisa Manzella <manzella.morisa@gmail.com> Co-authored-by: Julien Poitrin <dev@poitrin.com> Co-authored-by: Julien Poitrin <julien.poitrin@shopify.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces the domain for the
theme-liquid-docsfiles.We're introducing them as a
ScopeIndex, so we may rely on it in other use cases than the documentation. Still, this PR also introduces the documentation module to support the language server.Each kind of scope, in the
ScopeIndex, is lazy loaded. Here's some early bench marks:Considering we're targeting
100ms(as a strict limit) and that the whole index doesn't reach2MBin memory, I believe we may proceed with this implementation for now. Also, I believe we might warmup theScopeIndexat the startup of the language server.--
ScopeIndex#download_filesmethod -- it's a temporary implementation to support the development of this feature.