lukas-reineke / lsp-format.nvim

A wrapper around Neovims native LSP formatting.
559 stars 27 forks source link

refactor: allow some types to be nil #76

Closed MariaSolOs closed 11 months ago

MariaSolOs commented 11 months ago

When updating lsp-format a few days ago, I noticed that I was getting new diagnostics because of the new buffer parameter in on_attach, but the code handles the case in which this parameter is nil, so I'm updating the type accordingly.

While doing that I did the same change to other types, as well as move the method name to a higher scope to replace the raw string references everywhere.