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 +4 -4
- data/lib/solargraph/api_map.rb +1 -2
- data/lib/solargraph/code_map.rb +2 -2
- data/lib/solargraph/server.rb +1 -1
- data/lib/solargraph/version.rb +1 -1
- data/lib/solargraph/yard_map.rb +0 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 187c43588289d2ce91d4aad67e933847460d5294
|
4
|
+
data.tar.gz: fab4412e895fdd597a0cde34d6ac451526d65754
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 773a77bbc2e6aa114db6c79b55d80a99d392cd7194d1a95dc0651e2657be3086f7a2830bb69a9d44ef5a9f73c8bf80330d4089d6000fbe31f31cf152e6fba580
|
7
|
+
data.tar.gz: 550244a1ea6dc472eaf91cd69c46a19fdbf42e1093eb099100dbdb9579ce7eef82bae7e887381b1af994497c7acffd8cfe70de86bfb544293ce827531560ddc1
|
data/lib/solargraph/api_map.rb
CHANGED
@@ -97,10 +97,9 @@ module Solargraph
|
|
97
97
|
@file_comments[filename][node.loc]
|
98
98
|
end
|
99
99
|
|
100
|
-
def self.get_keywords
|
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
|
}
|
data/lib/solargraph/code_map.rb
CHANGED
@@ -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
|
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::
|
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
|
data/lib/solargraph/server.rb
CHANGED
@@ -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
|
data/lib/solargraph/version.rb
CHANGED
data/lib/solargraph/yard_map.rb
CHANGED
@@ -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.
|
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-
|
11
|
+
date: 2017-05-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parser
|