File tree Expand file tree Collapse file tree 5 files changed +9
-4
lines changed Expand file tree Collapse file tree 5 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " vim-language-server" ,
3- "version" : " 1.4.2 " ,
3+ "version" : " 1.5.0 " ,
44 "description" : " vim language server" ,
55 "keywords" : [
66 " viml" ,
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ export const notFunctionPattern = [
3838 / ^ [ \t ] * \w + $ / ,
3939 / ^ [ \t ] * " / ,
4040 / ( 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 * $ / ,
4242 / ^ [ \t ] * ( h i | h i g h l i g h t ) ( [ \t ] + l i n k ) ? ( [ \t ] + [ ^ \t ] + ) * [ \t ] * $ / ,
4343 autocmdPattern ,
4444] ;
Original file line number Diff line number Diff line change @@ -164,7 +164,7 @@ export function getWordFromPosition(
164164// parse vim buffer
165165export async function handleParse ( textDoc : TextDocument | string ) : Promise < [ INode | null , string ] > {
166166 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 / ) ) ;
168168 try {
169169 const node : INode = new VimLParser ( true ) . parse ( tokens ) ;
170170 return [ node , "" ] ;
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ export declare interface INode {
3434export declare class StringReader {
3535 public buf : string [ ] ;
3636 public pos : Array < [ number , number , number ] > ;
37- constructor ( str : string )
37+ constructor ( lines : string [ ] )
3838}
3939
4040// tslint:disable-next-line
Original file line number Diff line number Diff line change @@ -87,6 +87,9 @@ const NODE_CURLYNAMEPART = 90; // TODO
8787const NODE_CURLYNAMEEXPR = 91 ; // TODO
8888const NODE_LAMBDA = 92 ;
8989const NODE_CONST = 94 ;
90+ const NODE_EVAL = 95 ;
91+ const NODE_HEREDOC = 96 ;
92+ const NODE_METHOD = 97 ;
9093
9194/*
9295 * buffer's completion items
@@ -411,6 +414,7 @@ export class Buffer {
411414 case NODE_RETURN :
412415 case NODE_DELFUNCTION :
413416 case NODE_THROW :
417+ case NODE_EVAL :
414418 nodeList = nodeList . concat ( node . left ) ;
415419 break ;
416420 case NODE_DOT :
@@ -483,6 +487,7 @@ export class Buffer {
483487 case NODE_ADD :
484488 case NODE_SUBTRACT :
485489 case NODE_SUBSCRIPT :
490+ case NODE_METHOD :
486491 nodeList = nodeList . concat ( node . left || [ ] ) ;
487492 nodeList = nodeList . concat ( node . right || [ ] ) ;
488493 break ;
You can’t perform that action at this time.
0 commit comments