Commit graph

102 commits

Author SHA1 Message Date
Roberto Aloi
553c90d631 Bump OSS VS Code extension to 0.47.0
Summary:
Due to some [most likely transient infra issues](2013794095), the latest release was only partially published.

Bump the extension to trigger a new release.

Reviewed By: alanz

Differential Revision: D89024759

fbshipit-source-id: fce412fee451eb72246c121706108af3ac34d414
2025-12-12 03:02:33 -08:00
Roberto Aloi
29c017c565 Polish extension README, improve package.json for discoverability
Some checks are pending
ELP CI / edb (push) Waiting to run
ELP CI / ci (26, 26.2.5.13, linux, 26.2, ubuntu-22.04, ubuntu-22.04-x64, x86_64-unknown-linux-gnu, true, linux-x64) (push) Blocked by required conditions
ELP CI / ci (26, 26.2.5.13, linux, 26.2, ubuntu-22.04-arm, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, true, linux-arm64) (push) Blocked by required conditions
ELP CI / ci (26, 26.2.5.13, macos, 26.2, macos-15-intel, macos-15-x64, x86_64-apple-darwin, true, darwin-x64) (push) Blocked by required conditions
ELP CI / ci (26, 26.2.5.13, macos, 26.2, macos-latest, macos-latest-arm, aarch64-apple-darwin, true, darwin-arm64) (push) Blocked by required conditions
ELP CI / ci (26, 26.2.5.13, windows, 26.2, windows-2022, windows-2022-x64, x86_64-pc-windows-msvc, true, win32-x64) (push) Blocked by required conditions
ELP CI / ci (27, 27.3.4, linux, 27.3, ubuntu-22.04, ubuntu-22.04-x64, x86_64-unknown-linux-gnu, false, linux-x64) (push) Blocked by required conditions
ELP CI / ci (27, 27.3.4, linux, 27.3, ubuntu-22.04-arm, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, false, linux-arm64) (push) Blocked by required conditions
ELP CI / ci (27, 27.3.4, macos, 27.3, macos-15-intel, macos-15-x64, x86_64-apple-darwin, false, darwin-x64) (push) Blocked by required conditions
ELP CI / ci (27, 27.3.4, macos, 27.3, macos-latest, macos-latest-arm, aarch64-apple-darwin, false, darwin-arm64) (push) Blocked by required conditions
ELP CI / ci (27, 27.3.4, windows, 27.3, windows-2022, windows-2022-x64, x86_64-pc-windows-msvc, false, win32-x64) (push) Blocked by required conditions
ELP CI / ci (28, 28.0.1, linux, 28, ubuntu-22.04, ubuntu-22.04-x64, x86_64-unknown-linux-gnu, false, linux-x64) (push) Blocked by required conditions
ELP CI / ci (28, 28.0.1, linux, 28, ubuntu-22.04-arm, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, false, linux-arm64) (push) Blocked by required conditions
ELP CI / ci (28, 28.0.1, macos, 28, macos-15-intel, macos-15-x64, x86_64-apple-darwin, false, darwin-x64) (push) Blocked by required conditions
ELP CI / ci (28, 28.0.1, macos, 28, macos-latest, macos-latest-arm, aarch64-apple-darwin, false, darwin-arm64) (push) Blocked by required conditions
ELP CI / ci (28, 28.0.1, windows, 28, windows-2022, windows-2022-x64, x86_64-pc-windows-msvc, false, win32-x64) (push) Blocked by required conditions
Deploy Website to GitHub Pages / Deploy Website to GitHub Pages (push) Waiting to run
Summary:
* Polish extension README (which is rendered [here](https://marketplace.visualstudio.com/items?itemName=erlang-language-platform.erlang-language-platform)).
* Set `displayName` (see [reference](https://code.visualstudio.com/api/references/extension-manifest)) to improve discoverability and hopefully ranking
* Update description
* Add `erlang` keyword to improve discoverability/ranking

Reviewed By: alanz

Differential Revision: D88847040

fbshipit-source-id: e2185e790f0711dd383d6cc51ad56716eeebb61e
2025-12-10 07:06:30 -08:00
Roberto Aloi
a4ded31602 Bump OSS VS Code extension to 0.46.0
Summary:
Several issues were affecting GitHub CI, preventing the extension to be correctly published to the marketplace.
A new release will therefore be necessary, hence the new bump.

Reviewed By: alanz

Differential Revision: D88848737

fbshipit-source-id: f4c31f1bbc5bb3aeec7359c8c8a5d1faeb0c2f9e
2025-12-10 07:00:19 -08:00
Roberto Aloi
4df5a7ae81 Bump OSS VS Code extension version to 0.45.0
Summary: In preparation for OSS release.

Reviewed By: alanz

Differential Revision: D88839310

fbshipit-source-id: f489b3e503c41e8302193cbdc78a46859967cbda
2025-12-10 03:45:29 -08:00
Roberto Aloi
5470044b61 Bump js-yaml from 4.1.0 to 4.1.1 and glob from 10.4.5 to 10.5.0
Summary: Fix https://github.com/nodeca/js-yaml/security/advisories/GHSA-mh29-5h37-fv8m and https://github.com/isaacs/node-glob/security/advisories/GHSA-5j98-mcp5-4vw2

Reviewed By: jcpetruzza

Differential Revision: D87634207

fbshipit-source-id: 50ef19e9b138252d43a631b2c9501ca9a764b74a
2025-11-21 05:49:13 -08:00
Roberto Aloi
1788ac77bd Move Emacs configuration under editors
Summary:
We already have a `editors` directory with editor-specific packages and configurations. Move the Emacs sample there.

Also reference it from the Emacs installation docs, to make it simpler to find.

Reviewed By: alanz

Differential Revision: D87517087

fbshipit-source-id: 754324de280ec094d6756d8702738d16fbdf268b
2025-11-21 02:03:27 -08:00
Roberto Aloi
557402920a Bump OSS VS Code extension to 0.44.0
Some checks are pending
ELP CI / edb (push) Waiting to run
ELP CI / ci (26, 26.2.5.13, linux, 26.2, ubuntu-22.04, ubuntu-22.04-x64, x86_64-unknown-linux-gnu, true, linux-x64) (push) Blocked by required conditions
ELP CI / ci (26, 26.2.5.13, linux, 26.2, ubuntu-22.04-arm, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, true, linux-arm64) (push) Blocked by required conditions
ELP CI / ci (26, 26.2.5.13, macos, 26.2, macos-13, macos-13-x64, x86_64-apple-darwin, true, darwin-x64) (push) Blocked by required conditions
ELP CI / ci (26, 26.2.5.13, macos, 26.2, macos-latest, macos-latest-arm, aarch64-apple-darwin, true, darwin-arm64) (push) Blocked by required conditions
ELP CI / ci (26, 26.2.5.13, windows, 26.2, windows-2022, windows-2022-x64, x86_64-pc-windows-msvc, true, win32-x64) (push) Blocked by required conditions
ELP CI / ci (27, 27.3.4, linux, 27.3, ubuntu-22.04, ubuntu-22.04-x64, x86_64-unknown-linux-gnu, false, linux-x64) (push) Blocked by required conditions
ELP CI / ci (27, 27.3.4, linux, 27.3, ubuntu-22.04-arm, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, false, linux-arm64) (push) Blocked by required conditions
ELP CI / ci (27, 27.3.4, windows, 27.3, windows-2022, windows-2022-x64, x86_64-pc-windows-msvc, false, win32-x64) (push) Blocked by required conditions
ELP CI / ci (28, 28.0.1, linux, 28, ubuntu-22.04, ubuntu-22.04-x64, x86_64-unknown-linux-gnu, false, linux-x64) (push) Blocked by required conditions
ELP CI / ci (28, 28.0.1, macos, 28, macos-13, macos-13-x64, x86_64-apple-darwin, false, darwin-x64) (push) Blocked by required conditions
ELP CI / ci (27, 27.3.4, macos, 27.3, macos-13, macos-13-x64, x86_64-apple-darwin, false, darwin-x64) (push) Blocked by required conditions
ELP CI / ci (27, 27.3.4, macos, 27.3, macos-latest, macos-latest-arm, aarch64-apple-darwin, false, darwin-arm64) (push) Blocked by required conditions
ELP CI / ci (28, 28.0.1, linux, 28, ubuntu-22.04-arm, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, false, linux-arm64) (push) Blocked by required conditions
ELP CI / ci (28, 28.0.1, macos, 28, macos-latest, macos-latest-arm, aarch64-apple-darwin, false, darwin-arm64) (push) Blocked by required conditions
ELP CI / ci (28, 28.0.1, windows, 28, windows-2022, windows-2022-x64, x86_64-pc-windows-msvc, false, win32-x64) (push) Blocked by required conditions
Deploy Website to GitHub Pages / Deploy Website to GitHub Pages (push) Waiting to run
Summary: In preparation for imminent OSS release.

Reviewed By: jcpetruzza

Differential Revision: D86121429

fbshipit-source-id: 5fee7c4c12c4504490f33c5e3331b97fc2e824db
2025-11-03 12:20:34 -08:00
Roberto Aloi
d6f2636f01 Bump OSS VS Code extension version to 0.43.0
Some checks are pending
ELP CI / ci (28, 28.0.1, windows, 28, windows-2022, windows-2022-x64, x86_64-pc-windows-msvc, false, win32-x64) (push) Blocked by required conditions
ELP CI / edb (push) Waiting to run
ELP CI / ci (26, 26.2.5.13, linux, 26.2, ubuntu-22.04, ubuntu-22.04-x64, x86_64-unknown-linux-gnu, true, linux-x64) (push) Blocked by required conditions
ELP CI / ci (26, 26.2.5.13, linux, 26.2, ubuntu-22.04-arm, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, true, linux-arm64) (push) Blocked by required conditions
ELP CI / ci (26, 26.2.5.13, macos, 26.2, macos-13, macos-13-x64, x86_64-apple-darwin, true, darwin-x64) (push) Blocked by required conditions
ELP CI / ci (26, 26.2.5.13, macos, 26.2, macos-latest, macos-latest-arm, aarch64-apple-darwin, true, darwin-arm64) (push) Blocked by required conditions
ELP CI / ci (26, 26.2.5.13, windows, 26.2, windows-2022, windows-2022-x64, x86_64-pc-windows-msvc, true, win32-x64) (push) Blocked by required conditions
ELP CI / ci (27, 27.3.4, linux, 27.3, ubuntu-22.04, ubuntu-22.04-x64, x86_64-unknown-linux-gnu, false, linux-x64) (push) Blocked by required conditions
ELP CI / ci (27, 27.3.4, linux, 27.3, ubuntu-22.04-arm, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, false, linux-arm64) (push) Blocked by required conditions
ELP CI / ci (27, 27.3.4, macos, 27.3, macos-13, macos-13-x64, x86_64-apple-darwin, false, darwin-x64) (push) Blocked by required conditions
ELP CI / ci (27, 27.3.4, macos, 27.3, macos-latest, macos-latest-arm, aarch64-apple-darwin, false, darwin-arm64) (push) Blocked by required conditions
ELP CI / ci (27, 27.3.4, windows, 27.3, windows-2022, windows-2022-x64, x86_64-pc-windows-msvc, false, win32-x64) (push) Blocked by required conditions
ELP CI / ci (28, 28.0.1, linux, 28, ubuntu-22.04, ubuntu-22.04-x64, x86_64-unknown-linux-gnu, false, linux-x64) (push) Blocked by required conditions
ELP CI / ci (28, 28.0.1, linux, 28, ubuntu-22.04-arm, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, false, linux-arm64) (push) Blocked by required conditions
ELP CI / ci (28, 28.0.1, macos, 28, macos-13, macos-13-x64, x86_64-apple-darwin, false, darwin-x64) (push) Blocked by required conditions
ELP CI / ci (28, 28.0.1, macos, 28, macos-latest, macos-latest-arm, aarch64-apple-darwin, false, darwin-arm64) (push) Blocked by required conditions
Deploy Website to GitHub Pages / Deploy Website to GitHub Pages (push) Waiting to run
Summary: In preparation for OSS release.

Reviewed By: jcpetruzza

Differential Revision: D85158896

fbshipit-source-id: 71464b4a04b29955c97680b5d51445481f6a7387
2025-10-21 10:36:56 -07:00
Roberto Aloi
747af175c2 Bump OSS VS Code extension for release (0.41.0 -> 0.42.0)
Summary: As per release instructions.

Reviewed By: alanz

Differential Revision: D84351530

fbshipit-source-id: 73fa5ce1922dd5e3baa930823fe75cc05c3711ad
2025-10-10 07:14:35 -07:00
Roberto Aloi
2edd91934f Bump OSS VS Code extension for imminent release
Summary: Bump the extension to `0.41.0`.

Reviewed By: mapoulin

Differential Revision: D82220520

fbshipit-source-id: b33f40d92919bdedfeee5fb4c65875d0c6159623
2025-09-11 08:15:04 -07:00
Roberto Aloi
ff9c0b89c8 Add support for interactive debugging for rebar3 projects
Summary:
This diff brings feature parity when it comes to code lenses between `rebar3` and `buck2` projects. Specifically:

* Adds the `openInteractive` command to the OSS extension, which starts a rebar3 shell
* Adds the `debugInteractive` command to the OSS extension, which starts a rebar3 shell in debug mode (no tests are run)
* Adds the `runInteractive` command to the OSS extension, which runs the test in an open shell (either a debugging one or not)
* It enables the "debug" and "interactive" lenses by default
* It adds some extra logging

Reviewed By: alanz

Differential Revision: D82101533

fbshipit-source-id: cb051a1b6a968bc603d81d7045bfd9e34ddb5b73
2025-09-11 06:06:54 -07:00
Roberto Aloi
9210506a30 Bump VS Code extension for imminent release
Summary: As per title.

Reviewed By: jcpetruzza

Differential Revision: D81431127

fbshipit-source-id: 504a9db3b1434ebd80f0c01004d941404bba8199
2025-09-01 01:36:32 -07:00
Roberto Aloi
b1c04cf3d1 Ensure rebar3 shell terminates after a test case is completed during debugging
Summary:
After debugging a test case via the debug lenses in a rebar3 shell, the shell would stay open.

This diff ensures the shell is terminated on test completion.

Reviewed By: jcpetruzza

Differential Revision: D81242618

fbshipit-source-id: 20f0c03665db73262b8de5b5e2f347c73d64b349
2025-08-28 11:37:42 -07:00
Roberto Aloi
9a68ab9025 Bump VS Code extension for imminent release
Summary: As per title.

Reviewed By: acw224

Differential Revision: D81026946

fbshipit-source-id: 95a5b2c04671cf8bad3f0df9c36424f16f8359b4
2025-08-26 04:53:03 -07:00
Roberto Aloi
833e2c45d9 Ensure default edb command works
Summary: The command should be a path, not a uri. Since this was misconfigured, the debug lens for rebar3 was failing when no custom command was specified.

Reviewed By: jcpetruzza

Differential Revision: D80962151

fbshipit-source-id: f29e697560d48b9eba4687dd1b391c505d32782e
2025-08-26 02:52:25 -07:00
Roberto Aloi
86aef83e6c Enable logging support in VS Code
Summary:
This [enables](https://code.visualstudio.com/api/language-extensions/language-server-extension-guide#logging-support-for-language-server) the user to trace the communication between VS Code and the ELP languages server.

Renaming the client into "erlang-elp" to make the option easier to find via the VS Code settings.

Reviewed By: TD5

Differential Revision: D80936548

fbshipit-source-id: c5960f4115d900f5ea92dec291de772d8932e4ed
2025-08-26 02:52:25 -07:00
Alan Zimmerman
9fd2bc40aa Bump extension version to 0.38
Summary: As title, preparing for release

Reviewed By: Balajiganapathi

Differential Revision: D78654847

fbshipit-source-id: 0b1f3c93dc5bafc4bfd724a726e149a1411f0b9f
2025-07-21 03:23:34 -07:00
Roberto Aloi
2a6be21a05 Bump VS Code extension to 0.37.0
Summary: In preparation for release.

Reviewed By: michalmuskala

Differential Revision: D77928426

fbshipit-source-id: 81a47344451f813233d77b818ea2ccd60443c07b
2025-07-08 04:38:50 -07:00
Paul O'Shannessy
9de77c6b20 Update License Headers for Open Source
Summary: The license header we use for our Apache + MIT dual licensed projects can be made more explicit. This has not actual implications on licensing, but does clarify what it means for a project to be dual licensed.

Reviewed By: bigfootjon

Differential Revision: D77550482

fbshipit-source-id: 24267af9a7715bfc604b5840ce29776705428516
2025-07-01 12:42:03 -07:00
Alan Zimmerman
b9ea82e72f fix dependabot alert
Summary: As title

Reviewed By: michalmuskala

Differential Revision: D76805912

fbshipit-source-id: 2d416daad6d6f48f7c3da6a7ca2e371e98cf717f
2025-06-17 02:28:20 -07:00
Alan Zimmerman
8efddf6b93 fix dependabot alert
Reviewed By: michalmuskala

Differential Revision: D76805648

fbshipit-source-id: 057ce47fb41eb3a1f94f568ca352674caa448bfa
2025-06-17 02:25:32 -07:00
Roberto Aloi
d278bba698 Semantic highlighting for exported types
Summary: Similarly to what we already do for exported functions, highlight exported types with an underscore.

Reviewed By: TD5

Differential Revision: D76540890

fbshipit-source-id: 457b8f9da8848295f05fb2432b8640d957bdba6d
2025-06-13 15:21:42 -07:00
Bhasawut Singhaphan
4edb9b6e01 Fix the configurationAttributes of edb Attach to Erlang Node option (#98)
Summary:
The configuration attributes were misconfigured. When using `Attach to Erlang Node` launch.json
complains about missing properties of "node", "cwd", and property  "config" is not allowed.

So, update these attributes in package.json to fix the issues.

before:
<img width="375" alt="Screenshot 2568-05-30 at 00 37 11" src="https://github.com/user-attachments/assets/e1c794f8-3704-4c6c-b4c8-85888a8d1678" />

<img width="310" alt="Screenshot 2568-05-30 at 00 37 01" src="https://github.com/user-attachments/assets/40ec2068-5b7e-4200-8181-aed9ff63011b" />

after:
<img width="333" alt="Screenshot 2568-05-30 at 01 05 09" src="https://github.com/user-attachments/assets/46ee20a4-cd06-4e99-9985-c3e802741864" />

Pull Request resolved: https://github.com/WhatsApp/erlang-language-platform/pull/98

Reviewed By: robertoaloi

Differential Revision: D75783374

Pulled By: jcpetruzza

fbshipit-source-id: acdd632ec171a3a4cc464bf7577622f8d60683c9
2025-06-03 02:10:25 -07:00
Daniel Gorin
94348d8406 Update debug code-lenses so they work with rebar3 and latest edb version (#96)
Summary:
* Launch configurations were no longer valid
* Fixed the code to launch rebar3, so that it injects the necessary code to register with the debugger
* Updated documentation
* In the process, made it easier to log from the extension

Pull Request resolved: https://github.com/WhatsApp/erlang-language-platform/pull/96

Reviewed By: alanz

Differential Revision: D75441461

Pulled By: robertoaloi

fbshipit-source-id: 29427ca620989c4280747ff8dd1a01176d9ab029
2025-05-28 07:45:36 -07:00
Roberto Aloi
833d235e84 Support for embedded Markdown comments
Summary:
Erlang/OTP 27 introduces Markdown comments. While this makes it in theory simpler to author in-code documentation, the VS Code extension does not yet recognize comments as Markdown.

This change makes VS Code recognize doc blocks as Markdown, using the concept of an [embedded language](https://code.visualstudio.com/api/language-extensions/syntax-highlight-guide#embedded-languages).

This provides features such as:

* Syntax highlighting for italic, bold, code blocks, etc
* Matching parentheses
* Ability to embed Erlang code blocks with syntax highlighting
* Etc

While this simply works(TM), it makes the doc block too evident and distracting:

{F1978476087}

To preserve the look-and-feel of the old edoc-style comment, we override the default colour for the embedded markdown block. This seems to work fine in both light and dark mode and can always be overridden by a user using the `settings.json` file:

```
"editor.tokenColorCustomizations": {
        "textMateRules": [
            {
                "scope": "meta.embedded.block.markdown",
                "settings": {
                    "foreground": "MY_FAVOURITE_COLOUR"
                }
            }
        ],
    }
```

The change is being upstreamed [here](https://github.com/erlang-ls/grammar/pull/18).

Reviewed By: alanz

Differential Revision: D75152988

fbshipit-source-id: 3922007c13678be99fb27c99e53f8597c7dcba8f
2025-05-28 00:15:25 -07:00
Roberto Aloi
039dd82b8b Stop computing EDoc diagnostics
Summary:
* Do not compute EDoc diagnostics by default
* Add a config option to enable them

Reviewed By: michalmuskala

Differential Revision: D74727423

fbshipit-source-id: f40213de4b4e1176bbfc7a85593af0cf1aaf0e1e
2025-05-15 03:53:02 -07:00
Alan Zimmerman
76481f74d1 Bump extension version to 0.36 marketplace release
Summary: As title

Reviewed By: robertoaloi

Differential Revision: D74801926

fbshipit-source-id: 2c4d4c451bec47a7d242926f28c6620a7446a203
2025-05-15 03:45:17 -07:00
Roberto Aloi
42be64e8c8 Update third-party Erlang grammar
Summary:
Update the grammar used to provide syntax highlighting in VS Code to include the latest contributions.

Major changes are:

* Doc/moduledoc attributes showed as comments and not regular strings
* Fixes for verbatim strings

Reviewed By: michalmuskala

Differential Revision: D74242608

fbshipit-source-id: dac26b72123719e607ca12b03de6f0041cd74e5f
2025-05-06 04:41:01 -07:00
Roberto Aloi
01f12130ad Add support for elp.restartServer command (#90)
Summary:
Adds the ability to restart the ELP server from the VS Code command palette.

Closes #90.

Reviewed By: alanz

Differential Revision: D72441620

fbshipit-source-id: 7346149f6756520c0fa9cc4fccb0488009eccae7
2025-04-04 01:33:28 -07:00
Roberto Aloi
1990ec1fd9 Bump OSS VS Code extension for release
Summary: Bump version from `0.34.0` to `0.35.0`.

Reviewed By: alanz

Differential Revision: D72305672

fbshipit-source-id: 823144a8641309d46bc5e4854518a5af020a3d28
2025-04-02 03:50:15 -07:00
Roberto Aloi
5cd4fee440 Bump OSS VS Code extension to 0.34.0
Summary: To release the OSS version of the VS Code extension.

Reviewed By: ilya-klyuchnikov

Differential Revision: D69578829

fbshipit-source-id: 01d0b50e2068323e30e8e943a4ebee0923b8d655
2025-02-13 00:55:01 -08:00
Roberto Aloi
20258d3d39 Add support for CodeActionResolve
Summary:
This adds a middleware for resolving code actions. The idea is to intercept `CodeAction` requests and, in case a user input is required, an input box is presented to the user to get additional input.

This is useful, for example, in case of a "extract function" or "extract variable" operation, where the user can specify the name of the new function/variable without having to perform a subsequent rename.

Built-in validation is added for atoms and variables

Fixes #76.

Reviewed By: alanz

Differential Revision: D69112486

fbshipit-source-id: 6384c0cce1ff03d350abdc1630ce75b16c3e9bf5
2025-02-05 03:49:46 -08:00
Roberto Aloi
67c3fe5ce8 Disable TSC auto-detection
Summary: We define wrapper `npm` tasks for the `tsc` tasks in the `package.json`, following the VS Code extension template. By disabling auto-discovery, we don't get duplicate tasks when starting a debugging session.

Reviewed By: jcpetruzza

Differential Revision: D68437997

fbshipit-source-id: 26b85bdd7ce407e4331677ed0bf442d1af2bfc2a
2025-01-22 05:00:53 -08:00
Roberto Aloi
5ee8019050 Add debug launch configuration
Summary:
This config allows to open a TS file from the extension and have a "Run extension" debug config already available.

It also adds the client JS files so that stopping at a breakpoint works.

Reviewed By: jcpetruzza

Differential Revision: D68437898

fbshipit-source-id: f5be84b536de524156193b69e348f06092f689a3
2025-01-22 05:00:53 -08:00
Roberto Aloi
5f60141980 Enable run lenses by default
Summary: Enable the code lenses mechanism and, specifically, the "run" ones, allowing users to trigger tests from the IDE for `rebar3` and `buck2` projects.

Reviewed By: alanz

Differential Revision: D68438514

fbshipit-source-id: b13d000717e899beb70246cf9b481e5f91c237bc
2025-01-21 05:04:22 -08:00
Roberto Aloi
2ee4a2cd55 Bump VS Code extension for OSS release
Summary: Bump to trigger a new build of the OSS VS Code extension for ELP.

Reviewed By: alanz

Differential Revision: D68437508

fbshipit-source-id: a2c688d5f00c5f8a30609275e837ce0b6a0c629b
2025-01-21 03:47:25 -08:00
Roberto Aloi
71978c9c8b Add support for elp.debugSingle command
Summary: * Add a `elp.debugSingle` command, which will eventually be used by the ELP "debug" code lens to start a debugging session for a given testcase.

Reviewed By: alanz

Differential Revision: D68159114

fbshipit-source-id: f0c2396f40518b1dd590eea49c6b300265899d7a
2025-01-16 00:48:46 -08:00
Roberto Aloi
9ca22ec50f Add support for elp.runSingle command
Summary:
* Add support for custom commands, which are registered during activation
* Register a `elp.runSingle` command, used by the ELP Common Test code lens
* Move the configuration to its own file, for easier reuse

Reviewed By: alanz

Differential Revision: D68155846

fbshipit-source-id: 180948f408dd7e9ce3406e2d96b71c420f51c3d2
2025-01-16 00:48:46 -08:00
Roberto Aloi
9e2cfe8aca Use explicit vscode namespace
Summary:
Just a simple refactoring, to make it clear which types and functions are local and which ones are coming from `vscode`.

No functional change.

Reviewed By: alanz

Differential Revision: D68155847

fbshipit-source-id: fbfe8f003b04c2afd82b66e4ff6473cbb11ba5a2
2025-01-16 00:48:46 -08:00
Roberto Aloi
639fa32867 Use rebar3 test profile by default
Summary:
The debugger is typically used to troubleshoot a test. Therefore, use the "test" profile by default, so that the test suite itself is already loaded.

The repetition is due to the command being present as:

* A default config that is dynamically added if no launch configuration is available (user clicks on "debug")
* Default values used to created to populate an initial config
* A snippet that the user can use via the "Create Config" UI in VS Code (via Intellisense)

Reviewed By: jcpetruzza

Differential Revision: D68094987

fbshipit-source-id: e31d348e854efc2b101ab466e0b10a47c1dd8ce2
2025-01-14 01:09:49 -08:00
Roberto Aloi
dae95bd2b0 Add configuration snippet for debugger
Summary: This entry in the config allows the user to auto-create a basic launch configuration using the VS Code "Add config" button.

Reviewed By: jcpetruzza

Differential Revision: D68019111

fbshipit-source-id: 05c55b4980c45e75f9a169772291414a559350ff
2025-01-13 03:32:07 -08:00
Roberto Aloi
e07a06ef6e Add missing dash to sname option
Summary: Fix a typo in the flag name.

Reviewed By: jcpetruzza

Differential Revision: D68019110

fbshipit-source-id: b0ff8b4be5212fdd9d3cd28c94edeebfdabd0a09
2025-01-13 03:32:07 -08:00
Roberto Aloi
943a078da1 Create dedicated output channel for logging purposes
Summary: Putting in place the basic logging infra, with a sample log message.

Reviewed By: jcpetruzza

Differential Revision: D68019109

fbshipit-source-id: c3784b99238e15704c2130965892a087e6e52b10
2025-01-13 03:32:07 -08:00
Roberto Aloi
acde460642 Advertise ability to set breakpoints
Summary: Without this option, it is not possible to set breakpoints on Erlang files.

Reviewed By: jcpetruzza

Differential Revision: D68016545

fbshipit-source-id: 5e0296dfc1b7a5fe46d4e8f56a83f6c7f395bb1b
2025-01-13 03:32:07 -08:00
Roberto Aloi
967cd0b87f Use rebar3 based launch config by default
Summary: Instead of using plain `erl`, use the more common `rebar3 shell`

Reviewed By: jcpetruzza

Differential Revision: D68016544

fbshipit-source-id: 5513498ef8df3e2acd1a702a88268950082c96d6
2025-01-13 03:32:07 -08:00
Roberto Aloi
e6755f6da5 Pass custom Erlang installation path as part of launch configuration
Summary: Reuse the custom Erlang installation path when launching the debuggee.

Reviewed By: jcpetruzza

Differential Revision: D68016543

fbshipit-source-id: 432e510d46c68b47c3b00db2535da2ca843f8481
2025-01-13 03:32:07 -08:00
Roberto Aloi
b69409172f Add ability to specify custom Erlang installation for DAP
Summary: Allow the user to specify a custom Erlang installation directory. This is useful when using a debugger that requires a specialized version of Erlang/OTP.

Reviewed By: jcpetruzza

Differential Revision: D68013698

fbshipit-source-id: 2dcc7d39e7d2c17dc9b38ceddcaa2efd6fd30855
2025-01-13 03:32:07 -08:00
Roberto Aloi
b6ca1377f0 Preliminary support for debugger
Summary: Basic debugger support for the ELP VS Code extension.

Reviewed By: jcpetruzza

Differential Revision: D67941710

fbshipit-source-id: ee87b30cf267a3bbdfe1fafc0b0c2e0f1050b641
2025-01-13 03:32:07 -08:00
Alan Zimmerman
dbcd5f0899 Fix dependabot alert
Summary: As title

Reviewed By: jcpetruzza

Differential Revision: D67097048

fbshipit-source-id: a55e7d696695a5bd8ca881745dbbef2def5f0099
2024-12-11 08:45:10 -08:00
Roberto Aloi
bf666c6579 Enable code coverage by default
Summary: Now that OTP 27 is rolled out to dev environments, let's enable code coverage by default when running tests via the code lenses.

Reviewed By: alanz

Differential Revision: D66957756

fbshipit-source-id: 12ad58c5844010ddd31367941eb22a056d9dd0fa
2024-12-10 05:07:05 -08:00