Proto.completion: def of bolt@1.27.0.0 Import: import bolt@1.27.0.0/src/lsp/proto.bend as Proto Lines 232-240 of bolt@1.27.0.0/src/lsp/proto.bend: https://jend.leeeet.dev/read.txt?path=bolt@1.27.0.0/src/lsp/proto.bend&start_line=232&end_line=240 import Base import emerging-ezjson@1.2.0.0/main.bend as Ezjson import emerging-ezjson@1.2.0.0/src/value.bend as J import bolt@1.27.0.0/src/syntax/outline.bend as Outline import bolt@1.27.0.0/src/lsp/enc.bend as Enc # a candidate replaces everything typed of the name, dots included: the # editor's own idea of a word stops at a dot def completion(+cc: Enc.Cols, item: Outline.Item, +line: U32, start: U32, col: U32) -> J.Json: Outline.Item{k, +name, l, sig, doc, path} = item Ezjson.obj([("label", J.JStr{name}), ("kind", J.JNum{U32.show(completion.kind(k))}), ("detail", J.JStr{first_line(sig)}), ("documentation", Ezjson.obj([("kind", J.JStr{"markdown"}), ("value", J.JStr{doc})])), ("filterText", J.JStr{name}), ("textEdit", Ezjson.obj([("range", Ezjson.obj([("start", position(cc, line, start)), ("end", position(cc, line, col))])), ("newText", J.JStr{name})]))]) Uses (11): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.show https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/lsp/enc.bend&name=Cols https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/lsp/proto.bend&name=completion.kind https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/lsp/proto.bend&name=first_line https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/lsp/proto.bend&name=position https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/outline.bend&name=Item https://jend.leeeet.dev/definition.txt?path=emerging-ezjson@1.3.0.0/main.bend&name=obj https://jend.leeeet.dev/definition.txt?path=emerging-ezjson@1.3.0.0/src/value.bend&name=Json