aboutsummaryrefslogtreecommitdiff
path: root/src/server/format.odin
diff options
context:
space:
mode:
authorDaniel Gavin <danielgavin5@hotmail.com>2022-06-29 23:09:14 +0200
committerDaniel Gavin <danielgavin5@hotmail.com>2022-06-29 23:09:14 +0200
commit9b19888219305c3740f36d9490e08e04e148a413 (patch)
tree47f83a71694d01c5db0ea1f12e0e849926fd3458 /src/server/format.odin
parent86e35a09c3c2e18e7cd4c73b7300f5236c9aa17e (diff)
Remove Maybe for now because json serialization messes it up.
Diffstat (limited to 'src/server/format.odin')
-rw-r--r--src/server/format.odin8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/format.odin b/src/server/format.odin
index 219d7d9..041b204 100644
--- a/src/server/format.odin
+++ b/src/server/format.odin
@@ -22,12 +22,12 @@ get_complete_format :: proc(document: ^common.Document, config: ^common.Config)
style := printer.default_style
style.tabs = config.formatter.tabs
- if characters, ok := config.formatter.characters.(int); ok {
- style.max_characters = characters
+ if config.formatter.characters != 0 {
+ style.max_characters = config.formatter.characters
}
- if spaces, ok := config.formatter.spaces.(int); ok {
- style.spaces = spaces
+ if config.formatter.spaces != 0 {
+ style.spaces = config.formatter.spaces
}
prnt := printer.make_printer(style, context.temp_allocator)