language_server 0.10.0 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8d1bb86816f7e13333c5e9fbc6ed4930d48dcc90b7c865fc10942ffd3e279fd2
4
- data.tar.gz: 59f55973ed8a7fcba78d0172235baa6247ca755758533bd64f0516c13da491fa
3
+ metadata.gz: 468e34ca809d762b9c90a5ed0d1906777e01a570fb085a92dc345c90e6a71e59
4
+ data.tar.gz: 3ec3706c296754ba08a6b5262407eafbd91cd5a1413efafc0f881db99f18876c
5
5
  SHA512:
6
- metadata.gz: 015ee3cdc9cdf83bf92fc39f892c09aa27c5cf2161cc55da7168b67f58ad59214a9c38cdd10ffa3e3aeb6757dcd4c3c89c8564a1211ead9649b205acdb9da847
7
- data.tar.gz: c5360bb9e9a02a8fa326dce7ebae9e331b8556534e692f7885f919430c9928c9cb9132371b78af3742bc410e03d8cc7ea922fa8ad09f0b085938c0797512a27f
6
+ metadata.gz: a830d47d8e451e9b1584d98540d4808c90288176d84ac726585f4d5ce4802a58ee2558ba00cb045df3095131fff06a6c5cdb8bc547045cabf038b21eb5d48953
7
+ data.tar.gz: 3e180506cfec812ed29c7ef21cf845896fe169f911ab69989430c38b70e45b11cfe276e5e39c92d37086003ac642941999ebeadda05f82dfc13f2dbefde34c2e
@@ -1,5 +1,5 @@
1
1
  inherit_from:
2
- - https://github.com/onk/onkcop/raw/v0.51.0.0/config/rubocop.yml
2
+ - https://github.com/onk/onkcop/raw/v0.52.0.0/config/rubocop.yml
3
3
 
4
4
  AllCops:
5
5
  TargetRubyVersion: 2.2
@@ -43,3 +43,6 @@ Metrics/ModuleLength:
43
43
 
44
44
  Metrics/LineLength:
45
45
  Max: 200
46
+ Exclude:
47
+ # To use power_assert, we must pub assertion in one line
48
+ - 'test/**/*'
@@ -2,6 +2,11 @@
2
2
 
3
3
  ## Not released
4
4
 
5
+ ## 0.11.0
6
+
7
+ - Remove rcodetools integration (for now)
8
+ - Bump language_server-protocol
9
+
5
10
  ## 0.10.0
6
11
 
7
12
  - Add --experimental-features flag
data/Gemfile CHANGED
@@ -3,5 +3,4 @@ source "https://rubygems.org"
3
3
  # Specify your gem's dependencies in language_server.gemspec
4
4
  gemspec
5
5
 
6
- # TODO: Use released gem after new release includes https://github.com/bbatsov/rubocop/pull/4987
7
- gem "rubocop", git: "https://github.com/bbatsov/rubocop", ref: "88d9e3b"
6
+ gem "rubocop", "0.52.1"
data/Rakefile CHANGED
@@ -5,6 +5,7 @@ Rake::TestTask.new(:test) do |t|
5
5
  t.libs << "test"
6
6
  t.libs << "lib"
7
7
  t.test_files = FileList["test/**/*_test.rb"]
8
+ t.warning = false
8
9
  end
9
10
 
10
11
  task :default => :test
@@ -25,8 +25,7 @@ Gem::Specification.new do |spec|
25
25
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
26
26
  spec.require_paths = ["lib"]
27
27
 
28
- spec.add_dependency "language_server-protocol", "0.4.0"
29
- spec.add_dependency "rcodetools"
28
+ spec.add_dependency "language_server-protocol", "0.5.0"
30
29
 
31
30
  spec.add_development_dependency "awesome_print"
32
31
  spec.add_development_dependency "benchmark-ips"
@@ -3,7 +3,6 @@ require "language_server/logger"
3
3
  require "language_server/protocol"
4
4
  require "language_server/linter/ruby_wc"
5
5
  require "language_server/linter/rubocop"
6
- require "language_server/completion_provider/rcodetools"
7
6
  require "language_server/completion_provider/ad_hoc"
8
7
  require "language_server/definition_provider/ad_hoc"
9
8
  require "language_server/file_store"
@@ -137,14 +136,15 @@ module LanguageServer
137
136
  )
138
137
  end
139
138
 
140
- on :"textDocument/completion" do |request:, file_store:, project:|
139
+ on :"textDocument/completion" do |request:, project:|
141
140
  uri = request[:params][:textDocument][:uri]
142
141
  line, character = request[:params][:position].fetch_values(:line, :character).map(&:to_i)
143
142
 
144
- providers = [CompletionProvider::Rcodetools.new(uri: uri, line: line, character: character, file_store: file_store)]
145
- providers << CompletionProvider::AdHoc.new(uri: uri, line: line, character: character, project: project) if LanguageServer.adhoc_enabled?
146
-
147
- providers.flat_map(&:call)
143
+ if LanguageServer.adhoc_enabled?
144
+ [
145
+ CompletionProvider::AdHoc.new(uri: uri, line: line, character: character, project: project),
146
+ ].flat_map(&:call)
147
+ end
148
148
  end
149
149
 
150
150
  on :"textDocument/definition" do |request:, project:|
@@ -5,7 +5,7 @@ module LanguageServer
5
5
  def attributes(*attrs)
6
6
  attr_accessor(*attrs)
7
7
  attribute_names.concat(attrs)
8
- class_eval <<-RUBY, __FILE__, __LINE__
8
+ class_eval <<-RUBY, __FILE__, __LINE__ + 1
9
9
  def initialize(#{attribute_names.map { |n| "#{n}:" }.join(",")})
10
10
  #{attribute_names.map { |n|
11
11
  "@#{n} = #{n}"
@@ -1,3 +1,3 @@
1
1
  module LanguageServer
2
- VERSION = "0.10.0".freeze
2
+ VERSION = "0.11.0".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: language_server
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.11.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: 2017-11-21 00:00:00.000000000 Z
11
+ date: 2018-01-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: language_server-protocol
@@ -16,28 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.4.0
19
+ version: 0.5.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 0.4.0
27
- - !ruby/object:Gem::Dependency
28
- name: rcodetools
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
26
+ version: 0.5.0
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: awesome_print
43
29
  requirement: !ruby/object:Gem::Requirement
@@ -231,7 +217,6 @@ files:
231
217
  - language_server.gemspec
232
218
  - lib/language_server.rb
233
219
  - lib/language_server/completion_provider/ad_hoc.rb
234
- - lib/language_server/completion_provider/rcodetools.rb
235
220
  - lib/language_server/definition_provider/ad_hoc.rb
236
221
  - lib/language_server/file_store.rb
237
222
  - lib/language_server/linter/rubocop.rb
@@ -262,7 +247,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
262
247
  version: '0'
263
248
  requirements: []
264
249
  rubyforge_project:
265
- rubygems_version: 2.7.2
250
+ rubygems_version: 2.7.3
266
251
  signing_key:
267
252
  specification_version: 4
268
253
  summary: A Ruby Language Server implementation
@@ -1,43 +0,0 @@
1
- require "language_server/protocol"
2
- require "rcodetools/completion"
3
-
4
- module LanguageServer
5
- module CompletionProvider
6
- class Filter < ::Rcodetools::XMPCompletionFilter
7
- @candidates_with_description_flag = true
8
-
9
- def completion_code(*args)
10
- candidates_with_class(*args)
11
- rescue NewCodeError, RuntimeDataError, NoCandidates
12
- [nil, []]
13
- end
14
- end
15
-
16
- class Rcodetools
17
- def initialize(uri:, line:, character:, file_store:)
18
- @uri = uri
19
- @line = line
20
- @character = character
21
- @file_store = file_store
22
- end
23
-
24
- def call
25
- _, candidates = Filter.run(source, lineno: @line + 1, column: @character)
26
- candidates.map do |candidate|
27
- method_name, description = candidate.split(/\0/, 2)
28
- Protocol::Interface::CompletionItem.new(
29
- label: method_name,
30
- detail: description,
31
- kind: Protocol::Constant::CompletionItemKind::METHOD,
32
- )
33
- end
34
- end
35
-
36
- private
37
-
38
- def source
39
- @file_store.read_remote_uri(@uri)
40
- end
41
- end
42
- end
43
- end