-
Notifications
You must be signed in to change notification settings - Fork 37
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
Make namespace
line position configurable
#99
Comments
I, too, would like this feature. |
How would a reformat take care of this? Is there an option for this in omnisharp or .editorconfig? |
Reformat would probably work. For people who don't configure a formatter to abide by their standards, it would butcher their code to be weirdly modifyable. Omnisharp settings are like walking into linux for the first time without prior knowledge. Very complex. I don't even know if they have a reformatter. I dont use them. I do understand the ramifications. I keep it very java-like. Fully qualified usings and namespace. |
TBH I didn't remember about that point. Well, I must admit that it seems pretty hard task to do and honestly not a responsibility of the formatter. Drop that.
Haven't found anything in both of them. Currently even though .editorconfig would have specified a configuration for it, the current templates generation won't either consider it. It will generate class/enum/interface based on the static templates, doesn't it? Side note:
The request here is not about to create a configuration enabled for default, which I can image will start to create inconsistency over all the extension users. But rather opt-in the configuration for those users which have the needs to do like so. My team decided to have namespace on top of the file, means that in the next months I'll spend time to move the namespace on top of any created files first and then start to write my code... |
Omnisharp does provide a formatter. I do not see any option for the namespace position though: https://github.com/OmniSharp/omnisharp-roslyn/wiki/Configuration-Options Otherwise, this could be implemented by having 2 replacement variables in the templates, or by simply placing the namespace at the beginning of the file. I'd rather have this functionality by using an existing tool. |
Current behavior
namespace in class/interface/struct etc... always appears after using block.
Expected behavior
The name space position should be configurable to be either after the using block for default or when the configuration flag is ticked on top of the class:
e.g.
Default position:
When option is enabled:
Reformat feature should take care about the new configuration property.The text was updated successfully, but these errors were encountered: