From 97a994b49f6cf4bc6b747b456dfce5060bc2df79 Mon Sep 17 00:00:00 2001 From: Leonard de Ruijter <3049216+LeonarddeR@users.noreply.github.com> Date: Wed, 3 Jul 2024 07:28:26 +0200 Subject: [PATCH] Add .editorconfig file (#16795) Summary of the issue: Following the recent attempts to uniformize code style with linting, it makes sense to add an .editorconfig file, as this is the format that is widely supported by IDEs out of the box. Visual Studio code insists on sticking to space indentation for new files and sometimes switches from tab to space indentation for Python files. This is fixed with .editorconfig and an editorconfig extension in Visual Studio code. Description of user facing changes Added .editorconfig Description of development approach .editorconfig file according to NVDA's code style. --- .editorconfig | 12 ++++++++++++ user_docs/en/changes.md | 2 ++ 2 files changed, 14 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000000..fe116578832 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,12 @@ +root = true + +[*] +end_of_line = lf +insert_final_newline = true + +[*.{cpp,h,py}] +charset = utf-8 +indent_style = tab +tab_width = 4 +trim_trailing_whitespace = true +max_line_length = 110 diff --git a/user_docs/en/changes.md b/user_docs/en/changes.md index e930c5077f4..ac7566c8276 100644 --- a/user_docs/en/changes.md +++ b/user_docs/en/changes.md @@ -12,6 +12,8 @@ Please refer to [the developer guide](https://www.nvaccess.org/files/nvda/documentation/developerGuide.html#API) for information on NVDA's API deprecation and removal process. +* Added a `.editorconfig` file to NVDA's repository in order for several IDEs to pick up basic NVDA code style rules by default. (#16795, @LeonarddeR) + #### Deprecations ## 2024.3