;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\210\300\306!\210\307\310\311\312\313\301\314\315\316\317& \210\320\321\322\323\324DD\325\313\310\326\327\316\330& \210\320\331\322\323\332DD\333\313\310\326\334\316\335& \210\320\336\322\323\337DD\340\313\310\326\341\316\342& \210\320\343\322\323\344DD\345\313\310\326\327\316\346& \210\320\347\322\323\350DD\351\313\310\326\327\316\352& \210\320\353\322\323\354DD\355\313\310\326\356\316\357& \210\320\360\322\323\361DD\362\313\310\326\356\316\363& \210\320\364\322\323\365DD\366\313\310\326\356\316\367& \210\320\370\322\323\371DD\372\326\373\313\310\316\374& \210\320\375\322\323\376DD\377\326\201@\313\310\316\201A& \210\320\201B\322\323\201CDD\201D\326\201E\313\310\316\201F& \210\320\201G\322\323\201HDD\201I\326\201J\313\310\316\201K& \210\320\201L\322\323\201MDD\201N\326\201O\313\310\316\201P& \210\320\201Q\322\323\201RDD\201S\326\201T\313\310\316\201U& \210\320\201V\322\323\201WDD\201X\326\201Y\313\310\316\201Z& \210\320\201[\322\323\201\\DD\201]\326\201^\313\310\316\201_& \210\320\201`\322\323\201aDD\201b\326\201c\313\310\316\201d& \210\320\201e\322\323\201fDD\201g\326\201^\313\310\316\201h& \210\320\201i\322\323\201jDD\201k\326\201^\313\310\316\201l& \210\320\201m\322\323\201nDD\201o\326\201^\313\310\316\201p& \210\320\201q\322\323\201rDD\201s\326\201^\313\310\316\201t& \210\320\201u\322\323\201vDD\201w\326\201x\313\310\316\201y& \210\201z\201{!\207" [require lsp-mode dap-mode lsp-lens lsp-metals-protocol lsp-metals-treeview view custom-declare-group lsp-metals nil "LSP support for Scala, using Metals." :group :link (url-link "https://scalameta.org/metals") :package-version (lsp-metals . "1.0") custom-declare-variable lsp-metals-server-command funcall function #[0 "\300\207" [#1="metals"] 1 #1#] "The command to launch the Scala language server." :type file (lsp-metals . "1.0") lsp-metals-server-args #[0 "\300\207" [nil] 1] "Extra arguments for the Scala language server." (repeat string) (lsp-metals . "1.0") lsp-metals-server-install-dir #[0 "\301\302\"\207" [lsp-server-install-dir f-join "metals/"] 3] "Installation directory for Metals server." directory (lsp-metals . "1.2") lsp-metals-coursier-store-path #[0 "\301\302\"\207" [lsp-metals-server-install-dir f-join "coursier"] 3] "The path where Coursier will be stored." (lsp-metals . "1.2") lsp-metals-metals-store-path #[0 "\301\302\"\207" [lsp-metals-server-install-dir f-join "metals"] 3] "The path where Metals will be stored." (lsp-metals . "1.2") lsp-metals-coursier-download-url #[0 "\301=\203\302\207\303\207" [system-type windows-nt "https://git.io/coursier-cli-windows-exe" "https://git.io/coursier-cli"] 2] "Download url for coursier." string (lsp-metals . "1.2") lsp-metals-coursier-asc-url #[0 "\301=\203\302\207\303\207" [system-type windows-nt "https://raw.githubusercontent.com/coursier/launchers/master/cs-x86_64-pc-win32.exe.asc" "https://raw.githubusercontent.com/coursier/launchers/master/coursier.asc"] 2] "ASC signature url for coursier." (lsp-metals . "1.2") lsp-metals-install-version #[0 "\300\207" [#2="latest.release"] 1 #2#] "Metals version to install." (lsp-metals . "1.2") lsp-metals-java-home #[0 "\300\207" [#3=""] 1 #3#] "The Java Home directory.\nIt's used for indexing JDK sources and locating the `java' binary." (string) (lsp-metals . "1.0") lsp-metals-scalafmt-config-path #[0 "\300\207" [#3#] 1 #3#] "Optional custom path to the .scalafmt.conf file.\nShould be relative to the workspace root directory and use forward\nslashes / for file separators (even on Windows)." (string) (lsp-metals . "1.0") lsp-metals-sbt-script #[0 "\300\207" [#3#] 1 #3#] "Optional absolute path to an `sbt' executable.\nBy default, Metals uses `java -jar sbt-launch.jar' with an embedded\nlauncher while respecting `.jvmopts' and `.sbtopts'. Update this\nsetting if your `sbt' script requires more customizations like using\nenvironment variables." (string) (lsp-metals . "1.0") lsp-metals-gradle-script #[0 "\300\207" [#3#] 1 #3#] "Optional absolute path to a `gradle' executable.\nBy default, Metals uses gradlew with 5.3.1 gradle version. Update\nthis setting if your `gradle' script requires more customizations like\nusing environment variables." (string) (lsp-metals . "1.0") lsp-metals-maven-script #[0 "\300\207" [#3#] 1 #3#] "Optional absolute path to a `maven' executable.\nBy default, Metals uses mvnw maven wrapper with 3.6.1 maven version.\nUpdate this setting if your `maven' script requires more\ncustomizations." (string) (lsp-metals . "1.0") lsp-metals-mill-script #[0 "\300\207" [#3#] 1 #3#] "Optional absolute path to a `mill' executable.\nBy default, Metals uses mill wrapper script with 0.5.0 mill version.\nUpdate this setting if your mill script requires more customizations\nlike using environment variables." (string) (lsp-metals . "1.0") lsp-metals-pants-targets #[0 "\300\207" [#3#] 1 #3#] "Space separated list of Pants targets to export.\nFor example, `src/main/scala:: src/main/java::'. Syntax such as\n`src/{main,test}::' is not supported." (string) (lsp-metals . "1.0") lsp-metals-bloop-sbt-already-installed #[0 "\300\207" [nil] 1] "If true, Metals will not generate a `project/metals.sbt' file.\nThis assumes that sbt-bloop is already manually installed in the sbt\nbuild. Build import will fail with a 'not valid command bloopInstall`\nerror in case Bloop is not manually installed in the build when using\nthis option." boolean (lsp-metals . "1.0") lsp-metals-bloop-version #[0 "\300\207" [nil] 1] "The version of Bloop to use.\nThis version will be used for the Bloop build tool plugin, for any\nsupported build tool, while importing in Metals as well as for running\nthe embedded server." (choice (const :tag "Default" nil) (string :tag "Version")) (lsp-metals . "1.0") lsp-metals-super-method-lenses-enabled #[0 "\300\207" [nil] 1] "If True, super method lenses will be shown.\nSuper method lenses are visible above methods definition that override\nanother methods. Clicking on a lens jumps to super method definition.\nDisabled lenses are not calculated for opened documents which might\nspeed up document processing." (lsp-metals . "1.0") lsp-metals-show-implicit-arguments #[0 "\300\207" [nil] 1] "If True, implicit argument annotations will be shown.\nWhen this option is enabled, each method that has implicit arguments has them\ndisplayed either as additional decorations." (lsp-metals . "1.2") lsp-metals-show-implicit-conversions-and-classes #[0 "\300\207" [nil] 1] "If True, implicit conversions and classes will be shown.\nWhen this option is enabled, each place where an implicit method or class is\nused has it displayed either as additional decorations." (lsp-metals . "1.2") lsp-metals-show-inferred-type #[0 "\300\207" [nil] 1] "If True, inferred type annotations will be shown.\nWhen this option is enabled, each method that can have inferred types has them\ndisplayed either as additional decorations." (lsp-metals . "1.2") lsp-metals-remote-language-server #[0 "\300\207" [#3#] 1 #3#] "A URL pointing to a remote language server." (string) (lsp-metals . "1.0") lsp-register-custom-settings (("metals.java-home" lsp-metals-java-home) ("metals.scalafmt-config-path" lsp-metals-scalafmt-config-path) ("metals.sbt-script" lsp-metals-sbt-script) ("metals.gradle-script" lsp-metals-gradle-script) ("metals.maven-script" lsp-metals-maven-script) ("metals.mill-script" lsp-metals-mill-script) ("metals.pants-targets" lsp-metals-pants-targets) ("metals.bloop-sbt-already-installed" lsp-metals-bloop-sbt-already-installed t) ("metals.bloop-version" lsp-metals-bloop-version) ("metals.super-method-lenses-enabled" lsp-metals-super-method-lenses-enabled t) ("metals.show-implicit-arguments" lsp-metals-show-implicit-arguments t) ("metals.show-implicit-conversions-and-classes" lsp-metals-show-implicit-conversions-and-classes t) ("metals.show-inferred-type" lsp-metals-show-inferred-type t) ("metals.remote-language-server" lsp-metals-remote-language-server))] 10) (defconst lsp-metals--coursier-pgp-key "\n-----BEGIN PGP PUBLIC KEY BLOCK-----\nComment: Hostname:\nVersion: Hockeypuck ~unreleased\n\nxsBNBF4xoUYBCAC46u7PaAXxHvolldZKqUm52SCpXudT03lGd56rb82MJUKnQNFk\nsg8kLyo7NnMyr3w0nhRngxA5ewegrBiaR9sjPpWbuT/t1FWfewidNuhqgKAiPowO\nYb+1a8Axy8okrzkEo5sRlmQgFgp7vRqri3LXp83G+nFsoDnV/YcavFrAcfK0lCvY\nm/S8rcrOuqkfxfkFpIkIjkdxVFWlkfBZG4sxvrXTCYGJeTSsAKEYNJanq6DaUTjX\nf6y0oHpREb0/n1GJstqSQk0BIqW+Zkt3J3sPS6QZk3XPftSHJxmI7vb3IM9fW5T5\n5yTWJaD/RJVBGqWbFYoGheb6kAgfu5LEe6DvABEBAAHNXUFsZXhhbmRyZSBBcmNo\nYW1iYXVsdCAoVHJhdmlzIENJIGNvdXJzaWVyKSA8YWxleGFuZHJlLmFyY2hhbWJh\ndWx0K3RyYXZpc2NpY291cnNpZXJAZ21haWwuY29tPsLAlAQTAQgAPhYhBIAR/Unc\nF0nNZBN6880bnY3ITspWBQJeMaFGAhsDBQkDwmcABQsJCAcCBhUICQoLAgQWAgMB\nAh4BAheAAAoJEM0bnY3ITspW8MMH/iyczeDl/qPRn4raBoVZ+fmKkNannjC8/uSr\n4ezMS1+8icaLNlWRiW49Apt4PkrGiOPtUhhsnc8c3TT9OK+ZLyONbqVIPoUGibwE\nFLii5szHXEc0M9SviVocxfNjFXu7xzj7OzWvBlC3Yp5KmL5c3gz6oFIKG9Te24mL\nAl2+eqxLsHxLyoNMo/llmjU0XNELXIegfh/dOja099W2mCk5ax1+xJQ/QzU38aaB\nzeanNQhLAE9JpL8M5NgVYBLDLikyzx5AHmPotv5IimaBqJAn7IBDtzRLThhY3Kgw\nKaDGzztFX9RGINzB98iSdB+vUnOiW4gNkyj7ephvryKlGjwIXcPOwE0EXjGhRgEI\nANNDjQQdHtiVSU7bbtJqlXE6qxGh5jP62nCecO4waDxlWlC5tTMlh4zS3SOIkjxr\n9c59WH+pbFFwNq2ax1PimWupI0GbnT+NSxrkL9zw01TCqKqn5Ows/eWTGPCJrMzr\n6K2T4+0YIRwFWc/U8yFPrj+0zSAFriQulr5CKbT6JLb+TrXtw0BK2OYU7MpQQihF\nS4TZcb9EO4PYO7G3Vgdbz+MVBXauoiCYKWmqMxsAmMY/9/AswnYIe8POriIS5a+E\nBxiAnxflMiqCHFVw6ZSSGU7V4PKAxBzF8sQZnGE/+j6kXrDtZg6AG7f0+XMqNaah\n7lMFQ3Hk66sIuF9B/eL8mEkAEQEAAcLAfAQYAQgAJhYhBIAR/UncF0nNZBN6880b\nnY3ITspWBQJeMaFGAhsMBQkDwmcAAAoJEM0bnY3ITspWkz4H/AzycUhNRkXwuJ/2\nrOov48WpBjeZ1oywGjLm50XFR4KSXB4PTNVV7VgHVtJ7jbHQNACew2rl4i53Zrvq\n6kzrK8l2JpdtnjWOvZ2ho6+2Lg2pcLGEoj91YmXeK0ngSAHp+wFVedh1fveLLLUf\nxDdfr7Vs7fmtwVwWsfLNmAGu4FAuLOR0p6kep7d3HQY181GjnCuxMBMmVS/1v8Wx\nLwgd0loRNRw/17GRRHGmFINGvbJ7HxhxQAuIG7z4IuxHEXLM8Gjoq1uJP7Vm67f9\nQGPHxHBRXBR1M4ZX5zkUWuziRT9XCXKbLMRqimh9v+Y5TNeMe0x1ukcDLMsnFdrF\nOpELeQg=\n=u8An\n-----END PGP PUBLIC KEY BLOCK-----\n") (byte-code "\306\307\310\311\312\313 \314\n\315 \316BBBBBBBBB#\210\306\317\320\fD\320 D#\207" [lsp-metals-coursier-download-url lsp-metals-coursier-asc-url lsp-metals--coursier-pgp-key lsp-metals-coursier-store-path lsp-metals-server-command lsp-metals-metals-store-path lsp-dependency coursier (:system "coursier") :download :url :asc-url :pgp-key :store-path (:set-executable\? t) metals :system] 13) #@53 Generate the Scala language server startup command. (defalias 'lsp-metals--server-command #[0 "\301\302!B\207" [lsp-metals-server-args lsp-package-path metals] 2 (#$ . 10534)]) #@143 Install metals server via coursier. Will invoke CALLBACK on success, ERROR-CALLBACK on error. (fn CLIENT CALLBACK ERROR-CALLBACK UPDATE\=\?) (defalias 'lsp-metals--download-server #[1028 "\300\301\302\303\"#\207" [lsp-package-ensure coursier make-closure #[0 "\303\304\305!\306\307\310!\311\312\313\314\313\315\316 P\317\320\317\321\322\n\323&\210\300 \207" [V0 lsp-metals-install-version lsp-metals-metals-store-path call-process lsp-package-path coursier nil get-buffer-create "*Coursier log*" t "bootstrap" "--java-opt" "-Xss4m" "-Xms100m" "org.scalameta:metals_2.12:" "-r" "bintray:scalacenter/releases" "sonatype:snapshots" "-o" "-f"] 18]] 9 (#$ . 10719)]) #@76 Unconditionally run `sbt bloopInstall` and re-connect to the build server. (defalias 'lsp-metals-build-import #[0 "\300\301\302\"\207" [lsp-metals-treeview--send-execute-command-async "build-import" nil] 3 (#$ . 11392) nil]) #@73 Unconditionally cancel existing build server connection and re-connect. (defalias 'lsp-metals-build-connect #[0 "\300\301\302\"\207" [lsp-metals-treeview--send-execute-command-async "build-connect" nil] 3 (#$ . 11623) nil]) #@66 Open the Metals doctor to troubleshoot potential build problems. (defalias 'lsp-metals-doctor-run #[0 "\300\301\302\"\207" [lsp-send-execute-command "doctor-run" nil] 3 (#$ . 11853) nil]) #@70 Walk all files in the workspace and index where symbols are defined. (defalias 'lsp-metals-sources-scan #[0 "\300\301\302\"\207" [lsp-metals-treeview--send-execute-command-async "sources-scan" nil] 3 (#$ . 12047) nil]) #@146 Reset a decision you made about different settings. E.g. If you choose to import workspace with sbt you can decide to reset and change it again. (defalias 'lsp-metals-reset-choice #[0 "\300\301\302\"\207" [lsp-send-execute-command "reset-choice" nil] 3 (#$ . 12273) nil]) #@52 Copy worksheet with evaluated results as comments. (defalias 'lsp-metals-copy-worksheet-output #[0 "\300\301\302 \"\303\304\"\211\205\305!\210\306\307!\207" [lsp-send-execute-command "metals.copy-worksheet-output" lsp--buffer-uri lsp-get :value kill-new message "Copied worksheet output."] 4 (#$ . 12551) nil]) #@67 Convert provided stacktrace in the region to a format with links. (defalias 'lsp-metals-analyze-stacktrace #[0 "\302 \205\205\303\304\"\305 \306 {\307\310\311!\"\262)\207" [default-directory lsp--cur-workspace use-region-p lsp-find-workspace metals region-beginning region-end lsp-send-execute-command "metals.analyze-stacktrace" vector] 5 (#$ . 12872) nil]) #@78 Calculate inheritance hierarchy of a class that should contain given method. (defalias 'lsp-metals-super-method-hierarchy #[0 "\300\301\302\303 \304\305`!F\"\207" [lsp-send-execute-command "super-method-hierarchy" :document lsp--buffer-uri :position lsp-point-to-position] 7 (#$ . 13246) nil]) #@65 Render the Metals doctor HTML in the current buffer. (fn HTML) (defalias 'lsp-metals--doctor-render #[257 "\303\304!\210\305\300!\210\306\305\301!\210\306\307 \210\211c\210\310ed\"\210eb\210\311\312!\210\313\211\207" [show-trailing-whitespace buffer-read-only view-exit-action require shr make-local-variable nil erase-buffer shr-render-region view-mode 1 kill-buffer] 4 (#$ . 13546)]) #@64 Generate doctor buffer name for the WORKSPACE. (fn WORKSPACE) (defalias 'lsp-metals--generate-doctor-buffer-name #[257 "\300\301\302\303H!\"\207" [format "*Metals Doctor: %s*" process-id 8] 6 (#$ . 13942)]) #@188 Focus on a window displaying troubleshooting help from the Metals doctor. HTML is the help contents. WORKSPACE is the workspace the client command was received from. (fn WORKSPACE HTML) (defalias 'lsp-metals--doctor-run #[514 "\300\301!!\210\302!\207" [pop-to-buffer lsp-metals--generate-doctor-buffer-name lsp-metals--doctor-render] 5 (#$ . 14158)]) #@199 Reload the HTML contents of an open Doctor window, if any. Should be ignored if there is no open doctor window. WORKSPACE is the workspace the client command was received from. (fn WORKSPACE HTML) (defalias 'lsp-metals--doctor-reload #[514 "\300\301!!\211\205r\211q\210\302!)\207" [get-buffer lsp-metals--generate-doctor-buffer-name lsp-metals--doctor-render] 5 (#$ . 14519)]) #@86 Move the cursor focus to the provided LOCATION. (fn WORKSPACE LOCATION &optional _) (defalias 'lsp-metals--goto-location #[770 "\301C!\302\300!\203\303!\304\305 BC\"\207\306\307\"\207" [xref-show-definitions-function lsp--locations-to-xref-items boundp -const window selected-window xref--show-xrefs nil] 8 (#$ . 14907)]) #@159 A client COMMAND that should be forwarded back to the Metals server. WORKSPACE is the workspace the client command was received from. (fn WORKSPACE COMMAND) (defalias 'lsp-metals--echo-command #[514 "\301!)\207" [lsp--cur-workspace lsp-send-execute-command] 4 (#$ . 15243)]) #@43 Interactively switch between BSP servers. (defalias 'lsp-metals-bsp-switch #[0 "\300\301\302\"\207" [lsp-send-execute-command "bsp-switch" nil] 3 (#$ . 15528) nil]) #@62 Generate a Scala BSP Config based on the current BSP server. (defalias 'lsp-metals-generate-bsp-config #[0 "\300\301\302\"\207" [lsp-send-execute-command "generate-bsp-config" nil] 3 (#$ . 15699) nil]) #@145 Handle the metals/publishDecorations extension notification. WORKSPACE is the workspace the notification was received from. (fn INPUT0 INPUT1) (defalias 'lsp-metals--publish-decorations #[514 "\301\302\"\301\303\"\304!\305!\211\205\"r\211q\210\306\307!\210\310\311\")\266\202)\207" [lsp--cur-workspace gethash "uri" "options" lsp--uri-to-path find-buffer-visiting lsp--remove-overlays metals-decoration mapc lsp-metals--make-overlay] 10 (#$ . 15908)]) #@53 Create overlay from metals decoration. (fn INPUT0) (defalias 'lsp-metals--make-overlay #[257 "\300\301\"\300\302\"\300\303\"\304!\305@A\306\307\211%\300\310\"\211\2035\300\311\"\211\2034\312\313\314\315\307\316\317%#\210\210\210\203F\300\320\"\312\321#\266\312\322\307#\207" [gethash "range" "renderOptions" "hoverMessage" lsp--range-to-region make-overlay nil t "after" "contentText" overlay-put after-string propertize cursor font-lock-face font-lock-comment-face "value" help-echo metals-decoration] 17 (#$ . 16376)]) #@90 Toggle focus on the logs reported by the server via `window/logMessage'. (fn WORKSPACE) (defalias 'lsp-metals--logs-toggle #[257 "\300\301\302!!\207" [switch-to-buffer get-buffer-create "*lsp-log*"] 4 (#$ . 16924)]) #@75 Focus on the window that lists all published diagnostics. (fn WORKSPACE) (defalias 'lsp-metals--diagnostics-focus #[257 "\300 \207" [lsp-treemacs-errors-list] 2 (#$ . 17147)]) #@147 Handle the metals/executeClientCommand extension notification. WORKSPACE is the workspace the notification was received from. (fn INPUT0 INPUT1) (defalias 'lsp-metals--execute-client-command #[514 "\300\301\"\300\302\"\303\267\202+\304\2024\305\2024\306\2024\307\2024\310\2024\311\2024\312\2024\313\314\315\"\210\262\211\205B\316\317C\313#\"\207" [gethash "command" "arguments" #s(hash-table size 7 test equal rehash-size 1.5 rehash-threshold 0.8125 purecopy t data ("metals-doctor-run" 15 "metals-doctor-reload" 19 "metals-logs-toggle" 23 "metals-diagnostics-focus" 27 "metals-goto-location" 31 "metals-echo-command" 35 "metals-model-refresh" 39)) lsp-metals--doctor-run lsp-metals--doctor-reload lsp-metals--logs-toggle lsp-metals--diagnostics-focus lsp-metals--goto-location lsp-metals--echo-command lsp-metals--model-refresh nil lsp-warn "Unknown metals client command: %s" apply append] 12 (#$ . 17331)]) #@73 Current buffer used to send `metals/didFocusTextDocument' notification. (defvar lsp-metals--current-buffer nil (#$ . 18268)) #@124 Send `metals/windowStateDidChange' notification on frames focus change. FOCUSED if there is a focused frame. (fn FOCUSED) (defalias 'lsp-metals--window-state-did-change #[257 "\300\301\302BC\"\207" [lsp-notify "metals/windowStateDidChange" focused] 5 (#$ . 18400)]) #@40 Get the list of all metals workspaces. (defalias 'lsp-metals--workspaces #[0 "\300\301\302 !\303\300\211\203-\211A\262\242\262\262T\262\304H\305H\306=\203B\262\202\266\211\237\207" [nil lsp--session-workspaces lsp-session 0 5 15 metals] 7 (#$ . 18674)]) #@59 Add hooks for `metals/windowStateDidChange' notification. (defalias 'lsp-metals--add-focus-hooks '(macro . #[0 "\300\301!\203\302\207\303\207" [boundp after-focus-change-function (progn (defun lsp-metals--handle-focus-change nil "Send `metals/windowStateDidChange' notification on frames focus change." (let ((focused (if (and (fboundp 'frame-focus-state) (frame-focus-state)) t :json-false))) (--each (lsp-metals--workspaces) (with-lsp-workspace it (lsp-metals--window-state-did-change focused))))) (add-function :after after-focus-change-function 'lsp-metals--handle-focus-change)) (progn (defun lsp-metals--focus-in-hook nil "Send `metals/windowStateDidChange' notification when a frame gains focus." (--each (lsp-metals--workspaces) (with-lsp-workspace it (lsp-metals--window-state-did-change t)))) (add-hook 'focus-in-hook 'lsp-metals--focus-in-hook) (defun lsp-metals--focus-out-hook nil "Send `metals/windowStateDidChange' notification when all frames lost focus." (--each (lsp-metals--workspaces) (with-lsp-workspace it (lsp-metals--window-state-did-change :json-false)))) (add-hook 'focus-out-hook 'lsp-metals--focus-out-hook))] 2 (#$ . 18952)])) #@54 Send `metals/didFocusTextDocument' on buffer switch. (defalias 'lsp-metals--did-focus #[0 "p=?\205p\301\302\303 \"\207" [lsp-metals--current-buffer lsp-notify "metals/didFocusTextDocument" lsp--buffer-uri] 3 (#$ . 20116)]) #@44 Prepare CONF for debug session. (fn CONF) (defalias 'lsp-metals-populate-config #[257 "\300\301\"\203\300\302\"\203\207\303\304\305\306\307\300\310\"\311\232\203#\312\202,\300\307\"\206,\313\314\300 \314\"\206E\305\315\316\317 \206@\320\321!!\322PD!\257!\"\323\324\"\323\325\"\326\211\211\211\302\300\n\302\"\206b#\310\300\326\n\302\300 \302\"\206s\n#\310\"\206z\327#\330\300\326\211\n\302\300 \302\"\206\214\n#\310\300\326 \302\300\302\"\206\235 #\310\"\206\244\327#\330\"\206\253\331#\301\300\326\211\211\n\302\300 \302\"\206\276\n#\310\300\326 \302\300\302\"\206\317 #\310\"\206\326\327#\330\300\326\211 \302\300\302\"\206\350 #\310\300\326\302\300\302\"\206\371#\310\"\206\327#\330\"\206\331#\301\"\206\332\333\334\"AA@!#\207" [plist-get :debugServer :name lsp-send-execute-command "debug-adapter-start" vector :data :dataKind :request "attach" "scala-attach-remote" "scala-main-class" :targets :uri lsp--path-to-uri lsp-workspace-root error "The debug provide can be called under project root" "?id=root" gethash "name" "uri" plist-put "launch" :host "localhost" string-to-number split-string ":"] 22 (#$ . 20349)]) (byte-code "\300\301\302\"\210\303\304\305\"\210\303\306\307\"\207" [dap-register-debug-provider "scala" lsp-metals-populate-config dap-register-debug-template "Scala Main Class" (:class "" :name "Scala Main Class" :arguments #1=[] :jvmOptions #1# :environmentVariables #1#) "Scala Attach" (:type "scala" :request "attach" :name "Scala Attach" :hostName "localhost" :port 0)] 3) #@139 Start debug session. If NO-DEBUG is true launch the program without enabling debugging. PARAMS are the action params. (fn INPUT0 INPUT1) (defalias 'lsp-metals--debug-start #[514 "\300\301\"\302\303\"\300\304\"\300\305\"\306\307\310\311\312\"AA@!\313\314\315\316\317\320\321\322\257\f!\207" [gethash "arguments" lsp-send-execute-command "debug-adapter-start" "name" "uri" dap-debug :debugServer string-to-number split-string ":" :type "scala" :name :host "localhost" :request "launch" :noDebug] 20 (#$ . 21940)]) #@142 Handle `metals-model-refresh' notification refreshing lenses. WORKSPACE is the workspace the notification was received from. (fn WORKSPACE) (defalias 'lsp-metals--model-refresh #[257 "\300\301\302H\"\207" [mapc #[257 "r\211q\210\301\300!\205\205\302\303!)\207" [lsp-lens-mode boundp lsp-lens--schedule-refresh t] 3 "\n\n(fn BUFFER)"] 9] 5 (#$ . 22470)]) #@170 Keymap for `metals/status' notification. WORKSPACE is the workspace we received notification from. COMMAND is the client command to execute. (fn WORKSPACE COMMAND\=\?) (defalias 'lsp-metals--status-string-keymap #[514 "\211\205\300 \301\302\303\304##\210\211\262\207" [make-sparse-keymap define-key [mode-line mouse-1] make-closure #[0 "\302\300\303\304\301\"\"\207" [V0 V1 lsp-metals--execute-client-command lsp-make-execute-command-params :command] 5 nil nil]] 10 (#$ . 22838)]) #@116 Handle `metals/status' notification. WORKSPACE is the workspace we received notification from. (fn INPUT0 INPUT1) (defalias 'lsp-metals--status-string #[514 "\300\301\"\300\302\"\300\303\"\300\304\"\204\305!\203\"\306\307\"\207\306\310\311\312\313 \"%\"\207" [gethash "text" "hide" "tooltip" "command" s-blank-str\? lsp-workspace-status nil propertize help-echo local-map lsp-metals--status-string-keymap] 16 (#$ . 23335)]) (byte-code "\300\301\302\303\304!\305\306\307\310\311\312\313\314\315\316\"\317\320\321#\210\317\322\323#\210\317\324\325#\210\317\326\327#\210\317\330\331#\210\211\262\332\314\315\316\"\317\333\334\335\336\"#\210\317\337\334\335\340\"#\210\211\262\341\342\343\344\345\346\347\340\350\351&!\207" [lsp-register-client make-lsp-client :new-connection lsp-stdio-connection lsp-metals--server-command :major-modes (scala-mode) :priority -1 :initialization-options ((decorationProvider . t) (inlineDecorationProvider . t) (didFocusProvider . t) (executeClientCommandProvider . t) (doctorProvider . "html") (statusBarProvider . "on") (debuggingProvider . t) (treeViewProvider . t)) :notification-handlers make-hash-table :test equal puthash "metals/executeClientCommand" lsp-metals--execute-client-command "metals/publishDecorations" lsp-metals--publish-decorations "metals/treeViewDidChange" lsp-metals-treeview--did-change "metals-model-refresh" lsp-metals--model-refresh "metals/status" lsp-metals--status-string :action-handlers "metals-debug-session-start" -partial lsp-metals--debug-start :json-false "metals-run-session-start" t :server-id metals :initialized-fn #[257 "\301\302\303\"\210\304\305\306\307B\302\310$\210\211\311\312\313!!)\207" [lsp--cur-workspace defalias lsp-metals--handle-focus-change #[0 "\301\302!\203\302 \203\303\202\304\305 \306\307\211\2052\211A\262\242\262\262T\262\310!\210)\202\207" [lsp--cur-workspace fboundp frame-focus-state t :json-false lsp-metals--workspaces 0 nil lsp-metals--window-state-did-change] 7 "Send `metals/windowStateDidChange' notification on frames focus change."] advice--add-function :after #[0 "\300\301!\207" [default-value after-focus-change-function] 2] #[257 "\300\301\"\207" [set-default after-focus-change-function] 4 "\n\n(fn GV--VAL)"] nil lsp--set-configuration lsp-configuration-section "metals"] 6 "\n\n(fn WORKSPACE)"] :after-open-fn #[0 "\300\301\302\303\304$\207" [add-hook lsp-on-idle-hook lsp-metals--did-focus nil t] 5] :completion-in-comments\? :download-server-fn lsp-metals--download-server] 24) #@222 Create a toggle for lsp-metal config. NAME is a user-facing name used for the interactive command. CONFIG is the LSP configuration name. VAR is the variable holding the value of the configuration. (fn NAME CONFIG VAR) (defalias 'lsp-metals--create-bool-toggle '(macro . #[771 "\300\301\302\"!\303\304\301\305\"\306\307\310 DE\311\312\301\313\f\"\n\314BBCDD\315\316\317\320\f\321BBDC\322\323\317FE\257 \207" [intern format "lsp-metals-toggle-%s" defun nil "Toggle LSP metals %s config" (interactive) setq not lsp-register-custom-settings quote "metals.%s" (t) (with-lsp-workspaces (lsp-metals--workspaces) (lsp--set-configuration (lsp-configuration-section "metals"))) let status if ("on" "off") lsp--info "Turned %s %s"] 18 (#$ . 25888)])) #@45 Toggle LSP metals show-inferred-type config (defalias 'lsp-metals-toggle-show-inferred-type #[0 "?\302\303!\210\304 \305\306\307!!\210)\203\310\202\311\312\313\314#\207" [lsp-metals-show-inferred-type lsp--buffer-workspaces lsp-register-custom-settings (("metals.show-inferred-type" lsp-metals-show-inferred-type t)) lsp-metals--workspaces lsp--set-configuration lsp-configuration-section "metals" "on" "off" lsp--info "Turned %s %s" "show-inferred-type"] 5 (#$ . 26649) nil]) #@50 Toggle LSP metals show-implicit-arguments config (defalias 'lsp-metals-toggle-show-implicit-arguments #[0 "?\302\303!\210\304 \305\306\307!!\210)\203\310\202\311\312\313\314#\207" [lsp-metals-show-implicit-arguments lsp--buffer-workspaces lsp-register-custom-settings (("metals.show-implicit-arguments" lsp-metals-show-implicit-arguments t)) lsp-metals--workspaces lsp--set-configuration lsp-configuration-section "metals" "on" "off" lsp--info "Turned %s %s" "show-implicit-arguments"] 5 (#$ . 27141) nil]) #@51 Toggle LSP metals show-super-method-lenses config (defalias 'lsp-metals-toggle-show-super-method-lenses #[0 "?\302\303!\210\304 \305\306\307!!\210)\203\310\202\311\312\313\314#\207" [lsp-metals-super-method-lenses-enabled lsp--buffer-workspaces lsp-register-custom-settings (("metals.super-method-lenses-enabled" lsp-metals-super-method-lenses-enabled t)) lsp-metals--workspaces lsp--set-configuration lsp-configuration-section "metals" "on" "off" lsp--info "Turned %s %s" "show-super-method-lenses"] 5 (#$ . 27663) nil]) #@52 Toggle LSP metals show-implicit-conversions config (defalias 'lsp-metals-toggle-show-implicit-conversions #[0 "?\302\303!\210\304 \305\306\307!!\210)\203\310\202\311\312\313\314#\207" [lsp-metals-show-implicit-conversions-and-classes lsp--buffer-workspaces lsp-register-custom-settings (("metals.show-implicit-conversions-and-classes" lsp-metals-show-implicit-conversions-and-classes t)) lsp-metals--workspaces lsp--set-configuration lsp-configuration-section "metals" "on" "off" lsp--info "Turned %s %s" "show-implicit-conversions"] 5 (#$ . 28200) nil]) (provide 'lsp-metals)