-
-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Tree sitter provider #2488
Conversation
languageQueryPath: string, | ||
ide: IDE, | ||
provider: RawTreeSitterQueryProvider, | ||
languageQueryName: string, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason for switching from path to name is that if we have a non file system implementation of the language provider, path is irrelevant. I think every definition name(scm filename) should just be unique and in which folder they are located doesn't really matter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good! See my various changes and related comment below. Merge if you're happy
|
||
/** | ||
* Sentinel value to indicate that a language doesn't have | ||
* a new-style query definition file | ||
*/ | ||
const LANGUAGE_UNDEFINED = Symbol("LANGUAGE_UNDEFINED"); | ||
|
||
export interface LanguageDefinitions { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the lifecycle methods from this interface (init
and dispose
). I don't think interfaces should expose lifecycle methods. Clients of an interface shouldn't be responsible for the lifecycle of any given instance; that is the job of whoever constructs the actual class
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very true
Checklist