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

Support configurable file associations #52

Open
Wilfred opened this issue Oct 29, 2021 · 3 comments
Open

Support configurable file associations #52

Wilfred opened this issue Oct 29, 2021 · 3 comments

Comments

@Wilfred
Copy link
Owner

Wilfred commented Oct 29, 2021

For example, TARGETS is usually python syntax (specifically starlark), but has no file extension.

@crides
Copy link

crides commented Dec 27, 2021

I would like to see configurable filetype associations, like the ones present in ripgrep. Some files may have custom extensions, but may use syntax trees from other languages. An example is the new Kicad project files, where they are essentially S-exprs, and should be diffed as such

Wilfred pushed a commit that referenced this issue Jan 1, 2022
@Wilfred
Copy link
Owner Author

Wilfred commented Jan 2, 2022

@crides agreed, configurable file associations would be nice.

(FWIW I'm not sure Kicad would work well as there's no generic s-expression parser in difftastic today.)

@crides
Copy link

crides commented Jan 2, 2022

Kicad actually works fairly well. I simply modded the file detection to map kicad files to Common Lisp. The only thing that's a bit hard is because it's not manually edited (well not most of the time anyway) and the order of some of the elements don't actually matter, but the unorderedness would make diffing possibly very hard. So for now, everything works well enough.

Wilfred pushed a commit that referenced this issue Mar 10, 2022
make instanceof case insensitive
Wilfred pushed a commit that referenced this issue Apr 17, 2022
Loosen Rust crate's tree-sitter dependency
@Wilfred Wilfred changed the title Support associating file types with whole names Support configurable file associations Apr 29, 2022
gurjeet pushed a commit to gurjeet/difftastic that referenced this issue Sep 20, 2022
gcr pushed a commit to gcr/difftastic-nim that referenced this issue Jan 31, 2024
scanner: cleanup code and improve correctness

As the code was mostly translated verbatim from C++ to C, there were some bad structures due to my own lack of experiences as well as some missed error handling.

This pull clean most of that up.
Wilfred pushed a commit to Thecentury/difftastic that referenced this issue May 14, 2024
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

2 participants