diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-10-19 17:42:19 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-10-19 17:42:19 +0800 |
commit | 5a8bb48667aacb0e478e97507642b439f86471c3 (patch) | |
tree | 136b1271c7fbfb1278cc0541de204bd6e5778a02 /server-beta | |
parent | d9b4f493f08d55f479cebfcc6f16130ba0d6b35f (diff) | |
download | lua-language-server-5a8bb48667aacb0e478e97507642b439f86471c3.zip |
一些细节
Diffstat (limited to 'server-beta')
-rw-r--r-- | server-beta/src/files.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/server-beta/src/files.lua b/server-beta/src/files.lua index a0346010..9a90aabb 100644 --- a/server-beta/src/files.lua +++ b/server-beta/src/files.lua @@ -36,7 +36,9 @@ function m.setText(uri, text) uri = uri:lower() end if not m.fileMap[uri] then - m.fileMap[uri] = {} + m.fileMap[uri] = { + uri = originUri, + } end local file = m.fileMap[uri] if file.text == text then @@ -88,6 +90,7 @@ function m.getAst(uri) if file.ast == nil then local state, err = parser:compile(file.text, 'lua', config.config.runtime.version) if state then + state.uri = file.uri file.ast = state else log.error(err) |