From b4c4d9247a953db05293023a5040c5270ce38791 Mon Sep 17 00:00:00 2001 From: Chris Kipp Date: Sun, 3 Oct 2021 13:52:21 +0200 Subject: [PATCH] Add suport for type on code selection. This adds in initial support, but this issue in Metals should be merged in first: https://github.com/scalameta/metals/pull/3178. Closes #228 --- lua/metals.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/metals.lua b/lua/metals.lua index 98114c7..482a5c3 100644 --- a/lua/metals.lua +++ b/lua/metals.lua @@ -370,6 +370,10 @@ M.show_javap_verbose = function() )) end +M.type_of_range = function() + vim.lsp.buf_request(0, "textDocument/hover", vim.lsp.util.make_given_range_params()) +end + -- Since we want metals to be the entrypoint for everything, just for ensure that it's -- easy to set anything for users, we simply include them in here and then expose them. M.bare_config = setup.bare_config