config.phundrak.com/org/config/rustfmt.org
Lucien Cartier-Tilet a958ee8a60
Remove unused parts, updated my theme
== ALL FILES ==
The org TOCs were unused on export, and Spacemacs makes it useless.
This commits removes them. The startup header of org files is moved to
the header file.

== AWESOME ==
In the Awesome file, this commit removes everything about custom theme
creation as this part is not yet used. I also remade and reorganized
the windows titlebars.
Theme files for Awesome shall be added soon. The wallpaper functions
were updated accordingly.

In the autostart part, I updated some commands (picom will not launch
if another instance is already running, same for the XFCE polkit), and
I added PumoPM to the autolaunched software (power management). Due to
some issues, I also let Awesome one second before launching
`set-screens'.

== AWESOME AND CUSTOM SCRIPTS ==
This commit also removes any usage of pywal. My Awesome configuration
and my custom scripts were updated accordingly.

== CUSTOM SCRIPTS ==
In bin.org, the script `pape-restore' has been removed since it can
now be replaced with the command `nitrogen --restore'. `pape-update'
has also been updated so it doesn’t depend on `pape-restore' and gets
a random wallpaper for nitrogen to set without the help of pywal.

== XRESOURCES / ST AND PICOM ==
St’s transparency was tweaked to match my windows’ titlebar
transparency. It also got the Nord theme mentionned above. Some custom
Picom rule about St’s transparency has been removed.

== PICOM ==
I made it clearer in the index and on Picom’s page Picom is the new
Compton.

== FIREFOX ==
A new git submodule (blurredfox-nord) has been added, which adds some
transparency to Firefox as well as some Nord colors.

== I3 AND POLYBAR ==
My i3 and Polybar config have been deprecated since I do not use them
anymore.

== SPACEMACS ==
Changed shortcuts for config files
2020-08-22 16:46:33 +02:00

3.2 KiB
Raw Blame History

Rust format config

Introduction

The .rustfmt.toml file located in the $HOME directory is a global configuration file for Rusts code formatters, such as rustfmt. In this file, you can find how my Rust code is always formatted.

General settings

First, we are using the 2018 edition of Rust.

  edition = "2018"

Put single-expression functions on a single line.

  fn_single_line = true

Format string literals where necessary.

  format_strings = true

Maximum width of each line

  max_width = 80

Merge multiple imports into a single nested import.

  merge_imports = true

Structs and Enums

The maximum length of enum variant having discriminant, that gets vertically aligned with others. Variants without discriminants would be ignored for the purpose of alignment.

Note that this is not how much whitespace is inserted, but instead the longest variant name that doesn't get ignored when aligning.

  enum_discrim_align_threshold = 20

The maximum diff of width between struct fields to be aligned with each other.

  struct_field_align_threshold = 20

Reorder impl items. type and const are put first, then macros and methods.

  reorder_impl_items = true

Comments

Convert /* */ comments to // comments where possible.

  normalize_comments = true

Break comments to fit on the line.

  wrap_comments = true

Report FIXME items in comments.

  report_fixme = "Always"

Report TODO items in comments.

  todo = "Always"

Documentation

Format code snippet included in doc comments.

  format_code_in_doc_comments = true

Convert #![doc] and #[doc] attributes to //! and /// doc comments.

  normalize_doc_attributes = true

Whitespace

Use tab characters for indentation, spaces for alignment.

  hard_tabs = false

Number of spaces per tab.

  tab_spaces = 4

I want newlines to always be Unix style.

  newline_style = "Unix"