From 789a3e93e7d403daf8e508606a1b946409658855 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Fri, 21 Dec 2018 14:32:14 +0800 Subject: =?UTF-8?q?require=20=E6=96=87=E6=9C=AC=E7=9A=84hover?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/workspace.lua | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'server/src/workspace.lua') diff --git a/server/src/workspace.lua b/server/src/workspace.lua index c2478e40..655dd873 100644 --- a/server/src/workspace.lua +++ b/server/src/workspace.lua @@ -175,6 +175,12 @@ function mt:reset() self.lsp:reCompile() end +function mt:relativePathByUri(uri) + local path = uriDecode(uri) + local relate = fs.relative(path, self.root) + return relate +end + return function (lsp, name, uri) local workspace = setmetatable({ lsp = lsp, -- cgit v1.2.3