-
-
Notifications
You must be signed in to change notification settings - Fork 66
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
Support for local settings #28
Comments
File type in particular is troublesome because we're already activating on the file type event. But yeah, this was always part of my grand plan. I just surprisingly haven't felt a need for it, at all. |
I guess that there would have to be special-cases certain settings, which could become a bit tough to maintain. Maybe it's better for things like Such a case is represented here, where Django convention is to name templates with a Another useful case that I can see from this is that I want to be able to provide settings for one of my Vim plugins on a per-file basis and thought that projectionist represents the right way to solve that particular problem. |
Make a list of options you'd like to set, and we can evaluate how to proceed. Only other thing I've thought of has been indenting, but personally I'm content to use sleuth.vim for that. Regarding plugins, I think the ideal solution there is for plugins to manage that themselves. See By the way, you can drop all the hand-wringing about |
I think that the only options I've run into myself which I've wanted this feature for were indent-based options as well as the There is a case where I've wanted to change It seems that |
Early version had an |
I'm usually pretty insistent on people using the conventions for the given language, so I don't think that inconsistencies would be the reason that I've had issues with sleuth. In that same sense, I also use hard tabs in Go, Java, and C++ (for instance) because that is the conventional / recommended code style. I'm pretty sure that If any of these are features that you think is worth supporting, what do you think that the best interface for this would be? |
Just tried sleuth.vim on a random Go file, and it got confused by a multiline string, so perhaps there a further improvements to be had. Feel free to open an issue. Vim's indenting options are a confusing mess, so the last thing I want to do is use that as an inspiration for our interface. I'm thinking something like this instead:
One major hitch in hooking this up is that indent settings shouldn't mix from different projections (a After tackling indent, |
@tpope I'm wondering if this is still worth keeping open considering editorconfig has solved the indentation problem and a Vim plugin is available that works just fine alongside a projection file. Might be time to close this one? |
Don't get me started on editorconfig, but yeah, barring a flash of insight I don't anticipate working on this. |
It would be nice if projectionist allowed users to define settings for specific patterns. For instance, the following configuration might exist:
I considered just having a filetype setting as well, but it seems like this is a more flexible way to solve the problem. I'm wondering if you think that this is useful or out-of-scope before I tried to write it and send over a pull request.
The text was updated successfully, but these errors were encountered: