Skip to content

Commit 5c64ca2

Browse files
committed
$ bin/generate_files
1 parent 32d1f74 commit 5c64ca2

File tree

144 files changed

+3300
-288
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

144 files changed

+3300
-288
lines changed

lib/language_server/protocol/constant.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,21 @@ module Constant
1111
autoload :ErrorCodes, "language_server/protocol/constant/error_codes"
1212
autoload :FailureHandlingKind, "language_server/protocol/constant/failure_handling_kind"
1313
autoload :FileChangeType, "language_server/protocol/constant/file_change_type"
14+
autoload :FileOperationPatternKind, "language_server/protocol/constant/file_operation_pattern_kind"
1415
autoload :InitializeError, "language_server/protocol/constant/initialize_error"
1516
autoload :InsertTextFormat, "language_server/protocol/constant/insert_text_format"
17+
autoload :InsertTextMode, "language_server/protocol/constant/insert_text_mode"
1618
autoload :MarkupKind, "language_server/protocol/constant/markup_kind"
1719
autoload :MessageType, "language_server/protocol/constant/message_type"
20+
autoload :PrepareSupportDefaultBehavior, "language_server/protocol/constant/prepare_support_default_behavior"
1821
autoload :ResourceOperationKind, "language_server/protocol/constant/resource_operation_kind"
1922
autoload :SignatureHelpTriggerKind, "language_server/protocol/constant/signature_help_trigger_kind"
2023
autoload :SymbolKind, "language_server/protocol/constant/symbol_kind"
24+
autoload :SymbolTag, "language_server/protocol/constant/symbol_tag"
2125
autoload :TextDocumentSaveReason, "language_server/protocol/constant/text_document_save_reason"
2226
autoload :TextDocumentSyncKind, "language_server/protocol/constant/text_document_sync_kind"
2327
autoload :TextDocumentSyncKind, "language_server/protocol/constant/text_document_sync_kind"
28+
autoload :TokenFormat, "language_server/protocol/constant/token_format"
2429
autoload :WatchKind, "language_server/protocol/constant/watch_kind"
2530

2631
require "language_server/protocol/constant/code_action_kind"
@@ -33,16 +38,21 @@ module Constant
3338
require "language_server/protocol/constant/error_codes"
3439
require "language_server/protocol/constant/failure_handling_kind"
3540
require "language_server/protocol/constant/file_change_type"
41+
require "language_server/protocol/constant/file_operation_pattern_kind"
3642
require "language_server/protocol/constant/initialize_error"
3743
require "language_server/protocol/constant/insert_text_format"
44+
require "language_server/protocol/constant/insert_text_mode"
3845
require "language_server/protocol/constant/markup_kind"
3946
require "language_server/protocol/constant/message_type"
47+
require "language_server/protocol/constant/prepare_support_default_behavior"
4048
require "language_server/protocol/constant/resource_operation_kind"
4149
require "language_server/protocol/constant/signature_help_trigger_kind"
4250
require "language_server/protocol/constant/symbol_kind"
51+
require "language_server/protocol/constant/symbol_tag"
4352
require "language_server/protocol/constant/text_document_save_reason"
4453
require "language_server/protocol/constant/text_document_sync_kind"
4554
require "language_server/protocol/constant/text_document_sync_kind"
55+
require "language_server/protocol/constant/token_format"
4656
require "language_server/protocol/constant/watch_kind"
4757
end
4858
end

lib/language_server/protocol/constant/code_action_kind.rb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ module Constant
44
#
55
# The kind of a code action.
66
#
7-
# Kinds are a hierarchical list of identifiers separated by `.`, e.g. `"refactor.extract.function"`.
7+
# Kinds are a hierarchical list of identifiers separated by `.`,
8+
# e.g. `"refactor.extract.function"`.
89
#
9-
# The set of kinds is open and client needs to announce the kinds it supports to the server during
10-
# initialization.
10+
# The set of kinds is open and client needs to announce the kinds it supports
11+
# to the server during initialization.
1112
# A set of predefined code action kinds.
1213
#
1314
module CodeActionKind
@@ -66,7 +67,8 @@ module CodeActionKind
6667
#
6768
SOURCE = 'source'
6869
#
69-
# Base kind for an organize imports source action: `source.organizeImports`.
70+
# Base kind for an organize imports source action:
71+
# `source.organizeImports`.
7072
#
7173
SOURCE_ORGANIZE_IMPORTS = 'source.organizeImports'
7274
end

lib/language_server/protocol/constant/completion_item_tag.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ module LanguageServer
22
module Protocol
33
module Constant
44
#
5-
# Completion item tags are extra annotations that tweak the rendering of a completion
6-
# item.
5+
# Completion item tags are extra annotations that tweak the rendering of a
6+
# completion item.
77
#
88
module CompletionItemTag
99
#

lib/language_server/protocol/constant/completion_trigger_kind.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ module CompletionTriggerKind
1212
INVOKED = 1
1313
#
1414
# Completion was triggered by a trigger character specified by
15-
# the `triggerCharacters` properties of the `CompletionRegistrationOptions`.
15+
# the `triggerCharacters` properties of the
16+
# `CompletionRegistrationOptions`.
1617
#
1718
TRIGGER_CHARACTER = 2
1819
#

lib/language_server/protocol/constant/diagnostic_tag.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ module DiagnosticTag
88
#
99
# Unused or unnecessary code.
1010
#
11-
# Clients are allowed to render diagnostics with this tag faded out instead of having
12-
# an error squiggle.
11+
# Clients are allowed to render diagnostics with this tag faded out
12+
# instead of having an error squiggle.
1313
#
1414
UNNECESSARY = 1
1515
#

lib/language_server/protocol/constant/error_codes.rb

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,35 @@ module ErrorCodes
77
METHOD_NOT_FOUND = -32601
88
INVALID_PARAMS = -32602
99
INTERNAL_ERROR = -32603
10-
SERVER_ERROR_START = -32099
11-
SERVER_ERROR_END = -32000
10+
#
11+
# This is the start range of JSON RPC reserved error codes.
12+
# It doesn't denote a real error code. No LSP error codes should
13+
# be defined between the start and end range. For backwards
14+
# compatibility the `ServerNotInitialized` and the `UnknownErrorCode`
15+
# are left in the range.
16+
#
17+
JSONRPC_RESERVED_ERROR_RANGE_START = -32099
18+
SERVER_ERROR_START = JSONRPC_RESERVED_ERROR_RANGE_START
1219
SERVER_NOT_INITIALIZED = -32002
1320
UNKNOWN_ERROR_CODE = -32001
14-
REQUEST_CANCELLED = -32800
21+
#
22+
# This is the start range of JSON RPC reserved error codes.
23+
# It doesn't denote a real error code.
24+
#
25+
JSONRPC_RESERVED_ERROR_RANGE_END = -32000
26+
SERVER_ERROR_END = JSONRPC_RESERVED_ERROR_RANGE_END
27+
#
28+
# This is the start range of LSP reserved error codes.
29+
# It doesn't denote a real error code.
30+
#
31+
LSP_RESERVED_ERROR_RANGE_START = -32899
1532
CONTENT_MODIFIED = -32801
33+
REQUEST_CANCELLED = -32800
34+
#
35+
# This is the end range of LSP reserved error codes.
36+
# It doesn't denote a real error code.
37+
#
38+
LSP_RESERVED_ERROR_RANGE_END = -32800
1639
end
1740
end
1841
end

lib/language_server/protocol/constant/failure_handling_kind.rb

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ module Protocol
33
module Constant
44
module FailureHandlingKind
55
#
6-
# Applying the workspace change is simply aborted if one of the changes provided
7-
# fails. All operations executed before the failing operation stay executed.
6+
# Applying the workspace change is simply aborted if one of the changes
7+
# provided fails. All operations executed before the failing operation
8+
# stay executed.
89
#
910
ABORT = 'abort'
1011
#
@@ -13,9 +14,9 @@ module FailureHandlingKind
1314
#
1415
TRANSACTIONAL = 'transactional'
1516
#
16-
# If the workspace edit contains only textual file changes they are executed transactional.
17-
# If resource changes (create, rename or delete file) are part of the change the failure
18-
# handling strategy is abort.
17+
# If the workspace edit contains only textual file changes they are
18+
# executed transactional. If resource changes (create, rename or delete
19+
# file) are part of the change the failure handling strategy is abort.
1920
#
2021
TEXT_ONLY_TRANSACTIONAL = 'textOnlyTransactional'
2122
#
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
module LanguageServer
2+
module Protocol
3+
module Constant
4+
#
5+
# A pattern kind describing if a glob pattern matches a file a folder or
6+
# both.
7+
#
8+
module FileOperationPatternKind
9+
#
10+
# The pattern matches a file only.
11+
#
12+
FILE = 'file'
13+
#
14+
# The pattern matches a folder only.
15+
#
16+
FOLDER = 'folder'
17+
end
18+
end
19+
end
20+
end

lib/language_server/protocol/constant/initialize_error.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ module Constant
66
#
77
module InitializeError
88
#
9-
# If the protocol version provided by the client can't be handled by the server.
9+
# If the protocol version provided by the client can't be handled by the
10+
# server.
1011
#
1112
UNKNOWN_PROTOCOL_VERSION = 1
1213
end
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
module LanguageServer
2+
module Protocol
3+
module Constant
4+
#
5+
# How whitespace and indentation is handled during completion
6+
# item insertion.
7+
#
8+
module InsertTextMode
9+
#
10+
# The insertion or replace strings is taken as it is. If the
11+
# value is multi line the lines below the cursor will be
12+
# inserted using the indentation defined in the string value.
13+
# The client will not apply any kind of adjustments to the
14+
# string.
15+
#
16+
AS_IS = 1
17+
#
18+
# The editor adjusts leading whitespace of new lines so that
19+
# they match the indentation up to the cursor of the line for
20+
# which the item is accepted.
21+
#
22+
# Consider a line like this: <2tabs><cursor><3tabs>foo. Accepting a
23+
# multi line completion item is indented using 2 tabs and all
24+
# following lines inserted will be indented using 2 tabs as well.
25+
#
26+
ADJUST_INDENTATION = 2
27+
end
28+
end
29+
end
30+
end

0 commit comments

Comments
 (0)