diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2018-12-21 14:32:14 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2018-12-21 14:32:14 +0800 |
commit | 789a3e93e7d403daf8e508606a1b946409658855 (patch) | |
tree | 5047b1433f3b2d7281ef2841658dd0836369d583 /server/src/workspace.lua | |
parent | e50a8947ab1c6016e3763e76e0c3bedfa1b9c002 (diff) | |
download | lua-language-server-789a3e93e7d403daf8e508606a1b946409658855.zip |
require 文本的hover
Diffstat (limited to 'server/src/workspace.lua')
-rw-r--r-- | server/src/workspace.lua | 6 |
1 files changed, 6 insertions, 0 deletions
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, |