mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-22 08:53:33 +02:00
fix(format): nil check
This commit is contained in:
parent
fab6150da9
commit
a3aeb27cbc
1 changed files with 5 additions and 1 deletions
|
@ -39,7 +39,11 @@ end
|
|||
|
||||
function M.on_attach(client, buf)
|
||||
-- dont format if client disabled it
|
||||
if client.config.capabilities.documentFormattingProvider == false then
|
||||
if
|
||||
client.config
|
||||
and client.config.capabilities
|
||||
and client.config.capabilities.documentFormattingProvider == false
|
||||
then
|
||||
return
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue