ruby-lsp 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/VERSION +1 -1
- data/lib/ruby_lsp/handler.rb +0 -19
- data/lib/ruby_lsp/requests/document_link.rb +59 -0
- data/lib/ruby_lsp/requests/semantic_highlighting.rb +11 -5
- data/lib/ruby_lsp/requests/support/highlight_target.rb +2 -1
- data/lib/ruby_lsp/requests/support/rubocop_diagnostic.rb +9 -2
- data/lib/ruby_lsp/requests.rb +2 -0
- data/lib/ruby_lsp/server.rb +51 -19
- metadata +3 -69
- data/.github/dependabot.yml +0 -11
- data/.github/probots.yml +0 -2
- data/.github/pull_request_template.md +0 -15
- data/.github/workflows/ci.yml +0 -31
- data/.github/workflows/publish_docs.yml +0 -32
- data/.gitignore +0 -9
- data/.rubocop.yml +0 -40
- data/.vscode/extensions.json +0 -5
- data/.vscode/settings.json +0 -5
- data/.vscode/tasks.json +0 -25
- data/CODE_OF_CONDUCT.md +0 -78
- data/Gemfile +0 -18
- data/Gemfile.lock +0 -126
- data/Rakefile +0 -28
- data/bin/console +0 -19
- data/bin/rubocop +0 -29
- data/bin/tapioca +0 -29
- data/bin/test +0 -9
- data/dev.yml +0 -20
- data/rakelib/check_docs.rake +0 -81
- data/ruby-lsp.gemspec +0 -27
- data/service.yml +0 -2
- data/sorbet/config +0 -4
- data/sorbet/rbi/.rubocop.yml +0 -8
- data/sorbet/rbi/gems/ansi@1.5.0.rbi +0 -338
- data/sorbet/rbi/gems/ast@2.4.2.rbi +0 -522
- data/sorbet/rbi/gems/builder@3.2.4.rbi +0 -418
- data/sorbet/rbi/gems/coderay@1.1.3.rbi +0 -8
- data/sorbet/rbi/gems/debug@1.5.0.rbi +0 -1273
- data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +0 -867
- data/sorbet/rbi/gems/io-console@0.5.11.rbi +0 -8
- data/sorbet/rbi/gems/irb@1.4.1.rbi +0 -376
- data/sorbet/rbi/gems/language_server-protocol@3.16.0.3.rbi +0 -7325
- data/sorbet/rbi/gems/method_source@1.0.0.rbi +0 -8
- data/sorbet/rbi/gems/minitest-reporters@1.5.0.rbi +0 -612
- data/sorbet/rbi/gems/minitest@5.15.0.rbi +0 -994
- data/sorbet/rbi/gems/parallel@1.22.1.rbi +0 -163
- data/sorbet/rbi/gems/parser@3.1.2.0.rbi +0 -3968
- data/sorbet/rbi/gems/prettier_print@0.1.0.rbi +0 -734
- data/sorbet/rbi/gems/pry@0.14.1.rbi +0 -8
- data/sorbet/rbi/gems/rainbow@3.1.1.rbi +0 -227
- data/sorbet/rbi/gems/rake@13.0.6.rbi +0 -1853
- data/sorbet/rbi/gems/rbi@0.0.14.rbi +0 -2337
- data/sorbet/rbi/gems/regexp_parser@2.5.0.rbi +0 -1854
- data/sorbet/rbi/gems/reline@0.3.1.rbi +0 -1274
- data/sorbet/rbi/gems/rexml@3.2.5.rbi +0 -3852
- data/sorbet/rbi/gems/rubocop-ast@1.18.0.rbi +0 -4180
- data/sorbet/rbi/gems/rubocop-minitest@0.20.0.rbi +0 -1369
- data/sorbet/rbi/gems/rubocop-rake@0.6.0.rbi +0 -246
- data/sorbet/rbi/gems/rubocop-shopify@2.6.0.rbi +0 -8
- data/sorbet/rbi/gems/rubocop-sorbet@0.6.8.rbi +0 -652
- data/sorbet/rbi/gems/rubocop@1.30.0.rbi +0 -36729
- data/sorbet/rbi/gems/ruby-progressbar@1.11.0.rbi +0 -732
- data/sorbet/rbi/gems/spoom@1.1.11.rbi +0 -1600
- data/sorbet/rbi/gems/syntax_tree@2.7.1.rbi +0 -6777
- data/sorbet/rbi/gems/tapioca@0.8.1.rbi +0 -1972
- data/sorbet/rbi/gems/thor@1.2.1.rbi +0 -2921
- data/sorbet/rbi/gems/unicode-display_width@2.1.0.rbi +0 -27
- data/sorbet/rbi/gems/unparser@0.6.5.rbi +0 -2789
- data/sorbet/rbi/gems/webrick@1.7.0.rbi +0 -1779
- data/sorbet/rbi/gems/yard-sorbet@0.6.1.rbi +0 -289
- data/sorbet/rbi/gems/yard@0.9.27.rbi +0 -13048
- data/sorbet/rbi/shims/fiddle.rbi +0 -4
- data/sorbet/rbi/shims/hash.rbi +0 -6
- data/sorbet/rbi/shims/rdoc.rbi +0 -4
- data/sorbet/tapioca/config.yml +0 -13
- data/sorbet/tapioca/require.rb +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0fefb041d92fb2000d3da23248ed622abd596a95264b421349f27d104b85f997
|
4
|
+
data.tar.gz: 312918f128e0a49a2f5b2066354df2fe45f9ed37af5e5eace6c76caa101155e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ab96bd356fe94e3a95572bec24053eed9b467c71acec431a80c600e87ea5a3c31f0f2aee20c7b3b407b5aabc9b5736e0bb385dedf2840747c892fe7ad090b69
|
7
|
+
data.tar.gz: 2ec3f3c88c851e86e7ef6485c7719a271dbda81717990446900fe121844daac905b5f554833b59769a4c6f626bb50579d5e51970e7a306d206c898d0a289d36c
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,16 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how
|
|
6
6
|
|
7
7
|
## [Unreleased]
|
8
8
|
|
9
|
+
## [0.2.2]
|
10
|
+
|
11
|
+
- Support document links (https://github.com/Shopify/ruby-lsp/pull/195)
|
12
|
+
- Avoid returning on request blocks (https://github.com/Shopify/ruby-lsp/pull/232)
|
13
|
+
- Better specify gemspec files (https://github.com/Shopify/ruby-lsp/pull/233)
|
14
|
+
- Include Kernel instance methods as special methods for semantic highlighting (https://github.com/Shopify/ruby-lsp/pull/231)
|
15
|
+
- Fix call processing when message is a :call symbol literal (https://github.com/Shopify/ruby-lsp/pull/236)
|
16
|
+
- Alert users about non auto-correctable diagnostics (https://github.com/Shopify/ruby-lsp/pull/230)
|
17
|
+
- Let clients pull diagnostics instead of pushing on edits (https://github.com/Shopify/ruby-lsp/pull/242)
|
18
|
+
|
9
19
|
## [0.2.1]
|
10
20
|
|
11
21
|
- Implement the exit lifecycle request (https://github.com/Shopify/ruby-lsp/pull/198)
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.2
|
data/lib/ruby_lsp/handler.rb
CHANGED
@@ -86,25 +86,6 @@ module RubyLsp
|
|
86
86
|
store.clear
|
87
87
|
end
|
88
88
|
|
89
|
-
sig { params(uri: String).void }
|
90
|
-
def send_diagnostics(uri)
|
91
|
-
response = store.cache_fetch(uri, :diagnostics) do |document|
|
92
|
-
Requests::Diagnostics.new(uri, document).run
|
93
|
-
end
|
94
|
-
|
95
|
-
return if response.nil?
|
96
|
-
|
97
|
-
@writer.write(
|
98
|
-
method: "textDocument/publishDiagnostics",
|
99
|
-
params: Interface::PublishDiagnosticsParams.new(
|
100
|
-
uri: uri,
|
101
|
-
diagnostics: response.map(&:to_lsp_diagnostic)
|
102
|
-
)
|
103
|
-
)
|
104
|
-
rescue RuboCop::ValidationError => e
|
105
|
-
show_message(Constant::MessageType::ERROR, "Error in RuboCop configuration file: #{e.message}")
|
106
|
-
end
|
107
|
-
|
108
89
|
sig { params(uri: String).void }
|
109
90
|
def clear_diagnostics(uri)
|
110
91
|
@writer.write(
|
@@ -0,0 +1,59 @@
|
|
1
|
+
# typed: strict
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module RubyLsp
|
5
|
+
module Requests
|
6
|
+
# 
|
7
|
+
#
|
8
|
+
# The [document link](https://microsoft.github.io/language-server-protocol/specification#textDocument_documentLink)
|
9
|
+
# makes `# source://PATH_TO_FILE:line` comments in a Ruby/RBI file clickable if the file exists.
|
10
|
+
# When the user clicks the link, it'll open that location.
|
11
|
+
#
|
12
|
+
# # Example
|
13
|
+
#
|
14
|
+
# ```ruby
|
15
|
+
# # source://syntax_tree-3.2.1/lib/syntax_tree.rb:51 <- it will be clickable and will take the user to that location
|
16
|
+
# def format(source, maxwidth = T.unsafe(nil))
|
17
|
+
# end
|
18
|
+
# ```
|
19
|
+
class DocumentLink < BaseRequest
|
20
|
+
extend T::Sig
|
21
|
+
|
22
|
+
RUBY_ROOT = "RUBY_ROOT"
|
23
|
+
|
24
|
+
sig { params(document: Document).void }
|
25
|
+
def initialize(document)
|
26
|
+
super
|
27
|
+
|
28
|
+
@links = T.let([], T::Array[LanguageServer::Protocol::Interface::DocumentLink])
|
29
|
+
end
|
30
|
+
|
31
|
+
sig { override.returns(T.all(T::Array[LanguageServer::Protocol::Interface::DocumentLink], Object)) }
|
32
|
+
def run
|
33
|
+
visit(@document.tree)
|
34
|
+
@links
|
35
|
+
end
|
36
|
+
|
37
|
+
sig { params(node: SyntaxTree::Comment).void }
|
38
|
+
def visit_comment(node)
|
39
|
+
match = node.value.match(%r{source://(?<path>.*):(?<line>\d+)$})
|
40
|
+
return unless match
|
41
|
+
|
42
|
+
file_path = if match[:path].start_with?(RUBY_ROOT)
|
43
|
+
match[:path].sub(RUBY_ROOT, RbConfig::CONFIG["rubylibdir"])
|
44
|
+
else
|
45
|
+
File.join(Bundler.bundle_path, "gems", match[:path])
|
46
|
+
end
|
47
|
+
return unless File.exist?(file_path)
|
48
|
+
|
49
|
+
target = "file://#{file_path}##{match[:line]}"
|
50
|
+
|
51
|
+
@links << LanguageServer::Protocol::Interface::DocumentLink.new(
|
52
|
+
range: range_from_syntax_tree_node(node),
|
53
|
+
target: target,
|
54
|
+
tooltip: "Jump to #{target.delete_prefix("file://")}"
|
55
|
+
)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -60,10 +60,13 @@ module RubyLsp
|
|
60
60
|
default_library: 9,
|
61
61
|
}.freeze, T::Hash[Symbol, Integer])
|
62
62
|
|
63
|
-
SPECIAL_RUBY_METHODS = T.let(
|
64
|
-
|
65
|
-
|
66
|
-
.
|
63
|
+
SPECIAL_RUBY_METHODS = T.let([
|
64
|
+
Module.instance_methods(false),
|
65
|
+
Kernel.instance_methods(false),
|
66
|
+
Kernel.methods(false),
|
67
|
+
Bundler::Dsl.instance_methods(false),
|
68
|
+
Module.private_instance_methods(false),
|
69
|
+
].flatten.map(&:to_s), T::Array[String])
|
67
70
|
|
68
71
|
class SemanticToken < T::Struct
|
69
72
|
const :location, SyntaxTree::Location
|
@@ -105,7 +108,10 @@ module RubyLsp
|
|
105
108
|
sig { params(node: SyntaxTree::Call).void }
|
106
109
|
def visit_call(node)
|
107
110
|
visit(node.receiver)
|
108
|
-
|
111
|
+
|
112
|
+
message = node.message
|
113
|
+
add_token(message.location, :method) if message != :call
|
114
|
+
|
109
115
|
visit(node.arguments)
|
110
116
|
end
|
111
117
|
|
@@ -76,7 +76,8 @@ module RubyLsp
|
|
76
76
|
when SyntaxTree::VarField, SyntaxTree::VarRef, SyntaxTree::VCall, SyntaxTree::FCall
|
77
77
|
node.value&.value
|
78
78
|
when SyntaxTree::Call, SyntaxTree::Command, SyntaxTree::CommandCall
|
79
|
-
node.message
|
79
|
+
message = node.message
|
80
|
+
message != :call ? message.value : nil
|
80
81
|
when SyntaxTree::ClassDeclaration, SyntaxTree::ModuleDeclaration
|
81
82
|
node.constant.constant.value
|
82
83
|
end
|
@@ -61,11 +61,18 @@ module RubyLsp
|
|
61
61
|
|
62
62
|
sig { returns(LanguageServer::Protocol::Interface::Diagnostic) }
|
63
63
|
def to_lsp_diagnostic
|
64
|
+
if @offense.correctable?
|
65
|
+
severity = RUBOCOP_TO_LSP_SEVERITY[@offense.severity.name]
|
66
|
+
message = @offense.message
|
67
|
+
else
|
68
|
+
severity = LanguageServer::Protocol::Constant::DiagnosticSeverity::WARNING
|
69
|
+
message = "#{@offense.message}\n\nThis offense is not auto-correctable.\n"
|
70
|
+
end
|
64
71
|
LanguageServer::Protocol::Interface::Diagnostic.new(
|
65
|
-
message:
|
72
|
+
message: message,
|
66
73
|
source: "RuboCop",
|
67
74
|
code: @offense.cop_name,
|
68
|
-
severity:
|
75
|
+
severity: severity,
|
69
76
|
range: LanguageServer::Protocol::Interface::Range.new(
|
70
77
|
start: LanguageServer::Protocol::Interface::Position.new(
|
71
78
|
line: @offense.line - 1,
|
data/lib/ruby_lsp/requests.rb
CHANGED
@@ -5,6 +5,7 @@ module RubyLsp
|
|
5
5
|
# Supported features
|
6
6
|
#
|
7
7
|
# - {RubyLsp::Requests::DocumentSymbol}
|
8
|
+
# - {RubyLsp::Requests::DocumentLink}
|
8
9
|
# - {RubyLsp::Requests::FoldingRanges}
|
9
10
|
# - {RubyLsp::Requests::SelectionRanges}
|
10
11
|
# - {RubyLsp::Requests::SemanticHighlighting}
|
@@ -15,6 +16,7 @@ module RubyLsp
|
|
15
16
|
module Requests
|
16
17
|
autoload :BaseRequest, "ruby_lsp/requests/base_request"
|
17
18
|
autoload :DocumentSymbol, "ruby_lsp/requests/document_symbol"
|
19
|
+
autoload :DocumentLink, "ruby_lsp/requests/document_link"
|
18
20
|
autoload :FoldingRanges, "ruby_lsp/requests/folding_ranges"
|
19
21
|
autoload :SelectionRanges, "ruby_lsp/requests/selection_ranges"
|
20
22
|
autoload :SemanticHighlighting, "ruby_lsp/requests/semantic_highlighting"
|
data/lib/ruby_lsp/server.rb
CHANGED
@@ -19,6 +19,10 @@ module RubyLsp
|
|
19
19
|
)
|
20
20
|
end
|
21
21
|
|
22
|
+
document_link_provider = if enabled_features.include?("documentLink")
|
23
|
+
Interface::DocumentLinkOptions.new(resolve_provider: false)
|
24
|
+
end
|
25
|
+
|
22
26
|
folding_ranges_provider = if enabled_features.include?("foldingRanges")
|
23
27
|
Interface::FoldingRangeClientCapabilities.new(line_folding_only: true)
|
24
28
|
end
|
@@ -37,20 +41,30 @@ module RubyLsp
|
|
37
41
|
)
|
38
42
|
end
|
39
43
|
|
44
|
+
diagnostics_provider = if enabled_features.include?("diagnostics")
|
45
|
+
{
|
46
|
+
interFileDependencies: false,
|
47
|
+
workspaceDiagnostics: false,
|
48
|
+
}
|
49
|
+
end
|
50
|
+
|
51
|
+
# TODO: switch back to using Interface::ServerCapabilities once the gem is updated for spec 3.17
|
40
52
|
Interface::InitializeResult.new(
|
41
|
-
capabilities:
|
42
|
-
|
53
|
+
capabilities: {
|
54
|
+
textDocumentSync: Interface::TextDocumentSyncOptions.new(
|
43
55
|
change: Constant::TextDocumentSyncKind::INCREMENTAL,
|
44
56
|
open_close: true,
|
45
57
|
),
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
58
|
+
selectionRangeProvider: enabled_features.include?("selectionRanges"),
|
59
|
+
documentSymbolProvider: document_symbol_provider,
|
60
|
+
documentLinkProvider: document_link_provider,
|
61
|
+
foldingRangeProvider: folding_ranges_provider,
|
62
|
+
semanticTokensProvider: semantic_tokens_provider,
|
63
|
+
documentFormattingProvider: enabled_features.include?("formatting"),
|
64
|
+
documentHighlightProvider: enabled_features.include?("documentHighlights"),
|
65
|
+
codeActionProvider: enabled_features.include?("codeActions"),
|
66
|
+
diagnosticProvider: diagnostics_provider,
|
67
|
+
}.reject { |_, v| !v }
|
54
68
|
)
|
55
69
|
end
|
56
70
|
|
@@ -58,7 +72,6 @@ module RubyLsp
|
|
58
72
|
uri = request.dig(:params, :textDocument, :uri)
|
59
73
|
store.push_edits(uri, request.dig(:params, :contentChanges))
|
60
74
|
|
61
|
-
send_diagnostics(uri)
|
62
75
|
Handler::VOID
|
63
76
|
end
|
64
77
|
|
@@ -67,7 +80,6 @@ module RubyLsp
|
|
67
80
|
text = request.dig(:params, :textDocument, :text)
|
68
81
|
store.set(uri, text)
|
69
82
|
|
70
|
-
send_diagnostics(uri)
|
71
83
|
Handler::VOID
|
72
84
|
end
|
73
85
|
|
@@ -85,6 +97,12 @@ module RubyLsp
|
|
85
97
|
end
|
86
98
|
end
|
87
99
|
|
100
|
+
on("textDocument/documentLink") do |request|
|
101
|
+
store.cache_fetch(request.dig(:params, :textDocument, :uri), :document_link) do |document|
|
102
|
+
RubyLsp::Requests::DocumentLink.new(document).run
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
88
106
|
on("textDocument/foldingRange") do |request|
|
89
107
|
store.cache_fetch(request.dig(:params, :textDocument, :uri), :folding_ranges) do |document|
|
90
108
|
Requests::FoldingRanges.new(document).run
|
@@ -99,15 +117,16 @@ module RubyLsp
|
|
99
117
|
Requests::SelectionRanges.new(document).run
|
100
118
|
end
|
101
119
|
|
102
|
-
return if ranges.nil?
|
103
|
-
|
104
120
|
# Per the selection range request spec (https://microsoft.github.io/language-server-protocol/specification#textDocument_selectionRange),
|
105
121
|
# every position in the positions array should have an element at the same index in the response
|
106
122
|
# array. For positions without a valid selection range, the corresponding element in the response
|
107
123
|
# array will be nil.
|
108
|
-
|
109
|
-
|
110
|
-
|
124
|
+
|
125
|
+
unless ranges.nil?
|
126
|
+
positions.map do |position|
|
127
|
+
ranges.find do |range|
|
128
|
+
range.cover?(position)
|
129
|
+
end
|
111
130
|
end
|
112
131
|
end
|
113
132
|
end
|
@@ -132,9 +151,10 @@ module RubyLsp
|
|
132
151
|
|
133
152
|
on("textDocument/documentHighlight") do |request|
|
134
153
|
document = store.get(request.dig(:params, :textDocument, :uri))
|
135
|
-
return unless document.parsed?
|
136
154
|
|
137
|
-
|
155
|
+
if document.parsed?
|
156
|
+
Requests::DocumentHighlight.new(document, request.dig(:params, :position)).run
|
157
|
+
end
|
138
158
|
end
|
139
159
|
|
140
160
|
on("textDocument/codeAction") do |request|
|
@@ -148,6 +168,18 @@ module RubyLsp
|
|
148
168
|
end
|
149
169
|
end
|
150
170
|
|
171
|
+
on("textDocument/diagnostic") do |request|
|
172
|
+
uri = request.dig(:params, :textDocument, :uri)
|
173
|
+
response = store.cache_fetch(uri, :diagnostics) do |document|
|
174
|
+
Requests::Diagnostics.new(uri, document).run
|
175
|
+
end
|
176
|
+
|
177
|
+
{ kind: "full", items: response.map(&:to_lsp_diagnostic) } if response
|
178
|
+
rescue RuboCop::ValidationError => e
|
179
|
+
show_message(Constant::MessageType::ERROR, "Error in RuboCop configuration file: #{e.message}")
|
180
|
+
nil
|
181
|
+
end
|
182
|
+
|
151
183
|
on("shutdown") { shutdown }
|
152
184
|
|
153
185
|
on("exit") do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-lsp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shopify
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-08-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: language_server-protocol
|
@@ -60,29 +60,10 @@ executables:
|
|
60
60
|
extensions: []
|
61
61
|
extra_rdoc_files: []
|
62
62
|
files:
|
63
|
-
- ".github/dependabot.yml"
|
64
|
-
- ".github/probots.yml"
|
65
|
-
- ".github/pull_request_template.md"
|
66
|
-
- ".github/workflows/ci.yml"
|
67
|
-
- ".github/workflows/publish_docs.yml"
|
68
|
-
- ".gitignore"
|
69
|
-
- ".rubocop.yml"
|
70
|
-
- ".vscode/extensions.json"
|
71
|
-
- ".vscode/settings.json"
|
72
|
-
- ".vscode/tasks.json"
|
73
63
|
- CHANGELOG.md
|
74
|
-
- CODE_OF_CONDUCT.md
|
75
|
-
- Gemfile
|
76
|
-
- Gemfile.lock
|
77
64
|
- LICENSE.txt
|
78
65
|
- README.md
|
79
|
-
- Rakefile
|
80
66
|
- VERSION
|
81
|
-
- bin/console
|
82
|
-
- bin/rubocop
|
83
|
-
- bin/tapioca
|
84
|
-
- bin/test
|
85
|
-
- dev.yml
|
86
67
|
- exe/ruby-lsp
|
87
68
|
- lib/ruby-lsp.rb
|
88
69
|
- lib/ruby_lsp/document.rb
|
@@ -93,6 +74,7 @@ files:
|
|
93
74
|
- lib/ruby_lsp/requests/code_actions.rb
|
94
75
|
- lib/ruby_lsp/requests/diagnostics.rb
|
95
76
|
- lib/ruby_lsp/requests/document_highlight.rb
|
77
|
+
- lib/ruby_lsp/requests/document_link.rb
|
96
78
|
- lib/ruby_lsp/requests/document_symbol.rb
|
97
79
|
- lib/ruby_lsp/requests/folding_ranges.rb
|
98
80
|
- lib/ruby_lsp/requests/formatting.rb
|
@@ -107,54 +89,6 @@ files:
|
|
107
89
|
- lib/ruby_lsp/requests/support/syntax_error_diagnostic.rb
|
108
90
|
- lib/ruby_lsp/server.rb
|
109
91
|
- lib/ruby_lsp/store.rb
|
110
|
-
- rakelib/check_docs.rake
|
111
|
-
- ruby-lsp.gemspec
|
112
|
-
- service.yml
|
113
|
-
- sorbet/config
|
114
|
-
- sorbet/rbi/.rubocop.yml
|
115
|
-
- sorbet/rbi/gems/ansi@1.5.0.rbi
|
116
|
-
- sorbet/rbi/gems/ast@2.4.2.rbi
|
117
|
-
- sorbet/rbi/gems/builder@3.2.4.rbi
|
118
|
-
- sorbet/rbi/gems/coderay@1.1.3.rbi
|
119
|
-
- sorbet/rbi/gems/debug@1.5.0.rbi
|
120
|
-
- sorbet/rbi/gems/diff-lcs@1.5.0.rbi
|
121
|
-
- sorbet/rbi/gems/io-console@0.5.11.rbi
|
122
|
-
- sorbet/rbi/gems/irb@1.4.1.rbi
|
123
|
-
- sorbet/rbi/gems/language_server-protocol@3.16.0.3.rbi
|
124
|
-
- sorbet/rbi/gems/method_source@1.0.0.rbi
|
125
|
-
- sorbet/rbi/gems/minitest-reporters@1.5.0.rbi
|
126
|
-
- sorbet/rbi/gems/minitest@5.15.0.rbi
|
127
|
-
- sorbet/rbi/gems/parallel@1.22.1.rbi
|
128
|
-
- sorbet/rbi/gems/parser@3.1.2.0.rbi
|
129
|
-
- sorbet/rbi/gems/prettier_print@0.1.0.rbi
|
130
|
-
- sorbet/rbi/gems/pry@0.14.1.rbi
|
131
|
-
- sorbet/rbi/gems/rainbow@3.1.1.rbi
|
132
|
-
- sorbet/rbi/gems/rake@13.0.6.rbi
|
133
|
-
- sorbet/rbi/gems/rbi@0.0.14.rbi
|
134
|
-
- sorbet/rbi/gems/regexp_parser@2.5.0.rbi
|
135
|
-
- sorbet/rbi/gems/reline@0.3.1.rbi
|
136
|
-
- sorbet/rbi/gems/rexml@3.2.5.rbi
|
137
|
-
- sorbet/rbi/gems/rubocop-ast@1.18.0.rbi
|
138
|
-
- sorbet/rbi/gems/rubocop-minitest@0.20.0.rbi
|
139
|
-
- sorbet/rbi/gems/rubocop-rake@0.6.0.rbi
|
140
|
-
- sorbet/rbi/gems/rubocop-shopify@2.6.0.rbi
|
141
|
-
- sorbet/rbi/gems/rubocop-sorbet@0.6.8.rbi
|
142
|
-
- sorbet/rbi/gems/rubocop@1.30.0.rbi
|
143
|
-
- sorbet/rbi/gems/ruby-progressbar@1.11.0.rbi
|
144
|
-
- sorbet/rbi/gems/spoom@1.1.11.rbi
|
145
|
-
- sorbet/rbi/gems/syntax_tree@2.7.1.rbi
|
146
|
-
- sorbet/rbi/gems/tapioca@0.8.1.rbi
|
147
|
-
- sorbet/rbi/gems/thor@1.2.1.rbi
|
148
|
-
- sorbet/rbi/gems/unicode-display_width@2.1.0.rbi
|
149
|
-
- sorbet/rbi/gems/unparser@0.6.5.rbi
|
150
|
-
- sorbet/rbi/gems/webrick@1.7.0.rbi
|
151
|
-
- sorbet/rbi/gems/yard-sorbet@0.6.1.rbi
|
152
|
-
- sorbet/rbi/gems/yard@0.9.27.rbi
|
153
|
-
- sorbet/rbi/shims/fiddle.rbi
|
154
|
-
- sorbet/rbi/shims/hash.rbi
|
155
|
-
- sorbet/rbi/shims/rdoc.rbi
|
156
|
-
- sorbet/tapioca/config.yml
|
157
|
-
- sorbet/tapioca/require.rb
|
158
92
|
homepage: https://github.com/Shopify/ruby-lsp
|
159
93
|
licenses:
|
160
94
|
- MIT
|
data/.github/dependabot.yml
DELETED
data/.github/probots.yml
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
### Motivation
|
2
|
-
|
3
|
-
<!-- Explain why you are making this change. Include links to issues or describe the problem being solved, not the solution. -->
|
4
|
-
|
5
|
-
### Implementation
|
6
|
-
|
7
|
-
<!-- How did you implement your changes? Explain your solution, design decisions, things reviewers should watch out for. -->
|
8
|
-
|
9
|
-
### Automated Tests
|
10
|
-
|
11
|
-
<!-- We hope you added unit tests as part of your changes, just state that you have. If you haven't, state why. -->
|
12
|
-
|
13
|
-
### Manual Tests
|
14
|
-
|
15
|
-
<!-- Explain how we can test these changes in our own instance of VS Code. Provide the step by step instructions. -->
|
data/.github/workflows/ci.yml
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
name: CI
|
2
|
-
|
3
|
-
on: [push, pull_request]
|
4
|
-
|
5
|
-
jobs:
|
6
|
-
build:
|
7
|
-
runs-on: ubuntu-latest
|
8
|
-
strategy:
|
9
|
-
fail-fast: false
|
10
|
-
matrix:
|
11
|
-
ruby: [ "2.7", "3.0", "3.1" ]
|
12
|
-
name: Ruby ${{ matrix.ruby }}
|
13
|
-
steps:
|
14
|
-
- uses: actions/checkout@v2
|
15
|
-
- name: Set up Ruby
|
16
|
-
uses: ruby/setup-ruby@v1
|
17
|
-
with:
|
18
|
-
ruby-version: ${{ matrix.ruby }}
|
19
|
-
bundler-cache: true
|
20
|
-
|
21
|
-
- name: Check if documentation is up to date
|
22
|
-
run: bundle exec rake check_docs
|
23
|
-
|
24
|
-
- name: Typecheck
|
25
|
-
run: bundle exec srb tc
|
26
|
-
|
27
|
-
- name: Lint Ruby files
|
28
|
-
run: bin/rubocop
|
29
|
-
|
30
|
-
- name: Run tests
|
31
|
-
run: bin/test
|
@@ -1,32 +0,0 @@
|
|
1
|
-
name: Publish docs
|
2
|
-
|
3
|
-
on:
|
4
|
-
push:
|
5
|
-
branches: [main]
|
6
|
-
|
7
|
-
jobs:
|
8
|
-
build:
|
9
|
-
runs-on: ubuntu-latest
|
10
|
-
name: Publish documentation website
|
11
|
-
steps:
|
12
|
-
- uses: actions/checkout@v3
|
13
|
-
|
14
|
-
- name: Set up Ruby
|
15
|
-
uses: ruby/setup-ruby@v1
|
16
|
-
with:
|
17
|
-
ruby-version: 3.1.1
|
18
|
-
bundler-cache: true
|
19
|
-
|
20
|
-
- name: Configure git
|
21
|
-
run: |
|
22
|
-
git config user.name github-actions
|
23
|
-
git config user.email github-actions@github.com
|
24
|
-
|
25
|
-
- name: Generate documentation
|
26
|
-
run: bundle exec rake yard
|
27
|
-
|
28
|
-
- name: Commit to gh-pages
|
29
|
-
run: |
|
30
|
-
git add docs
|
31
|
-
git commit -m "Publish website $(git log --format=format:%h -1)"
|
32
|
-
git push --force origin main:gh-pages
|
data/.gitignore
DELETED
data/.rubocop.yml
DELETED
@@ -1,40 +0,0 @@
|
|
1
|
-
inherit_gem:
|
2
|
-
rubocop-shopify: rubocop.yml
|
3
|
-
|
4
|
-
require:
|
5
|
-
- rubocop-sorbet
|
6
|
-
- rubocop-minitest
|
7
|
-
- rubocop-rake
|
8
|
-
|
9
|
-
AllCops:
|
10
|
-
NewCops: disable
|
11
|
-
SuggestExtensions: false
|
12
|
-
TargetRubyVersion: 2.7
|
13
|
-
Exclude:
|
14
|
-
- "vendor/**/*"
|
15
|
-
- "features/**/*"
|
16
|
-
- "test/fixtures/**/*"
|
17
|
-
|
18
|
-
Naming/FileName:
|
19
|
-
Exclude:
|
20
|
-
- "lib/ruby-lsp.rb"
|
21
|
-
|
22
|
-
Sorbet/FalseSigil:
|
23
|
-
Enabled: false
|
24
|
-
|
25
|
-
Sorbet/TrueSigil:
|
26
|
-
Enabled: true
|
27
|
-
Include:
|
28
|
-
- "test/**/*.rb"
|
29
|
-
Exclude:
|
30
|
-
- "**/*.rake"
|
31
|
-
- "lib/**/*.rb"
|
32
|
-
|
33
|
-
Sorbet/StrictSigil:
|
34
|
-
Enabled: true
|
35
|
-
Include:
|
36
|
-
- "lib/**/*.rb"
|
37
|
-
Exclude:
|
38
|
-
- "**/*.rake"
|
39
|
-
- "test/**/*.rb"
|
40
|
-
- "lib/ruby-lsp.rb"
|
data/.vscode/extensions.json
DELETED
data/.vscode/settings.json
DELETED
data/.vscode/tasks.json
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
2
|
-
// for the documentation about the tasks.json format
|
3
|
-
{
|
4
|
-
"version": "2.0.0",
|
5
|
-
"tasks": [
|
6
|
-
{
|
7
|
-
"type": "rake",
|
8
|
-
"task": "test",
|
9
|
-
"group": {
|
10
|
-
"kind": "test",
|
11
|
-
"isDefault": true
|
12
|
-
},
|
13
|
-
"problemMatcher": [],
|
14
|
-
"label": "rake: test",
|
15
|
-
"presentation": {
|
16
|
-
"echo": true,
|
17
|
-
"reveal": "always",
|
18
|
-
"focus": true,
|
19
|
-
"panel": "shared",
|
20
|
-
"showReuseMessage": true,
|
21
|
-
"clear": false
|
22
|
-
}
|
23
|
-
}
|
24
|
-
]
|
25
|
-
}
|