Closed antoineco closed 2 years ago
Inside goldsmith.format.organize_imports, get_client_by_id() may return nil for various reasons. When this occurs, the following error is thrown:
goldsmith.format.organize_imports
get_client_by_id()
nil
E5108: Error executing lua [...] attempt to index global 'client' (a nil value)
To prevent this kind of scenario, I suggest we fall back to 'utf-8' as default encoding when get_client_by_id() returns nil.
Looks good. Thank you!
Inside
goldsmith.format.organize_imports
,get_client_by_id()
may returnnil
for various reasons. When this occurs, the following error is thrown:To prevent this kind of scenario, I suggest we fall back to 'utf-8' as default encoding when
get_client_by_id()
returnsnil
.