Integration between lsp-mode and treemacs and implementation of treeview controls using treemacs as a tree renderer.
To enable bidirectional synchronization of lsp workspace folders and treemacs projects.
(lsp-treemacs-sync-mode 1)
Displays tree like error list structure.
lsp-treemacs-quick-fix
or pressx
when you are in Error List view - offer quickfixes for the error at point.
Displays symbols information.
Display references/implementations using tree view:
Browse java dependencies, namespaces, files, etc.
lsp-treemacs-java-deps-follow
- select the current editor in the dependencylsp-treemacs-java-deps-refresh
- refresh the view. Bound tor
.
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:
(use-package lsp-treemacs
:config
(lsp-metals-treeview-enable t)
(setq lsp-metals-treeview-show-when-views-received t))
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:
(require 'lsp-metals-treeview)
(lsp-metals-treeview-enable t)
(setq lsp-metals-treeview-show-when-views-received t)
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.
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.