set goimports location
Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
parent
57bd0b8161
commit
91be7a4d79
|
@ -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)
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue