Skip to content

Commit fe59b7f

Browse files
committed
添加配置,修复错误
1 parent 906051f commit fe59b7f

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

script/config/config.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ local Template = {
212212
['Lua.format.enable'] = Type.Boolean >> true,
213213
['Lua.format.defaultConfig'] = Type.Hash(Type.String, Type.String)
214214
>> {},
215+
['Lua.spell.dict'] = Type.Array(Type.String),
215216
['Lua.telemetry.enable'] = Type.Or(Type.Boolean >> false, Type.Nil) >> nil,
216217
['files.associations'] = Type.Hash(Type.String, Type.String),
217218
['files.exclude'] = Type.Hash(Type.String, Type.Boolean),

script/provider/spell.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ function m.initDictionary()
4848
end
4949

5050
config.watch(function (uri, key, value, oldValue)
51-
if key == 'Lua.spell.dict' then
51+
if key == 'Lua.spell.dict' and uri ~= nil then
5252
diagnostics.refresh(uri)
5353
end
5454
end)

0 commit comments

Comments
 (0)