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

Add support for tree-sitter syntax highlighting? #310

Open
atlemann opened this issue Jun 22, 2022 · 4 comments
Open

Add support for tree-sitter syntax highlighting? #310

atlemann opened this issue Jun 22, 2022 · 4 comments

Comments

@atlemann
Copy link

Description

The syntax highlighting is a bit lacking. When VSCode added syntax APIs, Ionide used that instead of Regex and it got so much better. Would it be possible to follow the work done here: emacs-csharp/csharp-mode#201 and use https://emacs-tree-sitter.github.io for more fine grained highlighting?

Expected behavior

Detailed syntax highlighting like Ionide in VSCode

Actual behavior

Too little of the code is highlighted, but it would be nice to get e.g. types, namespaces and members in different colors.

@atlemann atlemann changed the title Could we add support for tree-sitter Add support for tree-sitter syntax highlighting? Jun 22, 2022
@juergenhoetzel
Copy link
Collaborator

Now that emacs 29.1 has support for tree-sider code, a PR for a fsharp-ts-mode would be awesome.

@KaranAhlawat
Copy link

Hello! I was looking into this, and I came across this grammar. Does anyone know if it's at a stage where it can be used to implement a tree-sitter based major mode?

@kiennq
Copy link
Contributor

kiennq commented Apr 12, 2024

Hello! I was looking into this, and I came across this grammar. Does anyone know if it's at a stage where it can be used to implement a tree-sitter based major mode?

Its highlight looks okay to me, using the prebuilt binary in this https://github.com/kiennq/treesit-langs

@KaranAhlawat
Copy link

Hi all, I've started work on an fsharp-ts-mode. All contributions are welcome (and needed :p). I'm finding a few places in the grammar I'm not sure about, so I'll probably raise issues at the Ionide F# grammar repo soon-ish.

I would also be interested in exploring how we could integrate this buffer major-mode with the rest of the goodies fsharp-mode currently provides (like send stuff to the inferior F# process, evaluating blocks, loading files into the F# process etc.)

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

No branches or pull requests

4 participants