mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-22 17:03:39 +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)
|
function M.on_attach(client, buf)
|
||||||
-- dont format if client disabled it
|
-- 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
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue