emacs-lsp / lsp-treemacs

lsp-mode :heart: treemacs
GNU General Public License v3.0
398 stars 47 forks source link

Add option to close lsp-treemacs buffer on RET action #34

Closed ericdallo closed 3 years ago

ericdallo commented 4 years ago

When an option from lsp-treemacs is chosen (for example open references file), it does not close the lsp-treemacs buffer, it just goes to the file and keep the buffer open. Can we add some configuration/option to enable this behavior?

nbfalcon commented 3 years ago

After the mentioned PR is merged, the following config snippet will do what you want:

(eval-after-load 'lsp-treemacs          ; `after!' for DOOM
  (add-hook 'lsp-treemacs-after-jump-hook
            (lambda () (kill-buffer lsp-treemacs-symbols-buffer-name))))