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

feat(fsharp): add F# support #35

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

SoxPopuli
Copy link

Adds queries for F# files.

Treesitter doesn't have a grammar for F# files by default, but one can be installed from this repo. As far as I am aware, this is the only actively developed custom grammar for F# so the chances of people installing the wrong grammar should be minimal, that being said, I would understand if you were to reject this PR on those grounds.

You should be able to run the test file directly using the dotnet F# repl: dotnet fsi <path-to-file>

@Danielkonge
Copy link
Contributor

Danielkonge commented Nov 18, 2023

To be able to add the F# queries, they will be need to be updated to the new syntax.

For the first one you commented out, something like this might work?

(argument_patterns
  "(" @delimiter
  ("(" ")")*
  ")" @delimiter @sentinel
) @container

(It depends on how the F# parser's tree structure looks, and I haven't checked it.)

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.

2 participants