language_server-protocol 3.7.0.0 → 3.12.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Dockerfile.development +1 -1
- data/circle.yml +1 -0
- data/docker-compose.ci.yml +3 -1
- data/docker-compose.yml +11 -5
- data/lib/language_server/protocol/constant/code_action_kind.rb +71 -0
- data/lib/language_server/protocol/constant.rb +2 -0
- data/lib/language_server/protocol/interface/code_action.rb +79 -0
- data/lib/language_server/protocol/interface/code_action_context.rb +13 -1
- data/lib/language_server/protocol/interface/code_action_options.rb +39 -0
- data/lib/language_server/protocol/interface/code_action_registration_options.rb +24 -0
- data/lib/language_server/protocol/interface/color_provider_options.rb +1 -1
- data/lib/language_server/protocol/interface/completion_item.rb +14 -1
- data/lib/language_server/protocol/interface/completion_params.rb +1 -1
- data/lib/language_server/protocol/interface/document_link_options.rb +1 -1
- data/lib/language_server/protocol/interface/document_on_type_formatting_options.rb +1 -1
- data/lib/language_server/protocol/interface/folding_range.rb +74 -0
- data/lib/language_server/protocol/interface/folding_range_provider_options.rb +27 -0
- data/lib/language_server/protocol/interface/folding_range_request_param.rb +33 -0
- data/lib/language_server/protocol/interface/rename_options.rb +36 -0
- data/lib/language_server/protocol/interface/rename_registration_options.rb +33 -0
- data/lib/language_server/protocol/interface/server_capabilities.rb +20 -5
- data/lib/language_server/protocol/interface/text_document_client_capabilities.rb +15 -4
- data/lib/language_server/protocol/interface.rb +16 -0
- data/lib/language_server/protocol/version.rb +1 -1
- data/scripts/generateFiles.ts +121 -53
- metadata +12 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd4c303397da016e02bccf930e4910d2e185c989028786621b2a85c4c25ed371
|
4
|
+
data.tar.gz: 2b87beb7052a1fbfe3668b317624900c83e10d87349f7092490b89dcd1199c0f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 53fa2f0da9a2fd581fa3df068d695327077f8b8ece242f9659a3aa75a5fdbcea6a84ed0ded4447b7463816f9586dbbafec45a1e32f65d38f4307c0ac740bccb4
|
7
|
+
data.tar.gz: bbda94c4c9a50645b207791c345584423a90b3e1b86f94f299376009678e331466e5615f78c73a9871eb92fd16348ac336d93eaf9f054b162f80589e316f54f9
|
data/CHANGELOG.md
CHANGED
data/Dockerfile.development
CHANGED
data/circle.yml
CHANGED
data/docker-compose.ci.yml
CHANGED
data/docker-compose.yml
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
version:
|
1
|
+
version: "3.0"
|
2
2
|
services:
|
3
3
|
app: &app
|
4
4
|
build: &app-build
|
@@ -7,18 +7,24 @@ services:
|
|
7
7
|
volumes:
|
8
8
|
- vendor:/vendor
|
9
9
|
- home:/home/ruby
|
10
|
+
ruby-2-4:
|
11
|
+
<<: *app
|
12
|
+
build:
|
13
|
+
<<: *app-build
|
14
|
+
args:
|
15
|
+
RUBY_VERSION: 2.4.4
|
10
16
|
ruby-2-3:
|
11
17
|
<<: *app
|
12
18
|
build:
|
13
19
|
<<: *app-build
|
14
20
|
args:
|
15
|
-
RUBY_VERSION: 2.3.
|
21
|
+
RUBY_VERSION: 2.3.7
|
16
22
|
ruby-2-2:
|
17
23
|
<<: *app
|
18
24
|
build:
|
19
25
|
<<: *app-build
|
20
26
|
args:
|
21
|
-
RUBY_VERSION: 2.2.
|
27
|
+
RUBY_VERSION: 2.2.10
|
22
28
|
node:
|
23
29
|
build:
|
24
30
|
context: .
|
@@ -27,5 +33,5 @@ services:
|
|
27
33
|
- vendor:/vendor
|
28
34
|
- home:/home/node
|
29
35
|
volumes:
|
30
|
-
vendor
|
31
|
-
home
|
36
|
+
? vendor
|
37
|
+
? home
|
@@ -0,0 +1,71 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Constant
|
4
|
+
#
|
5
|
+
# The kind of a code action.
|
6
|
+
#
|
7
|
+
# Kinds are a hierarchical list of identifiers separated by `.`, e.g. `"refactor.extract.function"`.
|
8
|
+
#
|
9
|
+
# The set of kinds is open and client needs to announce the kinds it supports to the server during
|
10
|
+
# initialization.
|
11
|
+
# A set of predefined code action kinds
|
12
|
+
#
|
13
|
+
module CodeActionKind
|
14
|
+
#
|
15
|
+
# Base kind for quickfix actions: 'quickfix'
|
16
|
+
#
|
17
|
+
QUICK_FIX = 'quickfix'
|
18
|
+
#
|
19
|
+
# Base kind for refactoring actions: 'refactor'
|
20
|
+
#
|
21
|
+
REFACTOR = 'refactor'
|
22
|
+
#
|
23
|
+
# Base kind for refactoring extraction actions: 'refactor.extract'
|
24
|
+
#
|
25
|
+
# Example extract actions:
|
26
|
+
#
|
27
|
+
# - Extract method
|
28
|
+
# - Extract function
|
29
|
+
# - Extract variable
|
30
|
+
# - Extract interface from class
|
31
|
+
# - ...
|
32
|
+
#
|
33
|
+
REFACTOR_EXTRACT = 'refactor.extract'
|
34
|
+
#
|
35
|
+
# Base kind for refactoring inline actions: 'refactor.inline'
|
36
|
+
#
|
37
|
+
# Example inline actions:
|
38
|
+
#
|
39
|
+
# - Inline function
|
40
|
+
# - Inline variable
|
41
|
+
# - Inline constant
|
42
|
+
# - ...
|
43
|
+
#
|
44
|
+
REFACTOR_INLINE = 'refactor.inline'
|
45
|
+
#
|
46
|
+
# Base kind for refactoring rewrite actions: 'refactor.rewrite'
|
47
|
+
#
|
48
|
+
# Example rewrite actions:
|
49
|
+
#
|
50
|
+
# - Convert JavaScript function to class
|
51
|
+
# - Add or remove parameter
|
52
|
+
# - Encapsulate field
|
53
|
+
# - Make method static
|
54
|
+
# - Move method to base class
|
55
|
+
# - ...
|
56
|
+
#
|
57
|
+
REFACTOR_REWRITE = 'refactor.rewrite'
|
58
|
+
#
|
59
|
+
# Base kind for source actions: `source`
|
60
|
+
#
|
61
|
+
# Source code actions apply to the entire file.
|
62
|
+
#
|
63
|
+
SOURCE = 'source'
|
64
|
+
#
|
65
|
+
# Base kind for an organize imports source action: `source.organizeImports`
|
66
|
+
#
|
67
|
+
SOURCE_ORGANIZE_IMPORTS = 'source.organizeImports'
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
@@ -1,6 +1,7 @@
|
|
1
1
|
module LanguageServer
|
2
2
|
module Protocol
|
3
3
|
module Constant
|
4
|
+
autoload :CodeActionKind, "language_server/protocol/constant/code_action_kind"
|
4
5
|
autoload :CompletionItemKind, "language_server/protocol/constant/completion_item_kind"
|
5
6
|
autoload :CompletionTriggerKind, "language_server/protocol/constant/completion_trigger_kind"
|
6
7
|
autoload :DiagnosticSeverity, "language_server/protocol/constant/diagnostic_severity"
|
@@ -16,6 +17,7 @@ module LanguageServer
|
|
16
17
|
autoload :TextDocumentSyncKind, "language_server/protocol/constant/text_document_sync_kind"
|
17
18
|
autoload :WatchKind, "language_server/protocol/constant/watch_kind"
|
18
19
|
|
20
|
+
require "language_server/protocol/constant/code_action_kind"
|
19
21
|
require "language_server/protocol/constant/completion_item_kind"
|
20
22
|
require "language_server/protocol/constant/completion_trigger_kind"
|
21
23
|
require "language_server/protocol/constant/diagnostic_severity"
|
@@ -0,0 +1,79 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
#
|
5
|
+
# A code action represents a change that can be performed in code, e.g. to fix a problem or
|
6
|
+
# to refactor code.
|
7
|
+
#
|
8
|
+
# A CodeAction must set either `edit` and/or a `command`. If both are supplied, the `edit` is applied first, then the `command` is executed.
|
9
|
+
#
|
10
|
+
class CodeAction
|
11
|
+
def initialize(title:, kind: nil, diagnostics: nil, edit: nil, command: nil)
|
12
|
+
@attributes = {}
|
13
|
+
|
14
|
+
@attributes[:title] = title
|
15
|
+
@attributes[:kind] = kind if kind
|
16
|
+
@attributes[:diagnostics] = diagnostics if diagnostics
|
17
|
+
@attributes[:edit] = edit if edit
|
18
|
+
@attributes[:command] = command if command
|
19
|
+
|
20
|
+
@attributes.freeze
|
21
|
+
end
|
22
|
+
|
23
|
+
#
|
24
|
+
# A short, human-readable, title for this code action.
|
25
|
+
#
|
26
|
+
# @return [string]
|
27
|
+
def title
|
28
|
+
attributes.fetch(:title)
|
29
|
+
end
|
30
|
+
|
31
|
+
#
|
32
|
+
# The kind of the code action.
|
33
|
+
#
|
34
|
+
# Used to filter code actions.
|
35
|
+
#
|
36
|
+
# @return [string]
|
37
|
+
def kind
|
38
|
+
attributes.fetch(:kind)
|
39
|
+
end
|
40
|
+
|
41
|
+
#
|
42
|
+
# The diagnostics that this code action resolves.
|
43
|
+
#
|
44
|
+
# @return [Diagnostic[]]
|
45
|
+
def diagnostics
|
46
|
+
attributes.fetch(:diagnostics)
|
47
|
+
end
|
48
|
+
|
49
|
+
#
|
50
|
+
# The workspace edit this code action performs.
|
51
|
+
#
|
52
|
+
# @return [WorkspaceEdit]
|
53
|
+
def edit
|
54
|
+
attributes.fetch(:edit)
|
55
|
+
end
|
56
|
+
|
57
|
+
#
|
58
|
+
# A command this code action executes. If a code action
|
59
|
+
# provides an edit and a command, first the edit is
|
60
|
+
# executed and then the command.
|
61
|
+
#
|
62
|
+
# @return [Command]
|
63
|
+
def command
|
64
|
+
attributes.fetch(:command)
|
65
|
+
end
|
66
|
+
|
67
|
+
attr_reader :attributes
|
68
|
+
|
69
|
+
def to_hash
|
70
|
+
attributes
|
71
|
+
end
|
72
|
+
|
73
|
+
def to_json(*args)
|
74
|
+
to_hash.to_json(*args)
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
@@ -6,10 +6,11 @@ module LanguageServer
|
|
6
6
|
# a code action is run.
|
7
7
|
#
|
8
8
|
class CodeActionContext
|
9
|
-
def initialize(diagnostics:)
|
9
|
+
def initialize(diagnostics:, only: nil)
|
10
10
|
@attributes = {}
|
11
11
|
|
12
12
|
@attributes[:diagnostics] = diagnostics
|
13
|
+
@attributes[:only] = only if only
|
13
14
|
|
14
15
|
@attributes.freeze
|
15
16
|
end
|
@@ -22,6 +23,17 @@ module LanguageServer
|
|
22
23
|
attributes.fetch(:diagnostics)
|
23
24
|
end
|
24
25
|
|
26
|
+
#
|
27
|
+
# Requested kind of actions to return.
|
28
|
+
#
|
29
|
+
# Actions not of this kind are filtered out by the client before being shown. So servers
|
30
|
+
# can omit computing them.
|
31
|
+
#
|
32
|
+
# @return [string[]]
|
33
|
+
def only
|
34
|
+
attributes.fetch(:only)
|
35
|
+
end
|
36
|
+
|
25
37
|
attr_reader :attributes
|
26
38
|
|
27
39
|
def to_hash
|
@@ -0,0 +1,39 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
#
|
5
|
+
# Code Action options.
|
6
|
+
#
|
7
|
+
class CodeActionOptions
|
8
|
+
def initialize(code_action_kinds: nil)
|
9
|
+
@attributes = {}
|
10
|
+
|
11
|
+
@attributes[:codeActionKinds] = code_action_kinds if code_action_kinds
|
12
|
+
|
13
|
+
@attributes.freeze
|
14
|
+
end
|
15
|
+
|
16
|
+
#
|
17
|
+
# CodeActionKinds that this server may return.
|
18
|
+
#
|
19
|
+
# The list of kinds may be generic, such as `CodeActionKind.Refactor`, or the server
|
20
|
+
# may list out every specific kind they provide.
|
21
|
+
#
|
22
|
+
# @return [string[]]
|
23
|
+
def code_action_kinds
|
24
|
+
attributes.fetch(:codeActionKinds)
|
25
|
+
end
|
26
|
+
|
27
|
+
attr_reader :attributes
|
28
|
+
|
29
|
+
def to_hash
|
30
|
+
attributes
|
31
|
+
end
|
32
|
+
|
33
|
+
def to_json(*args)
|
34
|
+
to_hash.to_json(*args)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
class CodeActionRegistrationOptions < CodeActionOptions
|
5
|
+
def initialize(code_action_kinds: nil)
|
6
|
+
@attributes = {}
|
7
|
+
|
8
|
+
|
9
|
+
@attributes.freeze
|
10
|
+
end
|
11
|
+
|
12
|
+
attr_reader :attributes
|
13
|
+
|
14
|
+
def to_hash
|
15
|
+
attributes
|
16
|
+
end
|
17
|
+
|
18
|
+
def to_json(*args)
|
19
|
+
to_hash.to_json(*args)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -2,7 +2,7 @@ module LanguageServer
|
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
4
|
class CompletionItem
|
5
|
-
def initialize(label:, kind: nil, detail: nil, documentation: nil, deprecated: nil, sort_text: nil, filter_text: nil, insert_text: nil, insert_text_format: nil, text_edit: nil, additional_text_edits: nil, commit_characters: nil, command: nil, data: nil)
|
5
|
+
def initialize(label:, kind: nil, detail: nil, documentation: nil, deprecated: nil, preselect: nil, sort_text: nil, filter_text: nil, insert_text: nil, insert_text_format: nil, text_edit: nil, additional_text_edits: nil, commit_characters: nil, command: nil, data: nil)
|
6
6
|
@attributes = {}
|
7
7
|
|
8
8
|
@attributes[:label] = label
|
@@ -10,6 +10,7 @@ module LanguageServer
|
|
10
10
|
@attributes[:detail] = detail if detail
|
11
11
|
@attributes[:documentation] = documentation if documentation
|
12
12
|
@attributes[:deprecated] = deprecated if deprecated
|
13
|
+
@attributes[:preselect] = preselect if preselect
|
13
14
|
@attributes[:sortText] = sort_text if sort_text
|
14
15
|
@attributes[:filterText] = filter_text if filter_text
|
15
16
|
@attributes[:insertText] = insert_text if insert_text
|
@@ -67,6 +68,18 @@ module LanguageServer
|
|
67
68
|
attributes.fetch(:deprecated)
|
68
69
|
end
|
69
70
|
|
71
|
+
#
|
72
|
+
# Select this item when showing.
|
73
|
+
#
|
74
|
+
# *Note* that only one completion item can be selected and that the
|
75
|
+
# tool / client decides which item that is. The rule is that the *first*
|
76
|
+
# item of those that match best is selected.
|
77
|
+
#
|
78
|
+
# @return [boolean]
|
79
|
+
def preselect
|
80
|
+
attributes.fetch(:preselect)
|
81
|
+
end
|
82
|
+
|
70
83
|
#
|
71
84
|
# A string that should be used when comparing this item
|
72
85
|
# with other items. When `falsy` the label is used.
|
@@ -11,7 +11,7 @@ module LanguageServer
|
|
11
11
|
end
|
12
12
|
|
13
13
|
#
|
14
|
-
# The completion context. This is only available
|
14
|
+
# The completion context. This is only available if the client specifies
|
15
15
|
# to send this using `ClientCapabilities.textDocument.completion.contextSupport === true`
|
16
16
|
#
|
17
17
|
# @return [CompletionContext]
|
@@ -0,0 +1,74 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
#
|
5
|
+
# Represents a folding range.
|
6
|
+
#
|
7
|
+
class FoldingRange
|
8
|
+
def initialize(start_line:, start_character: nil, end_line:, end_character: nil, kind: nil)
|
9
|
+
@attributes = {}
|
10
|
+
|
11
|
+
@attributes[:startLine] = start_line
|
12
|
+
@attributes[:startCharacter] = start_character if start_character
|
13
|
+
@attributes[:endLine] = end_line
|
14
|
+
@attributes[:endCharacter] = end_character if end_character
|
15
|
+
@attributes[:kind] = kind if kind
|
16
|
+
|
17
|
+
@attributes.freeze
|
18
|
+
end
|
19
|
+
|
20
|
+
#
|
21
|
+
# The zero-based line number from where the folded range starts.
|
22
|
+
#
|
23
|
+
# @return [number]
|
24
|
+
def start_line
|
25
|
+
attributes.fetch(:startLine)
|
26
|
+
end
|
27
|
+
|
28
|
+
#
|
29
|
+
# The zero-based character offset from where the folded range starts. If not defined, defaults to the length of the start line.
|
30
|
+
#
|
31
|
+
# @return [number]
|
32
|
+
def start_character
|
33
|
+
attributes.fetch(:startCharacter)
|
34
|
+
end
|
35
|
+
|
36
|
+
#
|
37
|
+
# The zero-based line number where the folded range ends.
|
38
|
+
#
|
39
|
+
# @return [number]
|
40
|
+
def end_line
|
41
|
+
attributes.fetch(:endLine)
|
42
|
+
end
|
43
|
+
|
44
|
+
#
|
45
|
+
# The zero-based character offset before the folded range ends. If not defined, defaults to the length of the end line.
|
46
|
+
#
|
47
|
+
# @return [number]
|
48
|
+
def end_character
|
49
|
+
attributes.fetch(:endCharacter)
|
50
|
+
end
|
51
|
+
|
52
|
+
#
|
53
|
+
# Describes the kind of the folding range such as `comment' or 'region'. The kind
|
54
|
+
# is used to categorize folding ranges and used by commands like 'Fold all comments'. See
|
55
|
+
# [FoldingRangeKind](#FoldingRangeKind) for an enumeration of standardized kinds.
|
56
|
+
#
|
57
|
+
# @return [string]
|
58
|
+
def kind
|
59
|
+
attributes.fetch(:kind)
|
60
|
+
end
|
61
|
+
|
62
|
+
attr_reader :attributes
|
63
|
+
|
64
|
+
def to_hash
|
65
|
+
attributes
|
66
|
+
end
|
67
|
+
|
68
|
+
def to_json(*args)
|
69
|
+
to_hash.to_json(*args)
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
#
|
5
|
+
# Folding range provider options.
|
6
|
+
#
|
7
|
+
class FoldingRangeProviderOptions
|
8
|
+
def initialize()
|
9
|
+
@attributes = {}
|
10
|
+
|
11
|
+
|
12
|
+
@attributes.freeze
|
13
|
+
end
|
14
|
+
|
15
|
+
attr_reader :attributes
|
16
|
+
|
17
|
+
def to_hash
|
18
|
+
attributes
|
19
|
+
end
|
20
|
+
|
21
|
+
def to_json(*args)
|
22
|
+
to_hash.to_json(*args)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
class FoldingRangeRequestParam
|
5
|
+
def initialize(text_document:)
|
6
|
+
@attributes = {}
|
7
|
+
|
8
|
+
@attributes[:textDocument] = text_document
|
9
|
+
|
10
|
+
@attributes.freeze
|
11
|
+
end
|
12
|
+
|
13
|
+
#
|
14
|
+
# The text document.
|
15
|
+
#
|
16
|
+
# @return [TextDocumentIdentifier]
|
17
|
+
def text_document
|
18
|
+
attributes.fetch(:textDocument)
|
19
|
+
end
|
20
|
+
|
21
|
+
attr_reader :attributes
|
22
|
+
|
23
|
+
def to_hash
|
24
|
+
attributes
|
25
|
+
end
|
26
|
+
|
27
|
+
def to_json(*args)
|
28
|
+
to_hash.to_json(*args)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
#
|
5
|
+
# Rename options
|
6
|
+
#
|
7
|
+
class RenameOptions
|
8
|
+
def initialize(prepare_provider: nil)
|
9
|
+
@attributes = {}
|
10
|
+
|
11
|
+
@attributes[:prepareProvider] = prepare_provider if prepare_provider
|
12
|
+
|
13
|
+
@attributes.freeze
|
14
|
+
end
|
15
|
+
|
16
|
+
#
|
17
|
+
# Renames should be checked and tested before being executed.
|
18
|
+
#
|
19
|
+
# @return [boolean]
|
20
|
+
def prepare_provider
|
21
|
+
attributes.fetch(:prepareProvider)
|
22
|
+
end
|
23
|
+
|
24
|
+
attr_reader :attributes
|
25
|
+
|
26
|
+
def to_hash
|
27
|
+
attributes
|
28
|
+
end
|
29
|
+
|
30
|
+
def to_json(*args)
|
31
|
+
to_hash.to_json(*args)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
class RenameRegistrationOptions < TextDocumentRegistrationOptions
|
5
|
+
def initialize(document_selector:, prepare_provider: nil)
|
6
|
+
@attributes = {}
|
7
|
+
|
8
|
+
@attributes[:prepareProvider] = prepare_provider if prepare_provider
|
9
|
+
|
10
|
+
@attributes.freeze
|
11
|
+
end
|
12
|
+
|
13
|
+
#
|
14
|
+
# Renames should be checked and tested for validity before being executed.
|
15
|
+
#
|
16
|
+
# @return [boolean]
|
17
|
+
def prepare_provider
|
18
|
+
attributes.fetch(:prepareProvider)
|
19
|
+
end
|
20
|
+
|
21
|
+
attr_reader :attributes
|
22
|
+
|
23
|
+
def to_hash
|
24
|
+
attributes
|
25
|
+
end
|
26
|
+
|
27
|
+
def to_json(*args)
|
28
|
+
to_hash.to_json(*args)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -2,7 +2,7 @@ module LanguageServer
|
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
4
|
class ServerCapabilities
|
5
|
-
def initialize(text_document_sync: nil, hover_provider: nil, completion_provider: nil, signature_help_provider: nil, definition_provider: nil, type_definition_provider: nil, implementation_provider: nil, references_provider: nil, document_highlight_provider: nil, document_symbol_provider: nil, workspace_symbol_provider: nil, code_action_provider: nil, code_lens_provider: nil, document_formatting_provider: nil, document_range_formatting_provider: nil, document_on_type_formatting_provider: nil, rename_provider: nil, document_link_provider: nil, color_provider: nil, execute_command_provider: nil, workspace: nil, experimental: nil)
|
5
|
+
def initialize(text_document_sync: nil, hover_provider: nil, completion_provider: nil, signature_help_provider: nil, definition_provider: nil, type_definition_provider: nil, implementation_provider: nil, references_provider: nil, document_highlight_provider: nil, document_symbol_provider: nil, workspace_symbol_provider: nil, code_action_provider: nil, code_lens_provider: nil, document_formatting_provider: nil, document_range_formatting_provider: nil, document_on_type_formatting_provider: nil, rename_provider: nil, document_link_provider: nil, color_provider: nil, folding_range_provider: nil, execute_command_provider: nil, workspace: nil, experimental: nil)
|
6
6
|
@attributes = {}
|
7
7
|
|
8
8
|
@attributes[:textDocumentSync] = text_document_sync if text_document_sync
|
@@ -24,6 +24,7 @@ module LanguageServer
|
|
24
24
|
@attributes[:renameProvider] = rename_provider if rename_provider
|
25
25
|
@attributes[:documentLinkProvider] = document_link_provider if document_link_provider
|
26
26
|
@attributes[:colorProvider] = color_provider if color_provider
|
27
|
+
@attributes[:foldingRangeProvider] = folding_range_provider if folding_range_provider
|
27
28
|
@attributes[:executeCommandProvider] = execute_command_provider if execute_command_provider
|
28
29
|
@attributes[:workspace] = workspace if workspace
|
29
30
|
@attributes[:experimental] = experimental if experimental
|
@@ -125,9 +126,11 @@ module LanguageServer
|
|
125
126
|
end
|
126
127
|
|
127
128
|
#
|
128
|
-
# The server provides code actions.
|
129
|
+
# The server provides code actions. The `CodeActionOptions` return type is only
|
130
|
+
# valid if the client signals code action literal support via the property
|
131
|
+
# `textDocument.codeAction.codeActionLiteralSupport`.
|
129
132
|
#
|
130
|
-
# @return [boolean]
|
133
|
+
# @return [boolean | CodeActionOptions]
|
131
134
|
def code_action_provider
|
132
135
|
attributes.fetch(:codeActionProvider)
|
133
136
|
end
|
@@ -165,9 +168,11 @@ module LanguageServer
|
|
165
168
|
end
|
166
169
|
|
167
170
|
#
|
168
|
-
# The server provides rename support.
|
171
|
+
# The server provides rename support. RenameOptions may only be
|
172
|
+
# specified if the client states that it supports
|
173
|
+
# `prepareSupport` in its initial `initialize` request.
|
169
174
|
#
|
170
|
-
# @return [boolean]
|
175
|
+
# @return [boolean | RenameOptions]
|
171
176
|
def rename_provider
|
172
177
|
attributes.fetch(:renameProvider)
|
173
178
|
end
|
@@ -190,6 +195,16 @@ module LanguageServer
|
|
190
195
|
attributes.fetch(:colorProvider)
|
191
196
|
end
|
192
197
|
|
198
|
+
#
|
199
|
+
# The server provides folding provider support.
|
200
|
+
#
|
201
|
+
# Since 3.10.0
|
202
|
+
#
|
203
|
+
# @return [boolean | FoldingRangeProviderOptions | (FoldingRangeProviderOptions & TextDocumentRegistrationOp...]
|
204
|
+
def folding_range_provider
|
205
|
+
attributes.fetch(:foldingRangeProvider)
|
206
|
+
end
|
207
|
+
|
193
208
|
#
|
194
209
|
# The server provides execute command support.
|
195
210
|
#
|
@@ -5,7 +5,7 @@ module LanguageServer
|
|
5
5
|
# Text document specific client capabilities.
|
6
6
|
#
|
7
7
|
class TextDocumentClientCapabilities
|
8
|
-
def initialize(synchronization: nil, completion: nil, hover: nil, signature_help: nil, references: nil, document_highlight: nil, document_symbol: nil, formatting: nil, range_formatting: nil, on_type_formatting: nil, definition: nil, type_definition: nil, implementation: nil, code_action: nil, code_lens: nil, document_link: nil, color_provider: nil, rename: nil, publish_diagnostics: nil)
|
8
|
+
def initialize(synchronization: nil, completion: nil, hover: nil, signature_help: nil, references: nil, document_highlight: nil, document_symbol: nil, formatting: nil, range_formatting: nil, on_type_formatting: nil, definition: nil, type_definition: nil, implementation: nil, code_action: nil, code_lens: nil, document_link: nil, color_provider: nil, rename: nil, publish_diagnostics: nil, folding_range: nil)
|
9
9
|
@attributes = {}
|
10
10
|
|
11
11
|
@attributes[:synchronization] = synchronization if synchronization
|
@@ -27,6 +27,7 @@ module LanguageServer
|
|
27
27
|
@attributes[:colorProvider] = color_provider if color_provider
|
28
28
|
@attributes[:rename] = rename if rename
|
29
29
|
@attributes[:publishDiagnostics] = publish_diagnostics if publish_diagnostics
|
30
|
+
@attributes[:foldingRange] = folding_range if folding_range
|
30
31
|
|
31
32
|
@attributes.freeze
|
32
33
|
end
|
@@ -79,7 +80,7 @@ module LanguageServer
|
|
79
80
|
#
|
80
81
|
# Capabilities specific to the `textDocument/documentSymbol`
|
81
82
|
#
|
82
|
-
# @return [{ dynamicRegistration?: boolean; symbolKind?: { valueSet?: any[]; };
|
83
|
+
# @return [{ dynamicRegistration?: boolean; symbolKind?: { valueSet?: any[]; }; hierarchicalDocumentSymbolSu...]
|
83
84
|
def document_symbol
|
84
85
|
attributes.fetch(:documentSymbol)
|
85
86
|
end
|
@@ -139,7 +140,7 @@ module LanguageServer
|
|
139
140
|
#
|
140
141
|
# Capabilities specific to the `textDocument/codeAction`
|
141
142
|
#
|
142
|
-
# @return [{ dynamicRegistration?: boolean;
|
143
|
+
# @return [{ dynamicRegistration?: boolean; codeActionLiteralSupport?: { codeActionKind: { valueSet: string[...]
|
143
144
|
def code_action
|
144
145
|
attributes.fetch(:codeAction)
|
145
146
|
end
|
@@ -174,7 +175,7 @@ module LanguageServer
|
|
174
175
|
#
|
175
176
|
# Capabilities specific to the `textDocument/rename`
|
176
177
|
#
|
177
|
-
# @return [{ dynamicRegistration?: boolean; }]
|
178
|
+
# @return [{ dynamicRegistration?: boolean; prepareSupport?: boolean; }]
|
178
179
|
def rename
|
179
180
|
attributes.fetch(:rename)
|
180
181
|
end
|
@@ -187,6 +188,16 @@ module LanguageServer
|
|
187
188
|
attributes.fetch(:publishDiagnostics)
|
188
189
|
end
|
189
190
|
|
191
|
+
#
|
192
|
+
# Capabilities specific to `textDocument/foldingRange` requests.
|
193
|
+
#
|
194
|
+
# Since 3.10.0
|
195
|
+
#
|
196
|
+
# @return [{ dynamicRegistration?: boolean; rangeLimit?: number; lineFoldingOnly?: boolean; }]
|
197
|
+
def folding_range
|
198
|
+
attributes.fetch(:foldingRange)
|
199
|
+
end
|
200
|
+
|
190
201
|
attr_reader :attributes
|
191
202
|
|
192
203
|
def to_hash
|
@@ -5,8 +5,11 @@ module LanguageServer
|
|
5
5
|
autoload :ApplyWorkspaceEditResponse, "language_server/protocol/interface/apply_workspace_edit_response"
|
6
6
|
autoload :CancelParams, "language_server/protocol/interface/cancel_params"
|
7
7
|
autoload :ClientCapabilities, "language_server/protocol/interface/client_capabilities"
|
8
|
+
autoload :CodeAction, "language_server/protocol/interface/code_action"
|
8
9
|
autoload :CodeActionContext, "language_server/protocol/interface/code_action_context"
|
10
|
+
autoload :CodeActionOptions, "language_server/protocol/interface/code_action_options"
|
9
11
|
autoload :CodeActionParams, "language_server/protocol/interface/code_action_params"
|
12
|
+
autoload :CodeActionRegistrationOptions, "language_server/protocol/interface/code_action_registration_options"
|
10
13
|
autoload :CodeLens, "language_server/protocol/interface/code_lens"
|
11
14
|
autoload :CodeLensOptions, "language_server/protocol/interface/code_lens_options"
|
12
15
|
autoload :CodeLensParams, "language_server/protocol/interface/code_lens_params"
|
@@ -52,6 +55,9 @@ module LanguageServer
|
|
52
55
|
autoload :ExecuteCommandRegistrationOptions, "language_server/protocol/interface/execute_command_registration_options"
|
53
56
|
autoload :FileEvent, "language_server/protocol/interface/file_event"
|
54
57
|
autoload :FileSystemWatcher, "language_server/protocol/interface/file_system_watcher"
|
58
|
+
autoload :FoldingRange, "language_server/protocol/interface/folding_range"
|
59
|
+
autoload :FoldingRangeProviderOptions, "language_server/protocol/interface/folding_range_provider_options"
|
60
|
+
autoload :FoldingRangeRequestParam, "language_server/protocol/interface/folding_range_request_param"
|
55
61
|
autoload :FormattingOptions, "language_server/protocol/interface/formatting_options"
|
56
62
|
autoload :Hover, "language_server/protocol/interface/hover"
|
57
63
|
autoload :InitializeError, "language_server/protocol/interface/initialize_error"
|
@@ -72,7 +78,9 @@ module LanguageServer
|
|
72
78
|
autoload :ReferenceParams, "language_server/protocol/interface/reference_params"
|
73
79
|
autoload :Registration, "language_server/protocol/interface/registration"
|
74
80
|
autoload :RegistrationParams, "language_server/protocol/interface/registration_params"
|
81
|
+
autoload :RenameOptions, "language_server/protocol/interface/rename_options"
|
75
82
|
autoload :RenameParams, "language_server/protocol/interface/rename_params"
|
83
|
+
autoload :RenameRegistrationOptions, "language_server/protocol/interface/rename_registration_options"
|
76
84
|
autoload :RequestMessage, "language_server/protocol/interface/request_message"
|
77
85
|
autoload :ResponseError, "language_server/protocol/interface/response_error"
|
78
86
|
autoload :ResponseMessage, "language_server/protocol/interface/response_message"
|
@@ -111,8 +119,11 @@ module LanguageServer
|
|
111
119
|
require "language_server/protocol/interface/apply_workspace_edit_response"
|
112
120
|
require "language_server/protocol/interface/cancel_params"
|
113
121
|
require "language_server/protocol/interface/client_capabilities"
|
122
|
+
require "language_server/protocol/interface/code_action"
|
114
123
|
require "language_server/protocol/interface/code_action_context"
|
124
|
+
require "language_server/protocol/interface/code_action_options"
|
115
125
|
require "language_server/protocol/interface/code_action_params"
|
126
|
+
require "language_server/protocol/interface/code_action_registration_options"
|
116
127
|
require "language_server/protocol/interface/code_lens"
|
117
128
|
require "language_server/protocol/interface/code_lens_options"
|
118
129
|
require "language_server/protocol/interface/code_lens_params"
|
@@ -158,6 +169,9 @@ module LanguageServer
|
|
158
169
|
require "language_server/protocol/interface/execute_command_registration_options"
|
159
170
|
require "language_server/protocol/interface/file_event"
|
160
171
|
require "language_server/protocol/interface/file_system_watcher"
|
172
|
+
require "language_server/protocol/interface/folding_range"
|
173
|
+
require "language_server/protocol/interface/folding_range_provider_options"
|
174
|
+
require "language_server/protocol/interface/folding_range_request_param"
|
161
175
|
require "language_server/protocol/interface/formatting_options"
|
162
176
|
require "language_server/protocol/interface/hover"
|
163
177
|
require "language_server/protocol/interface/initialize_error"
|
@@ -178,7 +192,9 @@ module LanguageServer
|
|
178
192
|
require "language_server/protocol/interface/reference_params"
|
179
193
|
require "language_server/protocol/interface/registration"
|
180
194
|
require "language_server/protocol/interface/registration_params"
|
195
|
+
require "language_server/protocol/interface/rename_options"
|
181
196
|
require "language_server/protocol/interface/rename_params"
|
197
|
+
require "language_server/protocol/interface/rename_registration_options"
|
182
198
|
require "language_server/protocol/interface/request_message"
|
183
199
|
require "language_server/protocol/interface/response_error"
|
184
200
|
require "language_server/protocol/interface/response_message"
|
data/scripts/generateFiles.ts
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
import * as ts from
|
2
|
-
import * as fs from
|
3
|
-
import * as path from
|
4
|
-
import * as fetch from
|
1
|
+
import * as ts from "typescript";
|
2
|
+
import * as fs from "fs";
|
3
|
+
import * as path from "path";
|
4
|
+
import * as fetch from "isomorphic-fetch";
|
5
5
|
|
6
|
-
const lspVersion =
|
6
|
+
const lspVersion = "e0ed81b9c0de995196c4ec7a54a7c9432bb7897f";
|
7
7
|
const rootDir = path.normalize(path.join(__dirname, ".."));
|
8
8
|
const tempDir = path.join(rootDir, "tmp");
|
9
9
|
const protocolMdPath = path.join(tempDir, lspVersion, "protocol.md");
|
@@ -20,19 +20,19 @@ const createFile = (filePath, content) => {
|
|
20
20
|
});
|
21
21
|
|
22
22
|
fs.writeFileSync(filePath, content);
|
23
|
-
}
|
23
|
+
};
|
24
24
|
|
25
25
|
const extractTypeScriptSource = content => {
|
26
|
-
const regEx = /^```typescript\r\n([^]*?)^```\r\n/
|
26
|
+
const regEx = /^```typescript\r\n([^]*?)^```\r\n/gm;
|
27
27
|
let match;
|
28
28
|
let result = "";
|
29
29
|
|
30
|
-
while((match = regEx.exec(content)) !== null) {
|
30
|
+
while ((match = regEx.exec(content)) !== null) {
|
31
31
|
result = result.concat(match[1]);
|
32
32
|
}
|
33
33
|
|
34
34
|
return result;
|
35
|
-
}
|
35
|
+
};
|
36
36
|
|
37
37
|
const extractDefinitions = content => {
|
38
38
|
const fileName = path.join(tempDir, "protocol.ts");
|
@@ -44,79 +44,108 @@ const extractDefinitions = content => {
|
|
44
44
|
|
45
45
|
const serialize = member => {
|
46
46
|
const symbol = checker.getSymbolAtLocation(member.name);
|
47
|
-
const type = checker.getTypeOfSymbolAtLocation(
|
48
|
-
|
47
|
+
const type = checker.getTypeOfSymbolAtLocation(
|
48
|
+
symbol,
|
49
|
+
symbol.valueDeclaration
|
50
|
+
);
|
51
|
+
const types =
|
52
|
+
member.kind == ts.SyntaxKind.UnionType
|
53
|
+
? (<ts.UnionTypeNode>(<ts.PropertySignature>member).type).types
|
54
|
+
: [];
|
49
55
|
|
50
56
|
return {
|
51
57
|
name: symbol.getName(),
|
52
58
|
documentation: ts.displayPartsToString(symbol.getDocumentationComment()),
|
53
59
|
type: checker.typeToString(type),
|
54
60
|
optional: !!member.questionToken,
|
55
|
-
nullable: (<ts.NodeArray<ts.TypeNode>>types).some(
|
56
|
-
|
61
|
+
nullable: (<ts.NodeArray<ts.TypeNode>>types).some(
|
62
|
+
t => t.kind == ts.SyntaxKind.NullKeyword
|
63
|
+
),
|
64
|
+
value: symbol.valueDeclaration
|
65
|
+
? symbol.valueDeclaration
|
66
|
+
.getChildAt(symbol.valueDeclaration.getChildCount() - 1)
|
67
|
+
.getText()
|
68
|
+
: null
|
57
69
|
};
|
58
|
-
}
|
70
|
+
};
|
59
71
|
|
60
72
|
const handleInterface = (node: ts.InterfaceDeclaration) => {
|
61
|
-
const members = node.members
|
62
|
-
|
63
|
-
|
73
|
+
const members = node.members
|
74
|
+
.filter(member => member.name)
|
75
|
+
.map(member => serialize(member));
|
76
|
+
const parentName =
|
77
|
+
node.heritageClauses && node.heritageClauses[0].getLastToken().getText();
|
78
|
+
const parent = output.find(
|
79
|
+
i => i.interface && i.interface.name === parentName
|
80
|
+
);
|
64
81
|
|
65
|
-
output.push(
|
66
|
-
{
|
82
|
+
output.push({
|
67
83
|
interface: serialize(node),
|
68
84
|
parent: parent,
|
69
85
|
allMembers: ((parent && parent.allMembers) || []).concat(members),
|
70
86
|
members
|
71
|
-
}
|
72
|
-
|
73
|
-
}
|
87
|
+
});
|
88
|
+
};
|
74
89
|
|
75
90
|
const handleModule = (node: ts.ModuleDeclaration) => {
|
76
|
-
const members = []
|
91
|
+
const members = [];
|
77
92
|
|
78
93
|
ts.forEachChild(node.body, node => {
|
79
|
-
members.push(
|
94
|
+
members.push(
|
95
|
+
serialize((<ts.VariableStatement>node).declarationList.declarations[0])
|
96
|
+
);
|
80
97
|
});
|
81
98
|
|
82
|
-
output.push(
|
83
|
-
{
|
99
|
+
output.push({
|
84
100
|
module: serialize(node),
|
85
101
|
members
|
86
|
-
}
|
87
|
-
|
88
|
-
}
|
102
|
+
});
|
103
|
+
};
|
89
104
|
|
90
105
|
const visit = node => {
|
91
|
-
switch(node.kind) {
|
92
|
-
case
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
case
|
97
|
-
|
98
|
-
|
106
|
+
switch (node.kind) {
|
107
|
+
case ts.SyntaxKind.InterfaceDeclaration:
|
108
|
+
handleInterface(node);
|
109
|
+
break;
|
110
|
+
|
111
|
+
case ts.SyntaxKind.ModuleDeclaration:
|
112
|
+
handleModule(node);
|
113
|
+
break;
|
99
114
|
}
|
100
115
|
};
|
101
116
|
|
102
117
|
ts.forEachChild(program.getSourceFile(fileName), visit);
|
103
118
|
|
104
119
|
return output;
|
105
|
-
}
|
120
|
+
};
|
106
121
|
|
107
122
|
import Handlebars from "handlebars";
|
108
|
-
const snake = s =>
|
123
|
+
const snake = s =>
|
124
|
+
s
|
125
|
+
.replace(/^[A-Z]/, s => s.toLowerCase())
|
126
|
+
.replace(/[A-Z]/g, s => `_${s.toLowerCase()}`);
|
109
127
|
|
110
128
|
Handlebars.registerHelper("params", members => {
|
111
|
-
return members
|
129
|
+
return members
|
130
|
+
.map(
|
131
|
+
member =>
|
132
|
+
`${snake(member.name)}:${
|
133
|
+
member.optional || member.nullable ? " nil" : ""
|
134
|
+
}`
|
135
|
+
)
|
136
|
+
.join(", ");
|
112
137
|
});
|
113
138
|
Handlebars.registerHelper("snake", snake);
|
114
139
|
Handlebars.registerHelper("comment", (s, options) => {
|
115
140
|
const indent = Array(options.hash.indent + 1).join(" ");
|
116
|
-
return s
|
141
|
+
return s
|
142
|
+
.split("\n")
|
143
|
+
.map(s => s.trim())
|
144
|
+
.map(s => `${indent}#${s.length == 0 ? "" : ` ${s}`}`)
|
145
|
+
.join("\n");
|
117
146
|
});
|
118
147
|
Handlebars.registerHelper("local_var", s => {
|
119
|
-
const rubyKeywords = ["end", "retry"]
|
148
|
+
const rubyKeywords = ["end", "retry"];
|
120
149
|
const snaked = snake(s);
|
121
150
|
|
122
151
|
if (rubyKeywords.some(k => k == s)) {
|
@@ -131,7 +160,9 @@ Handlebars.registerHelper("const", s => {
|
|
131
160
|
|
132
161
|
(async () => {
|
133
162
|
if (!fs.existsSync(protocolMdPath)) {
|
134
|
-
const res = await fetch(
|
163
|
+
const res = await fetch(
|
164
|
+
`https://github.com/Microsoft/language-server-protocol/raw/${lspVersion}/specification.md`
|
165
|
+
);
|
135
166
|
createFile(protocolMdPath, await res.text());
|
136
167
|
}
|
137
168
|
|
@@ -143,7 +174,17 @@ Handlebars.registerHelper("const", s => {
|
|
143
174
|
const modules = definitions.filter(d => d.module);
|
144
175
|
|
145
176
|
interfaces.forEach(definition => {
|
146
|
-
createFile(
|
177
|
+
createFile(
|
178
|
+
path.join(
|
179
|
+
rootDir,
|
180
|
+
"lib",
|
181
|
+
"language_server",
|
182
|
+
"protocol",
|
183
|
+
"interface",
|
184
|
+
`${snake(definition.interface.name)}.rb`
|
185
|
+
),
|
186
|
+
Handlebars.compile(
|
187
|
+
`
|
147
188
|
module LanguageServer
|
148
189
|
module Protocol
|
149
190
|
module Interface
|
@@ -188,11 +229,24 @@ module LanguageServer
|
|
188
229
|
end
|
189
230
|
end
|
190
231
|
end
|
191
|
-
`.slice(1),
|
232
|
+
`.slice(1),
|
233
|
+
{ noEscape: true }
|
234
|
+
)({ definition })
|
235
|
+
);
|
192
236
|
});
|
193
237
|
|
194
238
|
modules.forEach(definition => {
|
195
|
-
createFile(
|
239
|
+
createFile(
|
240
|
+
path.join(
|
241
|
+
rootDir,
|
242
|
+
"lib",
|
243
|
+
"language_server",
|
244
|
+
"protocol",
|
245
|
+
"constant",
|
246
|
+
`${snake(definition.module.name)}.rb`
|
247
|
+
),
|
248
|
+
Handlebars.compile(
|
249
|
+
`
|
196
250
|
module LanguageServer
|
197
251
|
module Protocol
|
198
252
|
module Constant
|
@@ -214,10 +268,16 @@ module LanguageServer
|
|
214
268
|
end
|
215
269
|
end
|
216
270
|
end
|
217
|
-
`.slice(1),
|
271
|
+
`.slice(1),
|
272
|
+
{ noEscape: true }
|
273
|
+
)({ definition })
|
274
|
+
);
|
218
275
|
});
|
219
276
|
|
220
|
-
createFile(
|
277
|
+
createFile(
|
278
|
+
path.join(rootDir, "lib", "language_server", "protocol", "interface.rb"),
|
279
|
+
Handlebars.compile(
|
280
|
+
`
|
221
281
|
module LanguageServer
|
222
282
|
module Protocol
|
223
283
|
module Interface
|
@@ -231,9 +291,15 @@ module LanguageServer
|
|
231
291
|
end
|
232
292
|
end
|
233
293
|
end
|
234
|
-
`.slice(1),
|
235
|
-
|
236
|
-
|
294
|
+
`.slice(1),
|
295
|
+
{ noEscape: true }
|
296
|
+
)({ names: interfaces.map(i => i.interface.name).sort() })
|
297
|
+
);
|
298
|
+
|
299
|
+
createFile(
|
300
|
+
path.join(rootDir, "lib", "language_server", "protocol", "constant.rb"),
|
301
|
+
Handlebars.compile(
|
302
|
+
`
|
237
303
|
module LanguageServer
|
238
304
|
module Protocol
|
239
305
|
module Constant
|
@@ -247,6 +313,8 @@ module LanguageServer
|
|
247
313
|
end
|
248
314
|
end
|
249
315
|
end
|
250
|
-
`.slice(1),
|
251
|
-
|
316
|
+
`.slice(1),
|
317
|
+
{ noEscape: true }
|
318
|
+
)({ names: modules.map(i => i.module.name).sort() })
|
319
|
+
);
|
252
320
|
})();
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: language_server-protocol
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.12.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fumiaki MATSUSHIMA
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-08-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -137,6 +137,7 @@ files:
|
|
137
137
|
- lib/language_server-protocol.rb
|
138
138
|
- lib/language_server/protocol.rb
|
139
139
|
- lib/language_server/protocol/constant.rb
|
140
|
+
- lib/language_server/protocol/constant/code_action_kind.rb
|
140
141
|
- lib/language_server/protocol/constant/completion_item_kind.rb
|
141
142
|
- lib/language_server/protocol/constant/completion_trigger_kind.rb
|
142
143
|
- lib/language_server/protocol/constant/diagnostic_severity.rb
|
@@ -156,8 +157,11 @@ files:
|
|
156
157
|
- lib/language_server/protocol/interface/apply_workspace_edit_response.rb
|
157
158
|
- lib/language_server/protocol/interface/cancel_params.rb
|
158
159
|
- lib/language_server/protocol/interface/client_capabilities.rb
|
160
|
+
- lib/language_server/protocol/interface/code_action.rb
|
159
161
|
- lib/language_server/protocol/interface/code_action_context.rb
|
162
|
+
- lib/language_server/protocol/interface/code_action_options.rb
|
160
163
|
- lib/language_server/protocol/interface/code_action_params.rb
|
164
|
+
- lib/language_server/protocol/interface/code_action_registration_options.rb
|
161
165
|
- lib/language_server/protocol/interface/code_lens.rb
|
162
166
|
- lib/language_server/protocol/interface/code_lens_options.rb
|
163
167
|
- lib/language_server/protocol/interface/code_lens_params.rb
|
@@ -203,6 +207,9 @@ files:
|
|
203
207
|
- lib/language_server/protocol/interface/execute_command_registration_options.rb
|
204
208
|
- lib/language_server/protocol/interface/file_event.rb
|
205
209
|
- lib/language_server/protocol/interface/file_system_watcher.rb
|
210
|
+
- lib/language_server/protocol/interface/folding_range.rb
|
211
|
+
- lib/language_server/protocol/interface/folding_range_provider_options.rb
|
212
|
+
- lib/language_server/protocol/interface/folding_range_request_param.rb
|
206
213
|
- lib/language_server/protocol/interface/formatting_options.rb
|
207
214
|
- lib/language_server/protocol/interface/hover.rb
|
208
215
|
- lib/language_server/protocol/interface/initialize_error.rb
|
@@ -223,7 +230,9 @@ files:
|
|
223
230
|
- lib/language_server/protocol/interface/reference_params.rb
|
224
231
|
- lib/language_server/protocol/interface/registration.rb
|
225
232
|
- lib/language_server/protocol/interface/registration_params.rb
|
233
|
+
- lib/language_server/protocol/interface/rename_options.rb
|
226
234
|
- lib/language_server/protocol/interface/rename_params.rb
|
235
|
+
- lib/language_server/protocol/interface/rename_registration_options.rb
|
227
236
|
- lib/language_server/protocol/interface/request_message.rb
|
228
237
|
- lib/language_server/protocol/interface/response_error.rb
|
229
238
|
- lib/language_server/protocol/interface/response_message.rb
|
@@ -286,7 +295,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
286
295
|
version: '0'
|
287
296
|
requirements: []
|
288
297
|
rubyforge_project:
|
289
|
-
rubygems_version: 2.7.
|
298
|
+
rubygems_version: 2.7.7
|
290
299
|
signing_key:
|
291
300
|
specification_version: 4
|
292
301
|
summary: A Language Server Protocol SDK
|