Open zw963 opened 2 years ago
I workaround this issue in this PR with:
Hi, i get a similiar issue when try to add mint-lang support to apheleia
As you can see, i added support for Crystal is in recent days, it quite easy, check this pr, and, it support almost all languages for now, even, nix.
But, when i try to add mint support for it, i get same(type) error as this.
Sat Oct 29 02:16:33 2022 :: /home/zw963/Crystal/play/mint-realworld-rework/source/
$ mint format --stdin
Unhandled exception: Error opening file with mode 'r': '/home/zw963/Crystal/play/mint-realworld-rework/source/mint.json': No such file or directory (File::NotFoundError)
from ???
from ???
from ???
from ???
from ???
from ???
from ???
from ???
from ???
Command failed with exit code 1.
Yes, the checker could not found the mint.json in the same folder of the opened file buffer, most other language format checker can handle this, but, always limit by this when i try to add auto save formatter for mint.
Thanks.
I am try to fixing format buffer feature use
mint format
in the emacs-mint-mode issue.After some debug, i get following error message instead.
It wired, because, because sure i can run command successful in my konsole.
The above issue will happen if current PWD directory is not the project root
In this case, mint format never format file.
So, the really issue is, we need a way to told formatter, where is the project root.
Following is some solution:
mint format
can read it.