File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -7,13 +7,13 @@ def initialize
7
7
@cw = VIM ::Window . current
8
8
@cb = VIM ::Buffer . current
9
9
10
- @text = VIM ::evaluate ( %Q(join(getline(1, '$'), "\\ n")) ) + "\n "
10
+ @text = VIM ::evaluate ( %Q(join(getline(1, '$'), "\\ n")) ) + "\n "
11
11
@filename = VIM ::evaluate ( "expand('%:p')" )
12
12
@line = @cw . cursor [ 0 ] - 1
13
13
@column = @cw . cursor [ 1 ]
14
14
@workspace = VIM ::evaluate ( 'getcwd()' )
15
15
16
- #puts @text.size
16
+ #puts @text.size
17
17
#puts @text
18
18
#puts @filename
19
19
#puts @line
@@ -23,20 +23,20 @@ def initialize
23
23
24
24
25
25
def suggest
26
- #RestClient.post "http://localhost:7657/prepare"
27
- data = RestClient . post "http://localhost:7657/suggest" ,
28
- {
29
- "text" : @text ,
26
+ #RestClient.post "http://localhost:7657/prepare"
27
+ data = RestClient . post "http://localhost:7657/suggest" ,
28
+ {
29
+ "text" : @text ,
30
30
"filename" : @filename ,
31
31
"line" : @line ,
32
32
"column" : @column ,
33
33
"workspace" : @workspace ,
34
- "with_snippets" : nil
35
- }
34
+ "with_snippets" : nil
35
+ }
36
36
37
- response = JSON . parse ( data . body ) . to_hash
37
+ response = JSON . parse ( data . body ) . to_hash
38
38
39
- #puts response["suggestions"].collect { |x| x["insert"]}
39
+ #puts response["suggestions"].collect { |x| x["insert"]}
40
40
return response [ "suggestions" ] . collect { |x | x [ "insert" ] }
41
41
end
42
42
You can’t perform that action at this time.
0 commit comments