Skip to content

Commit 2ad93dc

Browse files
committed
README.org updates for Metals lsp-treemacs treeview.
Add configuration and usage instructions for Metals lsp-treemacs treeview along with animated screenshot.
1 parent 9bf5442 commit 2ad93dc

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed

README.org

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
- [[#lsp-treemacs-deps-list][lsp-treemacs-deps-list]]
1010
- [[#commands-1][Commands]]
1111
- [[#screenshot-2][Screenshot]]
12+
- [[lsp-metals-treeview]]
13+
- [[Metals Commands][Commands]]
14+
- [[Metals Screenshot][Screenshot]]
1215

1316
* Summary
1417
Integration between ~lsp-mode~ and ~treemacs~ .
@@ -31,3 +34,50 @@
3134
- ~lsp-treemacs-java-deps-refresh~ - refresh the view. Bound to ~r~.
3235
*** Screenshot
3336
[[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+
*** <<Metals Commands>>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+
*** <<Metals Screenshot>>Screenshot
83+
[[file:screenshots/metals-treeview.gif]]

screenshots/metals-treeview.gif

958 KB
Loading

0 commit comments

Comments
 (0)