atom / language-csharp

C# language support for Atom
Other
62 stars 52 forks source link

Stop taking over bash syntax. #102

Closed envygeeks closed 6 years ago

envygeeks commented 7 years ago

As the title says. For some reason when there is #!/bin/bash -l you assume it's a nant build file.

HebaruSan commented 6 years ago

I'm seeing this for a bash script called build, I think because of this:

https://github.com/atom/language-csharp/blob/364ba38ee2e9abcd219bfc7684f206f29715d894/grammars/build.cson#L3-L5

envygeeks commented 6 years ago

That too! Yeah every time I open up my script/build 😢

damieng commented 6 years ago

Any thoughts on this @shiftkey ? Not sure what to replace the mapping with to make it msbuild specific.

HebaruSan commented 6 years ago

I wanted to try changing it to fileTypes: [ "\\.build" ] to see if that would still work for real NAnt files, but I couldn't find the grammar file in Atom. Is it installed in compressed form on Windows?

winstliu commented 6 years ago

Yes. To get around that you can clone the repository and then apm link --dev it, then run Atom in developer mode (atom --dev).

HebaruSan commented 6 years ago

Thanks. Nope, my idea did not work; with both "\\.build" and just ".build", it failed to recognize NAnt.Console.build as a NAnt build file, and defaulted to normal XML.

damieng commented 6 years ago

I'm thinking the best option here might be to just drop NAnt files from the language-csharp grammar. It's not a core part of the C# tooling and it could be easily provided by a 3rd party for those that need it.

HebaruSan commented 6 years ago

That solution would work well for me, but I don't know how well I fit the profile of your target audience for this package. I don't use NAnt and had to go looking for a sample file for testing.

damieng commented 6 years ago

I've used .NET since 1.0 and have never used NAnt... it looks like their last release was 5 years ago.

shiftkey commented 6 years ago

Belated :thumbsup: to removing the NAnt support, especially if it wasn't implemented properly and meddled with other file extensions :fire: