Skip to content

Commit

Permalink
style: prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
Reinaldy Rafli committed Aug 23, 2021
1 parent 320cf3e commit c426bfd
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/languages/c.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@ export const C: LanguagePattern[] = [
type: 'not',
},
// Avoiding Lua confusion
{ pattern: /local\s(function|\w+)?/, type: 'not'},
{ pattern: /local\s(function|\w+)?/, type: 'not' },
];
2 changes: 1 addition & 1 deletion src/languages/javascript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ export const Javascript: LanguagePattern[] = [
{ pattern: /(func|fn)\s/, type: 'not' },
{ pattern: /(begin|end)\n/, type: 'not' },
// Avoiding Lua confusion
{ pattern: /local\s(function|(\w+)\s=)/, type: 'not'},
{ pattern: /local\s(function|(\w+)\s=)/, type: 'not' },
];
2 changes: 1 addition & 1 deletion src/languages/julia.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ export const Julia: LanguagePattern[] = [
{ pattern: /puts\s+("|').+("|')/, type: 'not' },
{ pattern: /class\s/, type: 'not' },
// Avoiding Lua confusion
{ pattern: /local\s(function|\w+)/, type: 'not'},
{ pattern: /local\s(function|\w+)/, type: 'not' },
];
2 changes: 1 addition & 1 deletion src/languages/lua.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const Lua: LanguagePattern[] = [
/\s+(and|break|do|else|elseif|end|false|function|if|in|not|or|local|repeat|return|then|true|until|pairs|ipairs|in|yield)/,
type: 'keyword.other',
},
{ pattern: /nil/, type: 'constant.null'},
{ pattern: /nil/, type: 'constant.null' },
// length operator
{ pattern: /#([a-zA-Z_{}]+)/, type: 'keyword.operator' },
// metatables
Expand Down
2 changes: 1 addition & 1 deletion src/languages/php.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ export const PHP: LanguagePattern[] = [
// Javascript variable declaration
{ pattern: /(var|const|let)\s+\w+\s*=?/, type: 'not' },
// Avoiding Lua confusion
{ pattern: /local\s(function|\w+)/, type: 'not'},
{ pattern: /local\s(function|\w+)/, type: 'not' },
];
2 changes: 1 addition & 1 deletion src/languages/python.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ export const Python: LanguagePattern[] = [
{ pattern: /(&{2}|\|{2})/, type: 'not' },
// avoiding lua
{ pattern: /elseif/, type: 'not' },
{ pattern: /local\s(function|\w+)?\s=\s/, type: 'not'},
{ pattern: /local\s(function|\w+)?\s=\s/, type: 'not' },
];
2 changes: 1 addition & 1 deletion src/languages/sql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ export const SQL: LanguagePattern[] = [
{ pattern: /(TINYBLOB|TINYTEXT|MEDIUMTEXT|MEDIUMBLOB|LONGTEXT|LONGBLOB)/, type: 'constant.type' },
{ pattern: /(BOOLEAN|BOOL|DATE|YEAR)/, type: 'constant.type' },
// Avoiding Lua
{ pattern: /local\s(function|\w+)?\s=\s/, type: 'not'},
{ pattern: /local\s(function|\w+)?\s=\s/, type: 'not' },
{ pattern: /(require|dofile)\((.*)\)/, type: 'not' },
];
3 changes: 2 additions & 1 deletion tests/lua.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,8 @@ test('lsp handler', () => {
local matches = util.text_document_completion_list_to_complete_items(result, prefix)
vim.fn.complete(textMatch+1, matches)
end
`);
`,
);
assert.equal(code, 'Lua');
});

Expand Down

0 comments on commit c426bfd

Please sign in to comment.