Add `block_comment` to JS, TSX, and TS
This is the first step of "Solution proposal for folding multiline comments with no indentation":
- Add block_comment in the config.toml for the languages javascript, typescript, tsx. These are simple languages for this feature, and I am already familiar with them.
The next step will be:
- Modify the function
crease_for_buffer_rowinDisplaySnapshotto handle multiline comments.editor::foldandeditor::fold_allwill handle multiline comments after this change. To my knowledge,editor::unfold,editor::unfold_all, and the unfold indicator in the gutter will already work after folding, but there will be no fold indicator.
Release Notes:
- Added
block_commentto JavaScript, TSX, and Typescript.
Edit: I dug into the GH Action code and solved the errors below by using cargo nextest run --workspace --no-fail-fast. I will keep the text below in case it can help someone in the future.
All tests pass locally.
Details about the issue I was running into
After cloning the repo and running cargo test --workspace, I got a few test errors even with no code changes. If I comment the first error, I get multiple doc errors.
---- terminal_tool::tests::test_working_directory stdout ----
thread 'terminal_tool::tests::test_working_directory' panicked at crates/zlog/src/zlog.rs:14:28:
Logger should not be initialized twice: SetLoggerError(())
Doc error example:
error: cannot find derive macro `Documented` in this scope
--> crates/component/src/component.rs:231:10
|
4 | #[derive(Documented)]
| ^^^^^^^^^^
error[E0599]: no associated item named `DOCS` found for struct `MyComponent` in the current scope
--> crates/component/src/component.rs:236:20
|
5 | struct MyComponent;
| ------------------ associated item `DOCS` not found for this struct
...
9 | Some(Self::DOCS)
| ^^^^ associated item not found in `MyComponent`
error: aborting due to 2 previous errors
cargo test --workspace -p language buffer_tests passes on all tests. I will keep working on fixing these local issues.
The issue you ran into should be fixed by #31436. Your next step sounds good. If you get stuck feel free to put up your work as a draft PR and ask for help!