diff options
-rw-r--r-- | Documentation/EmacsConfiguration.md | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Documentation/EmacsConfiguration.md b/Documentation/EmacsConfiguration.md index bcf9d2afc8..1abcc882f8 100644 --- a/Documentation/EmacsConfiguration.md +++ b/Documentation/EmacsConfiguration.md @@ -54,4 +54,10 @@ There are multiple packages to handle auto formatting with - [format-all-mode](https://github.com/lassik/emacs-format-all-the-code) - [clang-format-plus](https://github.com/SavchenkoValeriy/emacs-clang-format-plus) +Alternatively, this can be done without additional packages, using `lsp-mode`. +You can use the following `.dir-locals.el` file placed in the project root: + +```lisp +((c++-mode + (eval add-hook 'before-save-hook #'lsp-format-buffer nil t))) ``` |