|
9 | 9 | - [[#lsp-treemacs-deps-list][lsp-treemacs-deps-list]]
|
10 | 10 | - [[#commands-1][Commands]]
|
11 | 11 | - [[#screenshot-2][Screenshot]]
|
| 12 | + - [[#lsp-metals-treeview][lsp-metals-treeview]] |
| 13 | + - [[#commands-2][Commands]] |
| 14 | + - [[#screenshot-3][Screenshot]] |
12 | 15 |
|
13 | 16 | * Summary
|
14 | 17 | Integration between ~lsp-mode~ and ~treemacs~ .
|
|
31 | 34 | - ~lsp-treemacs-java-deps-refresh~ - refresh the view. Bound to ~r~.
|
32 | 35 | *** Screenshot
|
33 | 36 | [[file:screenshots/dependencies.gif]]
|
| 37 | +** lsp-metals-treeview |
| 38 | +Support for Scala Metals treeview. The treeview is disabled by default in order |
| 39 | +to enable the treeview use one of the following configuration approaches. |
| 40 | +If you are using use-package: |
| 41 | +#+BEGIN_SRC elisp |
| 42 | + |
| 43 | +(use-package lsp-treemacs |
| 44 | + :config |
| 45 | + (lsp-metals-treeview-enable t) |
| 46 | + (setq lsp-metals-treeview-show-when-views-received t)) |
| 47 | + |
| 48 | +#+END_SRC |
| 49 | + |
| 50 | +lsp-metals-treeview-show-when-views-received when true will automatically |
| 51 | +display the treeview when Metals has initialised the project and sent the |
| 52 | +initial top level treeview information. If you wish to keep the tree hidden and |
| 53 | +show it explicitly via a command or a bound key leave the variable false |
| 54 | +(default) and show the treeview using M-x lsp-metals-treeview. |
| 55 | + |
| 56 | +Alternatively if you're not using use-package: |
| 57 | + |
| 58 | +#+BEGIN_SRC elisp |
| 59 | + |
| 60 | +(require 'lsp-metals-treeview) |
| 61 | +(lsp-metals-treeview-enable t) |
| 62 | +(setq lsp-metals-treeview-show-when-views-received t) |
| 63 | + |
| 64 | +#+END_SRC |
| 65 | + |
| 66 | +The metals can be displayed at anytime by using M-x lsp-metals-treeview. |
| 67 | + |
| 68 | +To enable logging of metals treeview actions/responses use the variable |
| 69 | +lsp-metals-treeview-logging (boolean). All messages will be logged to the lsp |
| 70 | +logging buffer. |
| 71 | + |
| 72 | +*** Commands |
| 73 | +q - when the treeview has focus it can be hidden using the q key. To show the |
| 74 | +tree use M-x lsp-metals-treeview or bind this function to a key. |
| 75 | + |
| 76 | +lsp-shutdown-workspace will automatically close the treeview associated with the |
| 77 | +current file buffer. |
| 78 | + |
| 79 | +When switching files the treeview will switch to the treeview associated with |
| 80 | +the new workspace. |
| 81 | + |
| 82 | +*** Screenshot |
| 83 | +[[file:screenshots/metals-treeview.gif]] |
0 commit comments