Created
July 16, 2024 22:05
-
-
Save pivaldi/ba31b3c28fcf8264b38b2ea982e436f3 to your computer and use it in GitHub Desktop.
Emacs Project Local Variables for Go developer to Configure lsp-go-build-flags and flycheck-golangci-lint-config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; Put this file in the root directory of your Go project | |
;;; For more information see (info "(emacs) Directory Variables") | |
;;; https://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html | |
((nil . ((eval . (setq local_project_root_path | |
(projectile-project-root)) | |
))) | |
(go-mode . ((eval . (set (make-local-variable 'flycheck-golangci-lint-config) (concat local_project_root_path ".golangci.yml"))) | |
(subdirs . true))) | |
(go-mode . ((eval . (set (make-local-variable 'lsp-go-build-flags) (vector "-tags=no_pprof"))) | |
(subdirs . true))) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment