Closed chomosuke closed 1 year ago
Hi @chomosuke! Thanks for your PR, I missed the notification, sorry for the late reply... Thanks for the refactor, I wanted to make this extract a long time ago.
In theory, ~.setting.ltex
should contain at least the default settings for the server. So I don't know if it's better to do an initialization to {} or notify the users that they don't have a config. I have to test it but, am I missing something?
Hey @barreiroleo, in my experience, if I don't write out
{
settings = {
ltex = {},
},
}
Then ~.settings.ltex
would be nil. And I don't have any setting to put into ltex so i'd rather not write that out. I'm using nvim 7.2 btw :).
Sometimes I don't have any settings to pass into lspconfig.ltex.setup {}. Hence client.config.settings.ltex ended up being nil. This causes exceptions.
I did some refactoring so that every time settings.ltex would be initialized to {} before it's indexed.