M-x add-dir-local-variable RET
Mode or subdirectory (default ....): nil RET
Add directory local variable: eval RET
Add eval with expression: (progn (company-mode t)(flycheck-mode t)) RET
Above will automatically turn on company-mode & flycheck-mode for the project files.
---------------------------------------------------
M-x add-dir-local-variable RET
Mode or subdirectory (default ....): c++-mode RET
Add directory local variable: flycheck-clang-language-standard RET
Add eval with expression: "c++20"
Similary add other variables so that final .dir-locals.el file looks like below:
;;; Directory Local Variables -*- no-byte-compile: t -*-
;;; For more information see (info "(emacs) Directory Variables")
((nil . ((eval . (progn
(company-mode t)
(flycheck-mode t)))))
(c++-mode . ((flycheck-clang-language-standard . "c++20")
(flycheck-clang-include-path . ("/usr/include/postgresql"))
(flycheck-gcc-include-path . ("/usr/include/postgresql")))))
=============
DONE!
Comments
Post a Comment
If you have any doubts, please let me know.