set goimports location

Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
Cadey Ratio 2023-06-15 14:03:33 -04:00
parent 57bd0b8161
commit 91be7a4d79
1 changed files with 3 additions and 1 deletions

View File

@ -214,6 +214,7 @@ in {
lsp-mode = { lsp-mode = {
enable = true; enable = true;
after = [ "go-mode" "rust-mode" ];
command = [ "lsp" ]; command = [ "lsp" ];
hook = [ hook = [
"(go-mode . lsp)" "(go-mode . lsp)"
@ -222,6 +223,7 @@ in {
]; ];
config = '' config = ''
(setq lsp-rust-server 'rust-analyzer) (setq lsp-rust-server 'rust-analyzer)
(add-hook 'go-mode-hook 'lsp-deferred)
''; '';
}; };
@ -511,7 +513,7 @@ in {
go-mode = { go-mode = {
enable = true; enable = true;
config = '' config = ''
(setq gofmt-command "goimports") (setq gofmt-command "${pkgs.gotools}/bin/goimports")
(add-hook 'before-save-hook #'gofmt-before-save) (add-hook 'before-save-hook #'gofmt-before-save)
''; '';
}; };