docs(rustfmt): remove rustfmt config
All checks were successful
deploy / build (push) Successful in 2m55s
All checks were successful
deploy / build (push) Successful in 2m55s
This commit is contained in:
parent
d1d8fa9f0d
commit
bcaeb2ac30
@ -66,7 +66,6 @@ export default defineUserConfig({
|
|||||||
'/mpd',
|
'/mpd',
|
||||||
'/neofetch',
|
'/neofetch',
|
||||||
'/picom',
|
'/picom',
|
||||||
'/rustfmt',
|
|
||||||
{
|
{
|
||||||
text: 'StumpWM',
|
text: 'StumpWM',
|
||||||
link: '/stumpwm/',
|
link: '/stumpwm/',
|
||||||
|
@ -568,7 +568,6 @@ files that are to be tangled:
|
|||||||
| mpd.org |
|
| mpd.org |
|
||||||
| neofetch.org |
|
| neofetch.org |
|
||||||
| picom.org |
|
| picom.org |
|
||||||
| rustfmt.org |
|
|
||||||
| stumpwm.org |
|
| stumpwm.org |
|
||||||
| tmux.org |
|
| tmux.org |
|
||||||
|
|
||||||
@ -583,7 +582,7 @@ files that are to be tangled:
|
|||||||
"\n")
|
"\n")
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
#+RESULTS[127dafd79461dab55296163e57fadb7b355a205a]: generate-tangle
|
#+RESULTS[8b74ad716447b62ace4eeddbd3dae7a1b1bdcdd7]: generate-tangle
|
||||||
#+begin_example
|
#+begin_example
|
||||||
printf '\n\n==== Tangling bin.org\n\n' && \
|
printf '\n\n==== Tangling bin.org\n\n' && \
|
||||||
emacs -q --batch --eval '(require \'ob-tangle)' \
|
emacs -q --batch --eval '(require \'ob-tangle)' \
|
||||||
@ -620,11 +619,6 @@ emacs -q --batch --eval '(require \'ob-tangle)' \
|
|||||||
--eval '(setq org-confirm-babel-evaluate nil)' \
|
--eval '(setq org-confirm-babel-evaluate nil)' \
|
||||||
--eval '(org-babel-tangle-file "~/org/config/picom.org")'
|
--eval '(org-babel-tangle-file "~/org/config/picom.org")'
|
||||||
|
|
||||||
printf '\n\n==== Tangling rustfmt.org\n\n' && \
|
|
||||||
emacs -q --batch --eval '(require \'ob-tangle)' \
|
|
||||||
--eval '(setq org-confirm-babel-evaluate nil)' \
|
|
||||||
--eval '(org-babel-tangle-file "~/org/config/rustfmt.org")'
|
|
||||||
|
|
||||||
printf '\n\n==== Tangling stumpwm.org\n\n' && \
|
printf '\n\n==== Tangling stumpwm.org\n\n' && \
|
||||||
emacs -q --batch --eval '(require \'ob-tangle)' \
|
emacs -q --batch --eval '(require \'ob-tangle)' \
|
||||||
--eval '(setq org-confirm-babel-evaluate nil)' \
|
--eval '(setq org-confirm-babel-evaluate nil)' \
|
||||||
|
105
docs/rustfmt.org
105
docs/rustfmt.org
@ -1,105 +0,0 @@
|
|||||||
#+TITLE: Rust Formatter
|
|
||||||
#+setupfile: headers
|
|
||||||
#+PROPERTY: header-args:toml :mkdirp yes :tangle ~/.rustfmt.toml
|
|
||||||
|
|
||||||
* Rust Formatter
|
|
||||||
The ~.rustfmt.toml~ file located in the ~$HOME~ directory is a global
|
|
||||||
configuration file for Rust’s 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.
|
|
||||||
#+BEGIN_SRC toml
|
|
||||||
edition = "2018"
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
Put single-expression functions on a single line.
|
|
||||||
#+BEGIN_SRC toml
|
|
||||||
fn_single_line = true
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
Format string literals where necessary.
|
|
||||||
#+BEGIN_SRC toml
|
|
||||||
format_strings = true
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
Maximum width of each line
|
|
||||||
#+BEGIN_SRC toml
|
|
||||||
max_width = 80
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
Merge multiple imports into a single nested import.
|
|
||||||
#+BEGIN_SRC toml
|
|
||||||
merge_imports = true
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
** 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.
|
|
||||||
#+BEGIN_SRC toml
|
|
||||||
enum_discrim_align_threshold = 20
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
The maximum diff of width between struct fields to be aligned with
|
|
||||||
each other.
|
|
||||||
#+BEGIN_SRC toml
|
|
||||||
struct_field_align_threshold = 20
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
Reorder =impl= items. =type= and =const= are put first, then macros and
|
|
||||||
methods.
|
|
||||||
#+BEGIN_SRC toml
|
|
||||||
reorder_impl_items = true
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
** Comments
|
|
||||||
Convert ~/* */~ comments to ~//~ comments where possible.
|
|
||||||
#+BEGIN_SRC toml
|
|
||||||
normalize_comments = true
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
Break comments to fit on the line.
|
|
||||||
#+BEGIN_SRC toml
|
|
||||||
wrap_comments = true
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
Report ~FIXME~ items in comments.
|
|
||||||
#+BEGIN_SRC toml
|
|
||||||
report_fixme = "Always"
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
Report ~TODO~ items in comments.
|
|
||||||
#+BEGIN_SRC toml
|
|
||||||
todo = "Always"
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
** Documentation
|
|
||||||
Format code snippet included in doc comments.
|
|
||||||
#+BEGIN_SRC toml
|
|
||||||
format_code_in_doc_comments = true
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
Convert ~#![doc]~ and ~#[doc]~ attributes to ~//!~ and ~///~ doc comments.
|
|
||||||
#+BEGIN_SRC toml
|
|
||||||
normalize_doc_attributes = true
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
** Whitespace
|
|
||||||
Use tab characters for indentation, spaces for alignment.
|
|
||||||
#+BEGIN_SRC toml
|
|
||||||
hard_tabs = false
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
Number of spaces per tab.
|
|
||||||
#+BEGIN_SRC toml
|
|
||||||
tab_spaces = 4
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
I want newlines to always be Unix style.
|
|
||||||
#+BEGIN_SRC toml
|
|
||||||
newline_style = "Unix"
|
|
||||||
#+END_SRC
|
|
Loading…
Reference in New Issue
Block a user