This repository uses lerna
combined with yarn workspaces to organize itself.
The overall extension is broken out into several packages within the packages
directory:
vscode-ruby
- extension providing syntax highlighting, language configuration, and snippets for Rubyvscode-ruby-client
- extension logic including the language server clientvscode-ruby-common
- common utilities that are shared among several other packages (eg environment detection)vscode-ruby-debugger
- implementation of the debuggerlanguage-server-ruby
- language server implementation
Each package utilizes esbuild
or tsc
to build the dist
directory.
Packages that use esbuild
are consumed directly by VS Code. VS Code does not run npm install
for packages and thus any code must make sure its dependencies are bundled alongside it.
Packages that just use tsc
are dependencies of other packages.
- Clone the repo
- run
yarn install
- run
yarn watch
yarn watch
will symlink the dist
directories from the required packages and start esbuild (via lerna
) in each package. You can look at the scripts/link-dist.sh
script to see what is happening there.
The root package.json
for the extension depends on the appropriate code being present in the root dist
directory. The yarn watch
script above will take care of that for you.
There are several debug profiles defined in launch.json
:
Launch Extension
- this will launch the VS Code extension in a new isntance of VS Code. This will temporarily overwrite any extensions by the same name that are installedAttach to Language Server
- this will attached to the running language server which will allow you to set breakpointsDebugger Server
- this will start a server that will allow you to debug the debugger package
Each package should have a yarn test
script defined. You can run all tests for the whole repository with the root yarn test
command.