summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2021-10-01 16:32:15 +0800
committersumneko <sumneko@hotmail.com>2021-10-01 16:32:15 +0800
commit375ca5ed76ecbdb7b30939a736131ac77e0baed0 (patch)
treee60d4cd0081b4df17c2fb8387f0e1592416000e8 /script
parent9175822e6c84fc52ef77215117d46f78619cf3cd (diff)
downloadlua-language-server-375ca5ed76ecbdb7b30939a736131ac77e0baed0.zip
watch directory
Diffstat (limited to 'script')
-rw-r--r--script/provider/provider.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/script/provider/provider.lua b/script/provider/provider.lua
index b4cf8b49..75ed4b4f 100644
--- a/script/provider/provider.lua
+++ b/script/provider/provider.lua
@@ -22,7 +22,8 @@ local function updateConfig()
new = cfgLoader.loadLocalConfig(CONFIGPATH)
config.setSource 'path'
log.debug('load config from local', CONFIGPATH)
- filewatch.watch(workspace.getAbsolutePath(CONFIGPATH))
+ -- watch directory
+ filewatch.watch(workspace.getAbsolutePath(CONFIGPATH):gsub('[^/\\]+$', ''))
else
new = cfgLoader.loadRCConfig('.luarc.json')
if new then