solargraph 0.7.2 → 0.7.3

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
  SHA1:
3
- metadata.gz: 5088ef299f87773ea5663feb379e16be34a830c9
4
- data.tar.gz: 2833fbd7eda8be9fded3e9b060c2f80229585ef7
3
+ metadata.gz: 187c43588289d2ce91d4aad67e933847460d5294
4
+ data.tar.gz: fab4412e895fdd597a0cde34d6ac451526d65754
5
5
  SHA512:
6
- metadata.gz: d2d5af5f54ff5f52f4a53d362372d684763f128c015dbd28001b5d86279cb5073892fc25801885adb832173646b7084012b347b2f3558b0313831804c00008f6
7
- data.tar.gz: 33534e53f359cfa376f029e4f52ff9a50fd6ee9c588e9286f7d5ee8ad4ce4a2ad5dd25fd558ab0f4e02bb7d8a44616c0d40837be73b5feef2678bc47b249c275
6
+ metadata.gz: 773a77bbc2e6aa114db6c79b55d80a99d392cd7194d1a95dc0651e2657be3086f7a2830bb69a9d44ef5a9f73c8bf80330d4089d6000fbe31f31cf152e6fba580
7
+ data.tar.gz: 550244a1ea6dc472eaf91cd69c46a19fdbf42e1093eb099100dbdb9579ce7eef82bae7e887381b1af994497c7acffd8cfe70de86bfb544293ce827531560ddc1
@@ -97,10 +97,9 @@ module Solargraph
97
97
  @file_comments[filename][node.loc]
98
98
  end
99
99
 
100
- def self.get_keywords without_snippets: false
100
+ def self.get_keywords
101
101
  result = []
102
102
  keywords = KEYWORDS
103
- keywords -= Snippets.keywords if without_snippets
104
103
  keywords.each { |k|
105
104
  result.push Suggestion.new(k, kind: Suggestion::KEYWORD, detail: 'Keyword')
106
105
  }
@@ -193,7 +193,7 @@ module Solargraph
193
193
  parts = current_namespace.to_s.split('::')
194
194
  result += get_snippets_at(index) if with_snippets
195
195
  result += get_local_variables_and_methods_at(index)
196
- result += ApiMap.get_keywords(without_snippets: with_snippets)
196
+ result += ApiMap.get_keywords
197
197
  while parts.length > 0
198
198
  ns = parts.join('::')
199
199
  result += @api_map.namespaces_in(ns)
@@ -335,7 +335,7 @@ module Solargraph
335
335
  prefix = prefix[0..-2]
336
336
  end
337
337
  if matched
338
- result.push Suggestion.new(detail['prefix'], kind: Suggestion::KEYWORD, detail: name, insert: detail['body'].join("\r\n"))
338
+ result.push Suggestion.new(detail['prefix'], kind: Suggestion::SNIPPET, detail: name, insert: detail['body'].join("\r\n"))
339
339
  end
340
340
  }
341
341
  result
@@ -24,7 +24,7 @@ module Solargraph
24
24
  @@semaphore.synchronize {
25
25
  code_map = CodeMap.new(code: params['text'], filename: params['filename'], api_map: @@api_hash[workspace])
26
26
  offset = code_map.get_offset(params['line'].to_i, params['column'].to_i)
27
- sugg = code_map.suggest_at(offset, with_snippets: true, filtered: true)
27
+ sugg = code_map.suggest_at(offset, with_snippets: params['with_snippets'] == '1' ? true : false, filtered: true)
28
28
  }
29
29
  { "status" => "ok", "suggestions" => sugg }.to_json
30
30
  rescue Exception => e
@@ -1,3 +1,3 @@
1
1
  module Solargraph
2
- VERSION = '0.7.2'
2
+ VERSION = '0.7.3'
3
3
  end
@@ -194,7 +194,6 @@ module Solargraph
194
194
  label = "#{n}"
195
195
  args = get_method_args(m)
196
196
  label += " #{args.join(', ')}" unless args.empty?
197
- STDERR.puts "Adding #{label} from yard"
198
197
  meths.push Suggestion.new(label, insert: "#{n.gsub(/=/, ' = ')}", kind: Suggestion::METHOD, documentation: m.docstring, code_object: m, detail: "#{ns}", location: "#{m.file}:#{m.line}")
199
198
  end
200
199
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solargraph
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.2
4
+ version: 0.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fred Snyder
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-07 00:00:00.000000000 Z
11
+ date: 2017-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parser