From 81e4e357248e616503d7ae9e54677a823c7e2c0d Mon Sep 17 00:00:00 2001 From: Anthony Perkins Date: Sun, 4 Jun 2023 09:50:26 +0100 Subject: [PATCH] Add .editorconfig --- roles/home-cli/files/editorconfig | 8 ++++---- roles/home-cli/tasks/dotfiles.yml | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/roles/home-cli/files/editorconfig b/roles/home-cli/files/editorconfig index 6b303b0..49d2667 100644 --- a/roles/home-cli/files/editorconfig +++ b/roles/home-cli/files/editorconfig @@ -1,7 +1,7 @@ -[*.{c,cpp,h}] -indent_style = tab -indent_size = tab -tab_width = 8 +[*] charset = utf-8 +end_of_line = lf trim_trailing_whitespace = true insert_final_newline = true +indent_style = space +indent_size = 4 diff --git a/roles/home-cli/tasks/dotfiles.yml b/roles/home-cli/tasks/dotfiles.yml index ed9cca5..bb74ca7 100644 --- a/roles/home-cli/tasks/dotfiles.yml +++ b/roles/home-cli/tasks/dotfiles.yml @@ -49,6 +49,10 @@ ansible.builtin.copy: src: clang-format dest: "{{ ansible_env.HOME }}/.clang-format" +- name: Create $HOME/.editorconfig + ansible.builtin.copy: + src: editorconfig + dest: "{{ ansible_env.HOME }}/.editorconfig" - name: Create $HOME/.local/bin/docutils-setup ansible.builtin.copy: src: docutils-setup.sh