diff options
| author | Daniel Gavin <danielgavin5@hotmail.com> | 2022-08-20 13:13:26 +0200 |
|---|---|---|
| committer | Daniel Gavin <danielgavin5@hotmail.com> | 2022-08-20 13:13:26 +0200 |
| commit | f6f2eb760d4b11630dc0719c8893383bed20cd9a (patch) | |
| tree | f3738e1fa057671d182a7161f9ff02ffa7b56020 /src/server/document_links.odin | |
| parent | 8e8360dba88feb0334a222e9f990250cf65f32bf (diff) | |
Finally make the move to use odinfmt in ols.
Diffstat (limited to 'src/server/document_links.odin')
| -rw-r--r-- | src/server/document_links.odin | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/server/document_links.odin b/src/server/document_links.odin index 0049509..17113ff 100644 --- a/src/server/document_links.odin +++ b/src/server/document_links.odin @@ -25,7 +25,11 @@ get_document_links :: proc(document: ^Document) -> ([]DocumentLink, bool) { continue } - e := strings.split(imp.relpath.text[1:len(imp.relpath.text)-1], ":", context.temp_allocator) + e := strings.split( + imp.relpath.text[1:len(imp.relpath.text) - 1], + ":", + context.temp_allocator, + ) if len(e) != 2 { continue @@ -43,7 +47,7 @@ get_document_links :: proc(document: ^Document) -> ([]DocumentLink, bool) { line = imp.relpath.pos.line, }, end = { - offset = imp.relpath.pos.offset + len(imp.relpath.text) - 1, + offset = imp.relpath.pos.offset + len(imp.relpath.text) - 1, column = imp.relpath.pos.column + len(imp.relpath.text) - 1, line = imp.relpath.pos.line, }, @@ -52,8 +56,12 @@ get_document_links :: proc(document: ^Document) -> ([]DocumentLink, bool) { range := common.get_token_range(node, string(document.text)) link := DocumentLink { - range = range, - target = fmt.tprintf("https://pkg.odin-lang.org/%v/%v", e[0], e[1]), + range = range, + target = fmt.tprintf( + "https://pkg.odin-lang.org/%v/%v", + e[0], + e[1], + ), tooltip = "Documentation", } |