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.
@@ -1,18 +1,23 @@
1
- # typed: true
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",
@@ -1,4 +1,4 @@
1
- # typed: true
1
+ # typed: strict
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module RubyLsp
@@ -46,11 +46,12 @@ module RubyLsp
46
46
  end
47
47
 
48
48
  sig do
49
- params(
50
- uri: String,
51
- request_name: Symbol,
52
- block: T.proc.params(document: Document).returns(T.untyped)
53
- ).returns(T.untyped)
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)
@@ -3,6 +3,7 @@
3
3
 
4
4
  desc "Check if all LSP requests are documented"
5
5
  task :check_docs do
6
+ require "sorbet-runtime"
6
7
  require "language_server-protocol"
7
8
  require "syntax_tree"
8
9
  require "logger"
data/ruby-lsp.gemspec CHANGED
@@ -22,5 +22,5 @@ Gem::Specification.new do |s|
22
22
  s.add_dependency("language_server-protocol")
23
23
  s.add_dependency("rubocop", ">= 1.0")
24
24
  s.add_dependency("sorbet-runtime")
25
- s.add_dependency("syntax_tree", ">= 2.3")
25
+ s.add_dependency("syntax_tree", ">= 2.4")
26
26
  end
@@ -1,4 +1,4 @@
1
- # typed: true
1
+ # typed: strict
2
2
  # frozen_string_literal: true
3
3
 
4
4
  # Add your extra requires here (`bin/tapioca require` can be used to boostrap this list)
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
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-07 00:00:00.000000000 Z
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.3'
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.3'
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.2.20
189
+ rubygems_version: 3.3.3
191
190
  signing_key:
192
191
  specification_version: 4
193
192
  summary: A simple language server for ruby
@@ -1 +0,0 @@
1
- # default config