Uses projectile-compile-command instead of legacy <f9>
This commit is contained in:
18
.emacs
18
.emacs
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
;(toggle-debug-on-error)
|
||||
(setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3")
|
||||
;lsp performances
|
||||
@@ -80,7 +78,6 @@
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Keymap
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
(global-set-key (kbd "<f9>") 'compile)
|
||||
|
||||
(use-package smart-tabs-mode
|
||||
:config
|
||||
@@ -337,13 +334,24 @@
|
||||
)
|
||||
|
||||
(use-package go-mode
|
||||
:after (projectile)
|
||||
:config
|
||||
(setq gofmt-command "goimports")
|
||||
(unbind-key "C-c C-d" go-mode-map)
|
||||
(add-hook 'before-save-hook 'gofmt-before-save)
|
||||
(setq compile-command "go build && go test -coverprofile=cover.out && go tool cover -html cover.out -o /tmp/cover.html")
|
||||
;;(setq compile-command "go build && go test -coverprofile=cover.out && go tool cover -html cover.out -o /tmp/cover.html")
|
||||
(defun go-compile-command ()
|
||||
"returns a string to compile a go project"
|
||||
(setq project-makefile (concat (file-name-as-directory (projectile-project-root)) "Makefile"))
|
||||
(if (file-exists-p project-makefile)
|
||||
(concat "make -C" (projectile-project-root))
|
||||
"go build && go test && go vet"
|
||||
)
|
||||
)
|
||||
(projectile-update-project-type
|
||||
'go
|
||||
:compile 'go-compile-command)
|
||||
)
|
||||
|
||||
(use-package glsl-mode)
|
||||
(use-package opencl-mode)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user