File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -92,16 +92,14 @@ M.create_merged_cspell_json = function(params, cspell_config_mapping)
92
92
and cspell_config_path ~= " "
93
93
and Path :new (cspell_config_path ):exists ()
94
94
if path_exists then
95
- pcall (function ()
96
- local cspell_config = vim .json .decode (Path :new (cspell_config_path ):read ())
97
- if
98
- cspell_config .language ~= nil
99
- and type (cspell_config .language ) == " string"
100
- and cspell_config .language ~= ' '
101
- then
102
- cspell_json .language = cspell_json .language .. " ," .. cspell_config .language
103
- end
104
- end )
95
+ local ok , cspell_config = pcall (vim .json .decode , Path :new (cspell_config_path ):read ())
96
+ if ok
97
+ and cspell_config .language ~= nil
98
+ and type (cspell_config .language ) == " string"
99
+ and cspell_config .language ~= ' '
100
+ then
101
+ cspell_json .language = cspell_json .language .. " ," .. cspell_config .language
102
+ end
105
103
table.insert (cspell_config_paths , cspell_config_path )
106
104
else
107
105
local debug_message = M .format (
You can’t perform that action at this time.
0 commit comments