Skip to content

Scala Metals Treeview #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Oct 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
- [[#lsp-treemacs-deps-list][lsp-treemacs-deps-list]]
- [[#commands-1][Commands]]
- [[#screenshot-2][Screenshot]]
- [[#lsp-metals-treeview][lsp-metals-treeview]]
- [[#commands-2][Commands]]
- [[#screenshot-3][Screenshot]]

* Summary
Integration between ~lsp-mode~ and ~treemacs~ .
Expand All @@ -31,3 +34,50 @@
- ~lsp-treemacs-java-deps-refresh~ - refresh the view. Bound to ~r~.
*** Screenshot
[[file:screenshots/dependencies.gif]]
** lsp-metals-treeview
Support for Scala Metals treeview. The treeview is disabled by default in order
to enable the treeview use one of the following configuration approaches.
If you are using use-package:
#+BEGIN_SRC elisp

(use-package lsp-treemacs
:config
(lsp-metals-treeview-enable t)
(setq lsp-metals-treeview-show-when-views-received t))

#+END_SRC

lsp-metals-treeview-show-when-views-received when true will automatically
display the treeview when Metals has initialised the project and sent the
initial top level treeview information. If you wish to keep the tree hidden and
show it explicitly via a command or a bound key leave the variable false
(default) and show the treeview using M-x lsp-metals-treeview.

Alternatively if you're not using use-package:

#+BEGIN_SRC elisp

(require 'lsp-metals-treeview)
(lsp-metals-treeview-enable t)
(setq lsp-metals-treeview-show-when-views-received t)

#+END_SRC

The metals can be displayed at anytime by using M-x lsp-metals-treeview.

To enable logging of metals treeview actions/responses use the variable
lsp-metals-treeview-logging (boolean). All messages will be logged to the lsp
logging buffer.

*** Commands
q - when the treeview has focus it can be hidden using the q key. To show the
tree use M-x lsp-metals-treeview or bind this function to a key.

lsp-shutdown-workspace will automatically close the treeview associated with the
current file buffer.

When switching files the treeview will switch to the treeview associated with
the new workspace.

*** Screenshot
[[file:screenshots/metals-treeview.gif]]
Binary file added icons/metals/class.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/metals/enum.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/metals/field.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/metals/interface.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/metals/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/metals/method.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/metals/object.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/metals/trait.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/metals/val.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/metals/var.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading