File tree 5 files changed +9
-4
lines changed
5 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " vim-language-server" ,
3
- "version" : " 1.4.2 " ,
3
+ "version" : " 1.5.0 " ,
4
4
"description" : " vim language server" ,
5
5
"keywords" : [
6
6
" viml" ,
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ export const notFunctionPattern = [
38
38
/ ^ [ \t ] * \w + $ / ,
39
39
/ ^ [ \t ] * " / ,
40
40
/ ( l e t | s e t | c o l o r s c h e m e ) [ \t ] [ ^ \t ] * $ / ,
41
- / [ ^ ( [ , \\ \t \w # ] \w * $ / ,
41
+ / [ ^ ( [ , \\ \t \w # > ] \w * $ / ,
42
42
/ ^ [ \t ] * ( h i | h i g h l i g h t ) ( [ \t ] + l i n k ) ? ( [ \t ] + [ ^ \t ] + ) * [ \t ] * $ / ,
43
43
autocmdPattern ,
44
44
] ;
Original file line number Diff line number Diff line change @@ -164,7 +164,7 @@ export function getWordFromPosition(
164
164
// parse vim buffer
165
165
export async function handleParse ( textDoc : TextDocument | string ) : Promise < [ INode | null , string ] > {
166
166
const text = textDoc instanceof Object ? textDoc . getText ( ) : textDoc ;
167
- const tokens = new StringReader ( text ) ;
167
+ const tokens = new StringReader ( text . split ( / \r \n | \r | \n / ) ) ;
168
168
try {
169
169
const node : INode = new VimLParser ( true ) . parse ( tokens ) ;
170
170
return [ node , "" ] ;
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ export declare interface INode {
34
34
export declare class StringReader {
35
35
public buf : string [ ] ;
36
36
public pos : Array < [ number , number , number ] > ;
37
- constructor ( str : string )
37
+ constructor ( lines : string [ ] )
38
38
}
39
39
40
40
// tslint:disable-next-line
Original file line number Diff line number Diff line change @@ -87,6 +87,9 @@ const NODE_CURLYNAMEPART = 90; // TODO
87
87
const NODE_CURLYNAMEEXPR = 91 ; // TODO
88
88
const NODE_LAMBDA = 92 ;
89
89
const NODE_CONST = 94 ;
90
+ const NODE_EVAL = 95 ;
91
+ const NODE_HEREDOC = 96 ;
92
+ const NODE_METHOD = 97 ;
90
93
91
94
/*
92
95
* buffer's completion items
@@ -411,6 +414,7 @@ export class Buffer {
411
414
case NODE_RETURN :
412
415
case NODE_DELFUNCTION :
413
416
case NODE_THROW :
417
+ case NODE_EVAL :
414
418
nodeList = nodeList . concat ( node . left ) ;
415
419
break ;
416
420
case NODE_DOT :
@@ -483,6 +487,7 @@ export class Buffer {
483
487
case NODE_ADD :
484
488
case NODE_SUBTRACT :
485
489
case NODE_SUBSCRIPT :
490
+ case NODE_METHOD :
486
491
nodeList = nodeList . concat ( node . left || [ ] ) ;
487
492
nodeList = nodeList . concat ( node . right || [ ] ) ;
488
493
break ;
You can’t perform that action at this time.
0 commit comments