diff options
author | sumneko <sumneko@hotmail.com> | 2019-05-14 15:45:30 +0800 |
---|---|---|
committer | sumneko <sumneko@hotmail.com> | 2019-05-14 15:45:30 +0800 |
commit | fe3930a9f692c07eede7de3cb341ea0749b2e2ba (patch) | |
tree | 2a6afe9867f58888b35c46279137748285bfb1f7 /server/src/method/textDocument/didChange.lua | |
parent | d163b9a06e5e3006a7d33270576c767a9a38c4de (diff) | |
download | lua-language-server-fe3930a9f692c07eede7de3cb341ea0749b2e2ba.zip |
非包含的文件在打开后允许更新
Diffstat (limited to 'server/src/method/textDocument/didChange.lua')
-rw-r--r-- | server/src/method/textDocument/didChange.lua | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/server/src/method/textDocument/didChange.lua b/server/src/method/textDocument/didChange.lua index 0235f431..b2cad74d 100644 --- a/server/src/method/textDocument/didChange.lua +++ b/server/src/method/textDocument/didChange.lua @@ -3,9 +3,10 @@ return function (lsp, params) local change = params.contentChanges if lsp.workspace then local path = lsp.workspace:relativePathByUri(doc.uri) - if not lsp.workspace:isLuaFile(path) - or lsp.workspace.gitignore(path:string()) - then + if not lsp.workspace:isLuaFile(path) then + return + end + if not lsp:isOpen(doc.uri) and lsp.workspace.gitignore(path:string()) then return end end |