Skip to main content

CommonLibrary/LanguageFeature/DTO/
ProviderType.rs

1//! # ProviderType DTO
2//!
3//! Defines the enum that identifies each type of language feature provider.
4
5use std::fmt;
6
7use serde::{Deserialize, Serialize};
8
9/// An enum that provides a unique identifier for each type of language feature.
10/// This is used to register and query for specific provider implementations.
11#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, Hash)]
12#[repr(u8)]
13pub enum ProviderType {
14	Completion = 0,
15
16	Hover = 1,
17
18	SignatureHelp = 2,
19
20	Definition = 3,
21
22	TypeDefinition = 4,
23
24	Implementation = 5,
25
26	References = 6,
27
28	DocumentHighlight = 7,
29
30	DocumentSymbol = 8,
31
32	WorkspaceSymbol = 9,
33
34	CodeAction = 10,
35
36	CodeLens = 11,
37
38	DocumentFormatting = 12,
39
40	DocumentRangeFormatting = 13,
41
42	OnTypeFormatting = 14,
43
44	Rename = 15,
45
46	DocumentLink = 16,
47
48	Color = 17,
49
50	FoldingRange = 18,
51
52	Declaration = 19,
53
54	SelectionRange = 20,
55
56	InlayHint = 21,
57
58	CallHierarchy = 22,
59
60	SemanticTokens = 23,
61
62	LinkedEditingRange = 24,
63
64	TypeHierarchy = 25,
65
66	EvaluatableExpression = 26,
67
68	InlineValues = 27,
69
70	Task = 28,
71
72	Authentication = 29,
73
74	TreeView = 30,
75
76	SourceControl = 31,
77
78	DebugAdapter = 32,
79
80	DebugConfiguration = 33,
81
82	TextDocumentContent = 34,
83
84	FileSystem = 35,
85
86	UriHandler = 36,
87
88	DocumentPasteEdit = 37,
89
90	DocumentDropEdit = 38,
91
92	NotebookSerializer = 39,
93
94	TerminalProfile = 40,
95
96	TerminalLink = 41,
97
98	InlineCompletion = 42,
99
100	FileDecoration = 43,
101
102	ExternalUriOpener = 44,
103
104	InlineEdit = 45,
105
106	MappedEdits = 46,
107
108	MultiDocumentHighlight = 47,
109
110	NotebookContent = 48,
111
112	RemoteAuthorityResolver = 49,
113
114	ResourceLabelFormatter = 50,
115
116	ScmResourceGroup = 51,
117}
118
119impl fmt::Display for ProviderType {
120	fn fmt(&self, f:&mut fmt::Formatter) -> fmt::Result { write!(f, "{:?}", self) }
121}