rider開發C#隱藏煩人的x usage


真是服了,明明一個輔助性的東西,非要占據一行,C#的換行風格也令人頭痛

1. 關閉代碼上的顯示x usages

2. 代碼風格:


好在rider設置代碼風格還算簡單,一個一個的弄也就一小時弄完了

[*]
charset=utf-8
end_of_line=crlf
trim_trailing_whitespace=false
insert_final_newline=false
indent_style=space
indent_size=4

# Microsoft .NET properties
csharp_new_line_before_members_in_object_initializers=false
csharp_new_line_before_open_brace=none
csharp_preferred_modifier_order=public, private, protected, internal, new, abstract, virtual, sealed, override, static, readonly, extern, unsafe, volatile, async:suggestion
csharp_style_expression_bodied_accessors=true:suggestion
csharp_style_expression_bodied_constructors=true:none
csharp_style_expression_bodied_methods=true:none
csharp_style_expression_bodied_properties=true:suggestion
csharp_style_var_elsewhere=true:hint
csharp_style_var_for_built_in_types=true:hint
csharp_style_var_when_type_is_apparent=true:hint
dotnet_style_predefined_type_for_locals_parameters_members=true:hint
dotnet_style_predefined_type_for_member_access=true:hint
dotnet_style_qualification_for_event=false:hint
dotnet_style_qualification_for_field=false:hint
dotnet_style_qualification_for_method=false:hint
dotnet_style_qualification_for_property=false:hint
dotnet_style_require_accessibility_modifiers=for_non_interface_members:hint

# ReSharper properties
resharper_align_first_arg_by_paren=true
resharper_align_linq_query=true
resharper_align_multiline_argument=true
resharper_align_multiline_array_and_object_initializer=true
resharper_align_multiline_calls_chain=true
resharper_align_multiline_expression=true
resharper_align_multiline_extends_list=true
resharper_align_multiline_parameter=true
resharper_align_multiline_switch_expression=true
resharper_align_multiple_declaration=true
resharper_align_multline_type_parameter_constrains=true
resharper_align_multline_type_parameter_list=true
resharper_align_tuple_components=true
resharper_allow_comment_after_lbrace=true
resharper_arguments_anonymous_function=named
resharper_arguments_literal=named
resharper_arguments_named=named
resharper_arguments_string_literal=named
resharper_autodetect_indent_settings=true
resharper_braces_for_for=required
resharper_braces_for_foreach=required
resharper_braces_for_ifelse=required
resharper_braces_for_while=required
resharper_csharp_stick_comment=false
resharper_force_attribute_style=join
resharper_indent_anonymous_method_block=true
resharper_indent_nested_foreach_stmt=true
resharper_indent_nested_for_stmt=true
resharper_indent_nested_while_stmt=true
resharper_indent_preprocessor_if=outdent
resharper_indent_preprocessor_other=outdent
resharper_int_align=true
resharper_local_function_body=expression_body
resharper_outdent_binary_ops=true
resharper_outdent_commas=true
resharper_use_indent_from_vs=false

# ReSharper inspection severities
resharper_redundant_base_qualifier_highlighting=warning
resharper_web_config_module_not_resolved_highlighting=warning
resharper_web_config_type_not_resolved_highlighting=warning
resharper_web_config_wrong_module_highlighting=warning

[*.{appxmanifest,asax,ascx,aspx,build,cs,cshtml,dtd,master,nuspec,razor,resw,resx,skin,vb,xaml,xamlx,xoml,xsd}]
indent_style=space
indent_size=4
tab_width=4

上面內容保存到“.editorconfig”文件並用rider導入設置即可


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM