Skip to content

Commit

Permalink
Merge branch 'vlang:main' into fix_module_index
Browse files Browse the repository at this point in the history
  • Loading branch information
get200 authored Nov 11, 2024
2 parents 088df28 + 6d9c64e commit c9c2561
Show file tree
Hide file tree
Showing 13 changed files with 210,802 additions and 210,433 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ The source code for extension is contained in the [`editors/code`](https://githu
For Neovim users, v-analyzer is available via [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#v_analyzer) plugin.
It is part of the [mason registry](https://mason-registry.dev/registry/list#v-analyzer) and could be installed with both Neovim plugins:
- [mason.nvim](https://github.com/williamboman/mason.nvim) with `:MasonInstall v_analyzer` command
- [mason.nvim](https://github.com/williamboman/mason.nvim) with `:MasonInstall v-analyzer` command
- [mason-lspconfig.nvim](https://github.com/williamboman/mason-lspconfig.nvim) with `:LspInstall` command
## Authors
Expand Down
5 changes: 4 additions & 1 deletion tree_sitter_v/grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -561,9 +561,12 @@ module.exports = grammar({
short_element_list: ($) =>
repeat1(seq(alias($._expression, $.element), optional(list_separator))),

field_name: ($) =>
$.reference_expression,

keyed_element: ($) =>
seq(
field('key', alias($.reference_expression, $.field_name)),
field('key', $.field_name),
':',
field('value', $._expression),
),
Expand Down
106 changes: 48 additions & 58 deletions tree_sitter_v/package.json
Original file line number Diff line number Diff line change
@@ -1,59 +1,49 @@
{
"name": "tree-sitter-v",
"version": "0.0.4-beta.1",
"main": "bindings/node",
"types": "bindings/node",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/vlang/v-analyzer.git"
},
"scripts": {
"test": "tree-sitter test",
"generate": "tree-sitter generate --no-bindings && v run bindings/generate_types.vsh",
"parse": "tree-sitter parse",
"parseg": "tree-sitter parse --debug-graph",
"install": "node-gyp-build",
"prebuildify": "prebuildify --napi --strip",
"lint": "eslint \"**/*.js\"",
"format": "prettier --write \"**/*.js\"",
"format:check": "prettier --check \"**/*.js\""
},
"dependencies": {
"node-addon-api": "^8.0.0",
"node-gyp-build": "^4.8.0"
},
"peerDependencies": {
"tree-sitter": "^0.21.1"
},
"peerDependenciesMeta": {
"tree_sitter": {
"optional": true
}
},
"devDependencies": {
"eslint": "^8.57.0",
"eslint-config-google": "^0.14.0",
"eslint-config-prettier": "^9.1.0",
"prebuildify": "^6.0.0",
"prettier": "^3.2.5",
"tree-sitter-cli": "^0.22.2"
},
"tree-sitter": [
{
"scope": "source.v",
"file-types": [
"v",
"vsh",
"v.mod"
]
}
],
"files": [
"grammar.js",
"prebuilds/**",
"bindings/node/*",
"queries/*",
"src/**"
]
}
"name": "tree-sitter-v",
"version": "0.0.4-beta.1",
"main": "bindings/node",
"types": "bindings/node",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/vlang/v-analyzer.git"
},
"scripts": {
"test": "tree-sitter test",
"generate": "tree-sitter generate --no-bindings && v run bindings/generate_types.vsh",
"parse": "tree-sitter parse",
"parseg": "tree-sitter parse --debug-graph",
"install": "node-gyp-build",
"prebuildify": "prebuildify --napi --strip",
"lint": "eslint \"**/*.js\"",
"format": "prettier --write \"**/*.js\"",
"format:check": "prettier --check \"**/*.js\""
},
"dependencies": {
"node-addon-api": "^8.0.0",
"node-gyp-build": "^4.8.0"
},
"peerDependencies": {
"tree-sitter": "^0.21.1"
},
"peerDependenciesMeta": {
"tree_sitter": {
"optional": true
}
},
"devDependencies": {
"eslint": "^8.57.0",
"eslint-config-google": "^0.14.0",
"eslint-config-prettier": "^9.1.0",
"prebuildify": "^6.0.0",
"prettier": "^3.2.5",
"tree-sitter-cli": "^0.22.2"
},
"files": [
"grammar.js",
"prebuilds/**",
"bindings/node/*",
"queries/*",
"src/**"
]
}
14 changes: 7 additions & 7 deletions tree_sitter_v/src/grammar.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion tree_sitter_v/src/node-types.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c9c2561

Please sign in to comment.