Add file extensions to major mode alist#116
Open
mattiasdrp wants to merge 1 commit intoemacs-tree-sitter:masterfrom
Open
Add file extensions to major mode alist#116mattiasdrp wants to merge 1 commit intoemacs-tree-sitter:masterfrom
mattiasdrp wants to merge 1 commit intoemacs-tree-sitter:masterfrom
Conversation
This allows to choose the correct grammar when the same major mode is used for different kind of files. Namely, in OCaml, .ml and .mli files are both handled by tuareg-mode but don't have the same grammar. The issue right now is that I can't make tree-sitter-hl-mode work for .mli files.
mattiasdrp
pushed a commit
to mattiasdrp/elisp-tree-sitter
that referenced
this pull request
Aug 30, 2022
Author
|
This is a draft PR to show what the expected behaviour is. It may be better to add functions instead of a pair of major-mode, extensions, something like This would allow to not depend on extensions only in case other modes need another way to choose their grammar. I'm still trying to understand why I can't have highlighting working when using ocaml-interface |
|
Just adding my 👍 on this: I'd be very interested in having this fixed for proper handling of OCaml .mli files |
Author
|
@AltGr Hi, always a pleasure to have your support :-) If you want you can add your 👍🏽 to emacs-tree-sitter/elisp-tree-sitter#241 as they work together :-) |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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 allows to choose the correct grammar when the same major mode is used for different kind of files. Namely, in OCaml, .ml and .mli files are both handled by tuareg-mode but don't have the same grammar.
The issue right now is that I can't make tree-sitter-hl-mode work for .mli files.