Skip to content

Commit 58e9c4e

Browse files
committed
fix(VimLParser): add missing balt command closes #55
1 parent 2ee7c0d commit 58e9c4e

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vim-language-server",
3-
"version": "2.2.1",
3+
"version": "2.2.2",
44
"description": "vim language server",
55
"keywords": [
66
"viml",

src/common/util.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,19 @@ import path from "path";
66
import {Readable} from "stream";
77
import {CompletionItem, InsertTextFormat, Position, Range, TextDocument} from "vscode-languageserver";
88
import {INode, StringReader, VimLParser} from "../lib/vimparser";
9-
import {commentPattern, keywordPattern, kindPattern, wordNextPattern, wordPrePattern} from "./patterns";
9+
import { commentPattern, keywordPattern, kindPattern, wordNextPattern, wordPrePattern } from "./patterns";
1010
import config from '../server/config';
1111

12+
// FIXME vimlparser missing update builtin_commands
13+
if (VimLParser.prototype) {
14+
(VimLParser.prototype as any).builtin_commands?.push({
15+
name: 'balt',
16+
minlen: 4,
17+
flags: 'NEEDARG|FILE1|EDITCMD|TRLBAR|CMDWIN',
18+
parser: 'parse_cmd_common'
19+
})
20+
}
21+
1222
export function isSomeMatchPattern(patterns: kindPattern, line: string): boolean {
1323
return patterns.some((p) => p.test(line));
1424
}

0 commit comments

Comments
 (0)