zargony / atom-language-rust

Rust language support in Atom - LOOKING FOR MAINTAINER, see #144

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Include backup files to language grammar

cbcoutinho opened this issue · comments

Currently running rustfmt on a project produces a number of back up files *.rs.bk, which are your old rust files - rustfmt saves a cleaned up version to where the files were previously. I think it's a good idea to include rs.bk files into this grammar because it is still rust code.

Is that possible to do in the grammar file itself?

Nevermind, I just added the extension to my config.json - don't worry about adding it to the grammar

I'm not sure how backup extensions are handled in general, but I think they're normally not included in the grammar. Otherwise everybody would end up including all kind of editor/tool-specific extensions like .rs~ and .rs.bak and so on. With rustfmt, one might see this different since it's a Rust tool, but it still seems cleaner to me to leave out backup extensions. As you already found out, you can always add arbitrary extensions in config.json.

I agree, I think the current behavior is fine.