Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scala support #16

Merged
merged 4 commits into from
Dec 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# For generating .wasm files for parsers
# See https://www.npmjs.com/package/web-tree-sitter
languages = agda c clojure cpp c-sharp bash go html java javascript json markdown python ruby rust tsx typescript yaml
languages = agda c clojure cpp c-sharp bash go html java javascript json markdown python ruby rust scala tsx typescript yaml

.PHONY: parsers
parsers: $(addprefix parsers/tree-sitter-,$(addsuffix .wasm,$(languages)))
Expand All @@ -23,4 +23,4 @@ parsers/tree-sitter-tsx.wasm: node_modules/tree-sitter-typescript/tsx/package.js
parsers/tree-sitter-c-sharp.wasm: node_modules/tree-sitter-c-sharp/package.json
mkdir -p $(dir $@)
npx tree-sitter build-wasm $(dir $^)
mv tree-sitter-c_sharp.wasm $@
mv tree-sitter-c_sharp.wasm $@
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ When working with WSL, the host vscode instance connects to a vscode server on t

- Install the `pokey.command-server` extension on the host vscode
- Clone the extension in the WSL side.
- If you're adding language support to `vscode-parse-tree`, you need to clone that as well, build it, and link it into the `vscode-server` extension folder: `ln -s ~/.vscode-server/extensions/vscode-parse-tree ~/git/vscode-pars-tree` for instance.
- If you're adding language support to `vscode-parse-tree`, you need to clone that as well, build it, and link it into the `vscode-server` extension folder: `ln -s ~/your/code/vscode-parse-tree ~/.vscode-server/extensions/parse-tree` for instance.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get this wrong literally every time I use ln -s, glad to see I'm not the only one

Copy link
Member

@pokey pokey Dec 17, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fwiw the way I remember it is that it's the same order as mv or cp: source to destination

- If you get errors about needing to install the `Remote-WSL` extension, you might need to manually delete the extension from the host side and try again.

## Change Log
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"onLanguage:python",
"onLanguage:ruby",
"onLanguage:rust",
"onLanguage:scala",
"onLanguage:shellscript",
"onLanguage:typescript",
"onLanguage:typescriptreact",
Expand Down Expand Up @@ -81,6 +82,7 @@
"tree-sitter-python": "^0.19.0",
"tree-sitter-ruby": "^0.19.0",
"tree-sitter-rust": "^0.19.0",
"tree-sitter-scala": "github:tree-sitter/tree-sitter-scala#master",
"tree-sitter-typescript": "github:tree-sitter/tree-sitter-typescript#master",
"tree-sitter-yaml": "^0.5.0",
"tslint": "^6.0.0",
Expand All @@ -93,4 +95,4 @@
"tar": ">=4.4.2",
"web-tree-sitter": "^0.19.4"
}
}
}
1 change: 1 addition & 0 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const languages: {
python: { module: "tree-sitter-python" },
ruby: { module: "tree-sitter-ruby" },
rust: { module: "tree-sitter-rust" },
scala: { module: "tree-sitter-scala" },
shellscript: { module: "tree-sitter-bash" },
typescript: { module: "tree-sitter-typescript" },
typescriptreact: { module: "tree-sitter-tsx" },
Expand Down
6 changes: 6 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2160,6 +2160,12 @@ tree-sitter-rust@^0.19.0:
dependencies:
nan "^2.14.0"

"tree-sitter-scala@github:tree-sitter/tree-sitter-scala#master":
version "0.19.0"
resolved "https://codeload.github.com/tree-sitter/tree-sitter-scala/tar.gz/0a3dd53a7fc4b352a538397d054380aaa28be54c"
dependencies:
nan "^2.14.1"

"tree-sitter-typescript@github:tree-sitter/tree-sitter-typescript#master":
version "0.20.0"
resolved "https://codeload.github.com/tree-sitter/tree-sitter-typescript/tar.gz/111b07762e86efab9a918b7c721f720c37e76b0a"
Expand Down