elm-community / SublimeElmLanguageSupport

Elm language syntax highlighting and tool integration for ST2/3.

Home Page:https://packagecontrol.io/packages/Elm%20Language%20Support

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Creates elm-package.json file in same directory every time I open an Elm file in Sublime

neurodynamic opened this issue · comments

Starts happening when I install Elm Language Support and stops happening when I uninstall it. What would cause this to happen?

Yeah it happens to me also. It's quite annoying because it creates an elm-package.json for every folder I open...

Possibly related to this?

elm-lang/elm-package#196

@neurodynamic If/when elm-lang/elm-package#196 is implemented, this issue will be fixed.

In the meantime, however, this package should detect the parent directory containing elm-package.json and run utilities like elm-format with that as the current working directory.

I’d be happy to try implementing this; however, I’m not sure there is anyone maintaining this package available to accept such a PR.

@neurodynamic @simonewebdesign Do you also have https://github.com/bbugh/SublimeLinter-contrib-elm-make installed as well? I seem to only be seeing this issue when that linter runs; Elm Language Support by itself doesn’t seem to generate the unwanted elm-package.json file for me.

@sentience Huh. This seems to be the case for me, too.

@neurodynamic @simonewebdesign I’ve now upgraded my copy of SublimeLinter-contrib-elm-make to master to get bbugh/SublimeLinter-contrib-elm-make#4 (the version in Package Control is out of date), which fixes this issue for me.

@sentience How do you do that?

@neurodynamic The manual way is to first remove the package installed using Package Control, then clone the package’s Git repository in your Sublime Text Packages directory. On my machine:

cd /Users/kyank/Library/Application\ Support/Sublime\ Text\ 3/Packages
git clone git@github.com:bbugh/SublimeLinter-contrib-elm-make.git

That’s it! The package is now installed manually. Be aware that you’ll have to keep it up-to-date yourself, as Package Control will not automatically update it.

@sentience That worked. Thanks!

@neurodynamic Even better, you can use the Add Repository command (docs) in Package Control to add the project’s GitHub repository, then install it. You’ll get the latest master version, rather than the (outdated) version published to Package Control, and Package Control will keep it up to date!

@sentience that's great, thank you!

I’ve now taken over maintenance of SublimeLinter-contrib-elm-make and released a new version that fixes this issue. I believe this issue can be closed.