summaryrefslogtreecommitdiff
path: root/script/method/textDocument/didChange.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-07-08 19:51:10 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-07-08 19:51:10 +0800
commitae3a20cfd5ea89919326a6499c5a3c93fdfe2120 (patch)
treeb4b337b82bda3a14f300ab30862efd12b6e10650 /script/method/textDocument/didChange.lua
parent5354d8c339ddb6487f3c0ec1b240eb3e93d19585 (diff)
downloadlua-language-server-ae3a20cfd5ea89919326a6499c5a3c93fdfe2120.zip
fix #187
Diffstat (limited to 'script/method/textDocument/didChange.lua')
-rw-r--r--script/method/textDocument/didChange.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/script/method/textDocument/didChange.lua b/script/method/textDocument/didChange.lua
index 83701662..fd8af6ba 100644
--- a/script/method/textDocument/didChange.lua
+++ b/script/method/textDocument/didChange.lua
@@ -1,3 +1,5 @@
+local fn = require 'filename'
+
--- @param lsp LSP
--- @param params table
--- @return boolean
@@ -7,7 +9,7 @@ return function (lsp, params)
local ws = lsp:findWorkspaceFor(doc.uri)
if ws then
local path = ws:relativePathByUri(doc.uri)
- if not path or not ws:isLuaFile(path) then
+ if not path or not fn.isLuaFile(path) then
return
end
if not lsp:isOpen(doc.uri) and ws.gitignore(path:string()) then