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
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
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
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
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
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
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
Summary: Bump version from `0.34.0` to `0.35.0`.
Reviewed By: alanz
Differential Revision: D72305672
fbshipit-source-id: 823144a8641309d46bc5e4854518a5af020a3d28
Summary: To release the OSS version of the VS Code extension.
Reviewed By: ilya-klyuchnikov
Differential Revision: D69578829
fbshipit-source-id: 01d0b50e2068323e30e8e943a4ebee0923b8d655
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
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
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
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
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
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
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
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
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
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
Summary: Fix a typo in the flag name.
Reviewed By: jcpetruzza
Differential Revision: D68019110
fbshipit-source-id: b0ff8b4be5212fdd9d3cd28c94edeebfdabd0a09
Summary: Putting in place the basic logging infra, with a sample log message.
Reviewed By: jcpetruzza
Differential Revision: D68019109
fbshipit-source-id: c3784b99238e15704c2130965892a087e6e52b10
Summary: Without this option, it is not possible to set breakpoints on Erlang files.
Reviewed By: jcpetruzza
Differential Revision: D68016545
fbshipit-source-id: 5e0296dfc1b7a5fe46d4e8f56a83f6c7f395bb1b
Summary: Instead of using plain `erl`, use the more common `rebar3 shell`
Reviewed By: jcpetruzza
Differential Revision: D68016544
fbshipit-source-id: 5513498ef8df3e2acd1a702a88268950082c96d6
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
Summary: Basic debugger support for the ELP VS Code extension.
Reviewed By: jcpetruzza
Differential Revision: D67941710
fbshipit-source-id: ee87b30cf267a3bbdfe1fafc0b0c2e0f1050b641
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
Summary: This activation event can be removed as VS Code generates these automatically from the package.json contribution declarations.
Reviewed By: alanz
Differential Revision: D66286868
fbshipit-source-id: ded12d678844cb56979888860794280401754c8e
Summary:
Currently the ELP native diagnostics (in particular syntax errors) are updated as the file changes from typing.
This can be annoying, with large red squiggles while writing new code.
Provide a new setting, `ELP/Diagnostics/OnSave` to select only presenting them when the file is saved, as currently happens for eqwalizer and erlang service diagnostics
Reviewed By: jcpetruzza
Differential Revision: D66001074
fbshipit-source-id: 8356b5bc79a864e5e93467228af5fdff20659723
Summary: This also sync's the config options into the OSS extension package.json, and internal extension likewise.
Reviewed By: robertoaloi
Differential Revision: D65474060
fbshipit-source-id: bf06f405b7b63b72e5819ad3c9bfd0a7893993b6
Summary:
We now that we have cheap, reliable semantic token highlighting of the Eqwalizer `dynamic/0` and `dynamic/1` types, but re-using the semantic tag intended for bound variables in patterns.
We introduce a new tag, `type_dynamic`, and work it through into both the internal and OSS VS Code extensions to highlight in bold.
This is chosen as it does not clash with the bound variables which uses underline, and it is theme-independent.
https://pxl.cl/5R4Nj
Reviewed By: robertoaloi
Differential Revision: D65215906
fbshipit-source-id: cf80de49a6d15e70c98250bdb12351d94884eb7a
Summary: In preparation for a new OSS release.
Reviewed By: alanz
Differential Revision: D60673665
fbshipit-source-id: 5ecbb91dad39d0a62c1ac1d7cfb1cfbf400bab51
Summary: Import the latest available version of the grammar, which includes support for OTP 27.
Reviewed By: alanz
Differential Revision: D59057702
fbshipit-source-id: 72dcaaa7d43faa067be7e0f00e89796816383519