-
Notifications
You must be signed in to change notification settings - Fork 11
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
On sourcing lispwords from multiple locations #7
Comments
FYI, I have I have tried to implement the above (i.e. try to load from the current directory first, then try home/ |
Project-specific It was indeed intentional to not hardwire the lispwords into the indenter itself: I can't presume to know what the user's preferred lispwords are. Previously, I had had the Common Lisp version have a different hardwired lispwords from the Scheme version, but really the two indenters should be interchangeable. Also, the user may be using some other Lisp entirely. Ideally, then, the indenter should be able to query the https://github.com/ds26gte/neoscmindent does this seamlessly: it reads the local |
Maybe... we have
I know, it might sound a bit overkill, but that's how many other text-formatters/editor tools (and not) work (e.g.
That's exactly how I have been dealing with this so far:
Like I said, the only problem I was having with this was it that it was hard to split LINs definitions across different files (general/project specific rules) and have
I 100% agree, the indenters in this repository should all behave the same, and be programming language agnostic; and if we wanted such indenters to provide some sane defaults, there should at least be a way to:
It seems like a lot of work, for not much gain, so I guess sticking with a single project-specific
Well, to be honest I think it should be the other way around:
|
FYI, the last commit in my fork (iamFIREcracker@24747d2), adds support for automatically loading |
I'd also love this. One suggestion though: instead of looking at successively higher and higher directories until a This is how many tools work with e.g. Git or other VCS and look for configuration files. |
Recently (commit: 6c30648)
lispindent
was changed so that it would not apply some default indenting rules anymore, and that basically forced users to add all these now-missing indentation rules back into their.lispwords
(or otherwise indented files would look different than before).That led me to the following two questions:
.lispwords
), intentional or more of an oversight?In particular, I was thinking
lispindent
could try and read lispwords files from different locations, in this specified order:./.lispwords
: this is where users would define project-specific rules~/.lispwords
(or file located at the value ofLISPINDENT
environment variable): this is where users would try to override some default rules (maybe not applicable anymore, if by design you don't wantlispindent
to apply any defaults), or simply try to define some sane defaults for themselvesI could see why one could be against this proposed change of behavior (especially when collaborating with others, relying on a
.lispwords
file sitting on someone's home directory might not be a good idea), and to be honest, I am not 100% sold on the idea myself; however, I am looking for a way not to repeat the same indentation rules over and over again, in all of my projects'.lispwords
, and sourcing from the home, and the current working directory, was the best thing I could come up with.Let me know your thoughts.
Edit:
lispindent
should load.lispwords
from the home directory first, and then from the current working directory, but clearly that would not work as expected.The text was updated successfully, but these errors were encountered: