forked from sourcegraph/sg.nvim
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.lua
More file actions
134 lines (106 loc) · 3.04 KB
/
Copy pathtypes.lua
File metadata and controls
134 lines (106 loc) · 3.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
local M = {}
---@class SgPosition
---@field line number?
---@field col number?
---@class SgEntry
---@field type "file" | "directory" | "repo"
---@field bufname string
---@field data SgFile | SgDirectory | SgRepo
---@class SgDirectory
---@field remote string
---@field oid string
---@field path string
---@class SgFile
---@field remote string
---@field oid string
---@field path string
---@field position nil|SgPosition
---@class SgRepo
---@field remote string
---@field oid string
---@class SourcegraphEmbedding
---@field type "Text"|"Code"
---@field repo string
---@field file string
---@field start number
---@field finish number
---@field content string
---@class CodyConfig
---@field user string
---@field tos_accepted boolean
---@field token string
---@field endpoint string
---@class CodyClientInfo
---@field name string
---@field version string
---@field workspaceRootUri string
---@field extensionConfiguration CodyExtensionConfiguration?
---@field capabilities CodyClientCapabilities?
---@class CodyExtensionConfiguration
---@field serverEndpoint string
---@field accessToken string
---@field codebase string?
---@field customHeaders table<string, string>
---@field eventProperties CodyEventProperties
---@class CodyEventProperties
---@field anonymousUserID string
---@field prefix string
---@field client string
---@field source string
---@class CodyClientCapabilities
---@field completions 'none'?
---@field chat 'none' | 'streaming' | nil
---@class CodyServerInfo
---@field name string?
---@field authenticated boolean?
---@field codyEnabled boolean?
---@field codyVersion string?
---@field capabilities CodyServerCapabilities?
---@class CodyServerCapabilities
---@class CodyTextDocument
---@field filePath string
---@field content string?
---@field selection CodyRange?
---@class CodyPosition
---@field line number
--- 0-indexed
---@field character number
--- 0-indexed
---@class CodyRange
---@field start CodyPosition
---@field end CodyPosition
---@class CodyContextFile
---@field fileName string
---@field repoName string?
---@field revision string?
---@field source string?
---@class CodyChatMessageData
---@field id string
---@class CodyChatMessage
---@field speaker string
---@field text string
---@field displayText string?
---@field contextFiles CodyContextFile[]?
---@field data CodyChatMessageData
---@class CodyChatUpdateMessageInProgressNoti: CodyChatMessage
---@field text string?
---@field data any?
---@alias CodyMessageHandler fun(msg: CodyChatMessage)
---@alias CodyChatCallbackHandler fun(id: number): CodyMessageHandler
---@class CodyAutocompleteItem
---@field insertText string
---@field range CodyRange
---@class CodyAutocompleteResult
---@field items CodyAutocompleteItem[]
---@class SourcegraphAuthConfig
---@field endpoint string: The sourcegraph endpoint
---@field token string: The sourcegraph auth token
---@class SourcegraphAuthObject
---@field doc string: Description
---@field get function(): SourcegraphAuthConfig?
---@class SgSearchResult
---@field repo string
---@field file string
---@field preview string
---@field line number
return M