Skip to content
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

Add convenience command lsp-metals-open-server-log #104

Merged
Merged
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
10 changes: 10 additions & 0 deletions lsp-metals.el
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,16 @@ WORKSPACE is the workspace the client command was received from."
(interactive)
(lsp-send-execute-command "reset-workspace" ()))

(defun lsp-metals-open-server-log ()
"Open a buffer with the metals log for the current workspace."
(interactive)
(if-let ((root (lsp-workspace-root)))
(if-let* ((log-file (f-join (file-name-as-directory root) ".metals" "metals.log"))
((f-exists-p log-file)))
(progn (find-file log-file) (goto-char (point-max)))
(user-error "%s does not exist, are you in the right directory?" log-file))
(user-error "No LSP workspace is in effect")))

(lsp-defun lsp-metals--publish-decorations (workspace (&PublishDecorationsParams :uri :options))
"Handle the metals/publishDecorations extension notification.
WORKSPACE is the workspace the notification was received from."
Expand Down
Loading