ruby-lsp 0.0.4 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +10 -1
- data/CHANGELOG.md +10 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +13 -13
- data/README.md +1 -1
- data/VERSION +1 -1
- data/exe/ruby-lsp +1 -1
- data/lib/ruby-lsp.rb +2 -2
- data/lib/ruby_lsp/document.rb +7 -1
- data/lib/ruby_lsp/handler.rb +30 -32
- data/lib/{internal.rb → ruby_lsp/internal.rb} +1 -1
- data/lib/ruby_lsp/requests/base_request.rb +9 -7
- data/lib/ruby_lsp/requests/code_actions.rb +18 -9
- data/lib/ruby_lsp/requests/diagnostics.rb +13 -1
- data/lib/ruby_lsp/requests/document_highlight.rb +21 -6
- data/lib/ruby_lsp/requests/document_symbol.rb +57 -10
- data/lib/ruby_lsp/requests/folding_ranges.rb +52 -18
- data/lib/ruby_lsp/requests/formatting.rb +8 -3
- data/lib/ruby_lsp/requests/rubocop_request.rb +19 -9
- data/lib/ruby_lsp/requests/selection_ranges.rb +16 -5
- data/lib/ruby_lsp/requests/semantic_highlighting.rb +104 -29
- data/lib/ruby_lsp/requests/support/rubocop_diagnostic.rb +16 -4
- data/lib/ruby_lsp/requests/support/selection_range.rb +4 -1
- data/lib/ruby_lsp/requests/support/semantic_token_encoder.rb +13 -3
- data/lib/ruby_lsp/requests/support/syntax_error_diagnostic.rb +6 -1
- data/lib/ruby_lsp/requests.rb +1 -1
- data/lib/ruby_lsp/store.rb +6 -5
- data/rakelib/check_docs.rake +1 -0
- data/ruby-lsp.gemspec +1 -1
- data/sorbet/tapioca/require.rb +1 -1
- metadata +6 -7
- data/shipit.production.yml +0 -1
@@ -1,18 +1,23 @@
|
|
1
|
-
# typed:
|
1
|
+
# typed: strict
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
4
|
module RubyLsp
|
5
5
|
module Requests
|
6
6
|
module Support
|
7
7
|
class SyntaxErrorDiagnostic
|
8
|
+
extend T::Sig
|
9
|
+
|
10
|
+
sig { params(edit: Document::EditShape).void }
|
8
11
|
def initialize(edit)
|
9
12
|
@edit = edit
|
10
13
|
end
|
11
14
|
|
15
|
+
sig { returns(FalseClass) }
|
12
16
|
def correctable?
|
13
17
|
false
|
14
18
|
end
|
15
19
|
|
20
|
+
sig { returns(LanguageServer::Protocol::Interface::Diagnostic) }
|
16
21
|
def to_lsp_diagnostic
|
17
22
|
LanguageServer::Protocol::Interface::Diagnostic.new(
|
18
23
|
message: "Syntax error",
|
data/lib/ruby_lsp/requests.rb
CHANGED
data/lib/ruby_lsp/store.rb
CHANGED
@@ -46,11 +46,12 @@ module RubyLsp
|
|
46
46
|
end
|
47
47
|
|
48
48
|
sig do
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
49
|
+
type_parameters(:T)
|
50
|
+
.params(
|
51
|
+
uri: String,
|
52
|
+
request_name: Symbol,
|
53
|
+
block: T.proc.params(document: Document).returns(T.type_parameter(:T))
|
54
|
+
).returns(T.type_parameter(:T))
|
54
55
|
end
|
55
56
|
def cache_fetch(uri, request_name, &block)
|
56
57
|
get(uri).cache_fetch(request_name, &block)
|
data/rakelib/check_docs.rake
CHANGED
data/ruby-lsp.gemspec
CHANGED
data/sorbet/tapioca/require.rb
CHANGED
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.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shopify
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-06-
|
11
|
+
date: 2022-06-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: language_server-protocol
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '2.
|
61
|
+
version: '2.4'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '2.
|
68
|
+
version: '2.4'
|
69
69
|
description: A simple language server for ruby
|
70
70
|
email:
|
71
71
|
- ruby@shopify.com
|
@@ -97,11 +97,11 @@ files:
|
|
97
97
|
- bin/test
|
98
98
|
- dev.yml
|
99
99
|
- exe/ruby-lsp
|
100
|
-
- lib/internal.rb
|
101
100
|
- lib/ruby-lsp.rb
|
102
101
|
- lib/ruby_lsp/cli.rb
|
103
102
|
- lib/ruby_lsp/document.rb
|
104
103
|
- lib/ruby_lsp/handler.rb
|
104
|
+
- lib/ruby_lsp/internal.rb
|
105
105
|
- lib/ruby_lsp/requests.rb
|
106
106
|
- lib/ruby_lsp/requests/base_request.rb
|
107
107
|
- lib/ruby_lsp/requests/code_actions.rb
|
@@ -121,7 +121,6 @@ files:
|
|
121
121
|
- rakelib/check_docs.rake
|
122
122
|
- ruby-lsp.gemspec
|
123
123
|
- service.yml
|
124
|
-
- shipit.production.yml
|
125
124
|
- sorbet/config
|
126
125
|
- sorbet/rbi/.rubocop.yml
|
127
126
|
- sorbet/rbi/gems/ansi@1.5.0.rbi
|
@@ -187,7 +186,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
187
186
|
- !ruby/object:Gem::Version
|
188
187
|
version: '0'
|
189
188
|
requirements: []
|
190
|
-
rubygems_version: 3.
|
189
|
+
rubygems_version: 3.3.3
|
191
190
|
signing_key:
|
192
191
|
specification_version: 4
|
193
192
|
summary: A simple language server for ruby
|
data/shipit.production.yml
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
# default config
|