File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 2222
2323--- @class AstroLSPFormatOpts
2424--- @field format_on_save boolean | AstroLSPFormatOnSaveOpts ? control formatting on save options
25- --- @field disabled string[] ? a list like table of language server names to disable formatting
25+ --- @field disabled true | string[] ? true to disable all or a list like table of language server names to disable formatting
2626--- @field timeout_ms integer ? configure the timeout length for formatting
2727--- @field filter (fun ( client ): boolean )? fully override the default formatting filter function
2828
Original file line number Diff line number Diff line change @@ -115,7 +115,9 @@ M.on_attach = function(client, bufnr)
115115 end
116116
117117 if
118- client .supports_method " textDocument/formatting" and not tbl_contains (M .config .formatting .disabled , client .name )
118+ client .supports_method " textDocument/formatting"
119+ and M .config .formatting .disabled ~= true
120+ and not tbl_contains (M .config .formatting .disabled , client .name )
119121 then
120122 vim .api .nvim_buf_create_user_command (
121123 bufnr ,
You can’t perform that action at this time.
0 commit comments