fix: always use tabs for formatting, ignore editor insertSpaces
This commit is contained in:
+3
-4
@@ -1805,11 +1805,10 @@ function handlers.textDocument_formatting(params)
|
|||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
local options = params.options or {}
|
|
||||||
local format_options = {
|
local format_options = {
|
||||||
insertSpaces = options.insertSpaces,
|
insertSpaces = false,
|
||||||
tabSize = options.tabSize,
|
tabSize = 1,
|
||||||
indentSize = options.tabSize or 4,
|
indentSize = 1,
|
||||||
}
|
}
|
||||||
|
|
||||||
return formatter.format_document(doc.content, format_options)
|
return formatter.format_document(doc.content, format_options)
|
||||||
|
|||||||
Reference in New Issue
Block a user