Skip to content
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

Merged
merged 12 commits into from
Jul 12, 2024
Merged

Added Tree sitter provider #2488

merged 12 commits into from
Jul 12, 2024

Conversation

AndreasArvidsson
Copy link
Member

Checklist

  • [/] I have added tests
  • [] I have updated the docs and cheatsheet
  • [/] I have not broken the cheatsheet

languageQueryPath: string,
ide: IDE,
provider: RawTreeSitterQueryProvider,
languageQueryName: string,
Copy link
Member Author

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.

Copy link
Member

@pokey pokey left a 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 {
Copy link
Member

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very true

@AndreasArvidsson AndreasArvidsson added this pull request to the merge queue Jul 12, 2024
Merged via the queue into main with commit bc50059 Jul 12, 2024
15 checks passed
@AndreasArvidsson AndreasArvidsson deleted the treeSitterProvider branch July 12, 2024 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants