-
-
Notifications
You must be signed in to change notification settings - Fork 579
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
[feature request] Project-local variables. #139
Comments
+1 |
Right now I use .dirlocals for this -- with this line inside: ((nil . ((eval . (setup-local-vars))))) But it would be nice if projectile could call such a hook without a .dirlocals file, which is a pain adding to each project. |
I'm thinking of something in the lines of modifying the format of |
@sabof already had some good ideas a while back, unfortunately I've been extremely busy lately and haven't started working on that feature yet. |
+1 |
+1. I think |
I have wanted this exact thing. Since .projectile is taken, .projectile.el might be usable as well. |
@kolya-ay Making |
the .dir-locals.el method works decently well; i use the same technique @dhaley mentions. It is, however, rather user-unfriendly. the .dir-locals.el method presents the user with a confirmation before applying elisp. These preferences (may) be saved in an init.el file automatically. See the function I think we could probably just lift this technique. Its a good bit of work, but the rewards are great. |
Would per project TAGS be a separate issue? I'm in a situation where I have multiple directories open with the same software, but different revisions (think fixing bugs in old versions), and would like to go to tags only in the same git repository as the buffer I'm in. |
+1 |
I wrote up a blog post about how I do this: http://joelmccracken.github.io/entries/project-local-variables-in-projectile-with-dirlocals/ |
+1 |
@joelmccracken I guess using a file like .projectile.el makes sense. It would be processed similarly to the way |
<3 Thanks! On Dec 2, 2013, at 11:42 AM, Bozhidar Batsov [email protected] wrote:
|
@joelmccracken Any progress? |
blah, nope. I still haven't had time to really work on this. I'll re-push this up in my queue. On Wed, Feb 12, 2014 at 4:11 AM, Bozhidar Batsov
|
+1 Looking forward to this feature. |
+1, though i would prefer extending .projectile with prefix characters # Coments, and @ or ( elisp-eval, that way it is all in the one place. |
+1 |
Reading this thread I don't understand what would be the differences I hope that it's not just two avoid having two files Can someone enlighten me? |
Now most configuration options are marked as safe anyways (meaning users won't get a warning when setting them in |
Interesting, I didn't know that. Edit: GitHub parsed my email incorrectly
|
This is going out of the scope of this thread but you can use M-x See the info page for more information (info "(emacs) Directory Variables"). I believe that going on with this feature would just mean to reinvent |
Yeah. It seems like this is a popular request, though -- would better documentation solve this problem? I wrote that blog post I linked to earlier. Would that be a good starting point for this? Maybe if the README had a section on this that would be helpful. I've been off the radar as far as open source goes for a while now. A bunch of IRL things have taken up my time. This is my most pressing open source commitment, though. It would be great if there was a way that was easy to use and could satisfy everyone. |
I think that a good section in the README regarding this would be good enough for most users. |
Check #387 |
@bbatsov I think I want to re-open this issue. There are a number of use cases that dir-locals doesn't work for, namely:
There are others, but this is all I remember at the moment. Thoughts? I still believe a file that allows for additional project metadata will be useful. |
I'm not too familiar with emacs, but what about exposing hooks for this purpose, something like |
I've successfully used For example, I wanted to customize my LSP server by resetting its initialization options, but that's not possible because LSP starts the server with the global options before You can get this to work, by adding the lsp mode invocation to It would be really nice if there were a more straightforward way to get this to work. I confess I'm not exactly sure what the right way to do it would be, other than reproducing some aspects of the existing dir-local capabilities. Or maybe we could ask the Emacs devs to modify the way dir-locals work, so that variables defined in the |
Since projectile is already an awesome tool for managing projects in emacs, maybe it could somehow provide users with a documented ability for easily defining (and using in your .emacs file) project-local variables?
The text was updated successfully, but these errors were encountered: