diff options
| author | Miquel Sabaté Solà <mikisabate@gmail.com> | 2024-07-10 15:11:18 +0200 |
|---|---|---|
| committer | Miquel Sabaté Solà <mikisabate@gmail.com> | 2024-07-10 15:11:18 +0200 |
| commit | 1e281a0b536ef0c90cecbc91519e3710a2e16e48 (patch) | |
| tree | 8a966e5e17d53c0a8cc794a07caecd49ded993fb /.config/doom/config.el | |
| parent | 23d2661e82c2bfe6f02a55c39d3cd77f661d4a58 (diff) | |
| download | dotfiles-1e281a0b536ef0c90cecbc91519e3710a2e16e48.tar.gz dotfiles-1e281a0b536ef0c90cecbc91519e3710a2e16e48.zip | |
emacs: add LSP + tree-sitter
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
Diffstat (limited to '.config/doom/config.el')
| -rw-r--r-- | .config/doom/config.el | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/.config/doom/config.el b/.config/doom/config.el index e42a082..f238364 100644 --- a/.config/doom/config.el +++ b/.config/doom/config.el @@ -159,6 +159,9 @@ ;;; Programming languages. +;; NOTE: workaround found in: https://github.com/emacs-lsp/lsp-mode/issues/3577#issuecomment-2064491363 +(require 'lsp-mode) + ;; Flags to be passed to `clangd' for LSP integration. (after! lsp-clangd (setq lsp-clients-clangd-args @@ -170,6 +173,12 @@ "--header-insertion-decorators=0")) (set-lsp-priority! 'clangd 2)) +;; Go: ensure `goimports' is applied on save. +(add-hook 'go-mode-hook #'lsp-deferred) +(defun lsp-go-install-save-hooks () + (add-hook 'before-save-hook #'lsp-organize-imports)) +(add-hook 'go-mode-hook #'lsp-go-install-save-hooks) + ;;; Organization ;; Setting this variable before org-mode loads. |
