GithubHelp home page GithubHelp logo

mtbaqer / vscode-better-folding Goto Github PK

View Code? Open in Web Editor NEW
309.0 309.0 6.0 7.79 MB

VS Code extension to improve your folding experience

Home Page: https://marketplace.visualstudio.com/items?itemName=MohammadBaqer.better-folding

License: MIT License

TypeScript 100.00%
extension vscode vscode-extension

vscode-better-folding's People

Contributors

mtbaqer avatar tom-fletcher avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

vscode-better-folding's Issues

jsx not folding on a single line

Describe the bug
folding a JSX snippet keeps the ending fold on a separate line

To Reproduce
Steps to reproduce the behavior:

  1. Open a react js file
  2. fold any open tag
  3. closing tag is remaining on line below

Expected behavior
fold whole snippet on one line

Screenshots
open snippet
folded snippet

Immediately invoked function expression (IIFE) not folding as expected

Thanks a lot for creating this great extension. Finally the closing } is being folded.

I think I encountered a bug for Immediately invoked function expressions (IIFE):

  • the syntax highlighting is wrong
  • the part displaying how many lines were folded is absent
  • the cursor is invisible when it's on an IIFE

No folding
iife1

Folding
iife2

Weird selection

Shift + Right

2023-01-30-13-19-58_Code.mp4

Ctrl + A

2023-01-30-13-20-58_Code.mp4

Not working in Remote-SSH environment.

I'm using ms-vscode-remote.remote-ssh to connect with my linux server, and install your extension in the remote server. But the extension won't startup directly.

Log output:

2023-01-29 09:51:16.697 [error] Activating extension MohammadBaqer.better-folding failed due to an error:
2023-01-29 09:51:16.697 [error] Error: Cannot find module './bracketRangesProvider'

Add support for language that doesn't use bracket to fold -> Like LUA

LUA doesn't use bracket to fold. Here some examples :

function test()
    -- some code
end

for k,v in pairs(a) do
    -- some code
end

if true then
    -- some code
end

while true do
    -- some code
end

It woulds be great to have a support for LUA in your extension :)
(Note : other languages like Bash doesn't use bracket to fold too)

Folds might not be saved or loaded properly

To Reproduce
Steps to reproduce the behavior:

  1. Fold an object/function/switch statement/etc.
  2. Close editor
  3. Open editor
  4. (Folds are not there anymore)

Expected behavior
Fold state should be the same when restating VS Code.

Environment:

  • OS: Windows 11
  • VS Code
  • Typescript Svelte

Odd behavior:
When a fold is made and then the file with the folds is closed, then the editor is restarted. If I wait for like 30 seconds and open the file with the folds then the folds do work properly.

To Reproduce
Steps to reproduce the behavior:

  1. Fold an object/function/switch statement/etc.
  2. Close file with folds made
  3. Close editor
  4. Open editor
  5. Wait for 10-30 seconds
  6. Open file with folds
  7. (Folds are still there)

Show folded line counts not working in all cases

Describe the bug
Line count shows up when I fold CSS, for example, but not if I fold a div or any other HTML element.

To Reproduce
Steps to reproduce the behavior:

  1. Fold div, p, ul, etc, tags

Expected behavior
Expect line counts

Desktop (please complete the following information):

  • OS: Windows 11
  • Better Folding Version 0.5.1
  • Vscode ver 1.78.2

Collapse blank lines after brackets

When collapsing a number of functions, the blank lines in between each function are not collapsed, so it ends up with a function per two lines, wasting half the screen space.

Could the collapse also include blank lines after the closing brace, so that it will end up showing a collapsed function per line without any blank lines in between?

Unexpectedly disable unsupported language folding function

Describe the bug
For instance, I want to use official folding function on yaml file as this extension doesn't support indent folding, but after installing this extension, the folding function(both official and extension) seems to be diabled on the yaml file.

To Reproduce
Steps to reproduce the behavior:

  1. Enable extension
  2. Open yaml file
  3. Can't fold lines

Expected behavior
Using official folding function on unsupported language.

Extension not working inside vue script tag

Describe the bug
The extension isn't working for arrays inside the script tag of .vue files. Tested on plain javascript file and folding is as expected.

To Reproduce
Steps to reproduce the behavior:

  1. Open a new .vue file
  2. Create an array
  3. Click to fold

Expected behavior
The fold should look like const list = [...]

Screenshots
Captura de pantalla (21)
Unfolded List

image
Folding in .vue script tag

image
Folding in plain javascript file

Shown default `}`

If fold, } shown

image

Language: Java

Operating System: Windows 10
Visual Studio Code: 1.75.1
Better Folding: v0.5.0

"Show Only Region Descriptions" doesn't seem to be working

When I collapse the following code:

//#region I am a region!
let foo = "foo";
//#endregion

// #region I am also a region!
let bar = "bar";
// #endregion

I still see the keywords:
image

No extension host issues are being logged as far as I can see.

Extension version 0.2.2

Extremely High CPU Load When Editing Markdown File

Describe the bug
The CPU load goes through the roof when editing text in a Markdown file (without any preview being enabled). I found out that this extension is the cause with VS Code's excellent "bisect extension" feature. I have also recorded a CPU profile, which I attach. The recording shows the typing and deleting of about 20 words in a Markdown file.
CPU-20230417T090355.964Z.cpuprofile.txt

To Reproduce
Steps to reproduce the behavior:

  1. open a Markdown file (*.md)
  2. edit it
  3. cpu load goes up

Expected behavior
Moderate CPU load, so fan doesn't go to max speed.

Desktop (please complete the following information):
Version: 1.77.3
Commit: 704ed70d4fd1c6bd6342c436f1ede30d1cff4710
Date: 2023-04-12T09:16:52.732Z
Electron: 19.1.11
Chromium: 102.0.5005.196
Node.js: 16.14.2
V8: 10.2.154.26-electron.0
OS: Linux x64 5.15.0-69-generic
Sandboxed: No

Feature request: Ability to change colour of #region/#endregion

I know there are other extensions I could install to accomplish this, but it would be nice if the only extension I needed for all my folding needs was Better Folding.

Since you already have to parse regions in order to manipulate the displayed folding text, would you be able to add a setting that allows me to select what colour regions get displayed in? This is something that can be done inside Visual Studio, but not VS Code as far as I can tell.

I'd like comments to continue being displayed in green, while regions are displayed in Magenta, making them easily identifiable.

Thanks!

Extension fails to run in WSL environment; only partial operation in windows environment when running WSL folders.

Describe the bug
Essentially the bug is precisely as described in the title. When running the extension in WSL2, it doesn't function: The default folding functionality remains. The most that will happen is an ellipsis will appear next to the line being folded. This appears to affect every attempted language (Tested in HTML, JS, CSS, and JSON files).

When a WSL file (That is, a file that is stored within the WSL2 directories) is opened from VSCode, while VSCode is running on Windows, the extension will mostly work, except for that trailing brackets remain. Ie, The description of a function's contents therein will appear next to the line being folded, but the trailing brackets remain.

Also, while in WSL2, VSCode runs the extension in the Remote Extension Host, giving the message: "This extension is running in the remote extension host because it prefers to run there."

To Reproduce
Steps to reproduce the behavior:

  1. Launch a folder VSCode in WSL2
  2. Ensure Extension is installed. Open any .js file
  3. Attempt to collapse any function, object, array, etc.
  4. See error - failure to produce desired folding

Expected behavior
The folding described in the extension about page therein.

Screenshots
Pre Fold (in Express App):
https://i.imgur.com/whtiLMN.png
Post Fold:
https://i.imgur.com/7NalNcd.png

Pre Fold:
https://i.imgur.com/KTeffxo.png
Post Fold:
https://i.imgur.com/fYMkEWO.png

Desktop (please complete the following information):

  • OS: Windows 10 Pro 19044.2486
    -- Version 21H2
  • WSL2 OS : Ubuntu-20.04

Additional context
This probably isn't relevant as I haven't been able to investigate the extension's code deeper than just a barely surface level, but at a brief glance through the code I see the use of __dirname. I've run into problems when building apps in WSL2 with __dirname - having instead to use a custom __dirname absolute path such that:
const __dirname = url.fileURLToPath(new URL('.', import.meta.url));

Again this probably isn't relevant to the operation of your extension, but such an inconsistency like that between WSL and other operating environments (one which necessitates a workaround to things like absolute file paths) may be worth investigating.

Thanks so much for the hard work and the wonderful extension. You're seriously doing the work that Microsoft hasn't been able to do in almost an entire decade - excellent project.

1 line rather than 1 lines

Simply, I think it would look nice if there was a check for 1-liners when displaying the line count that instead displayed it as '1 line' instead of '1 lines'

Are you able to improve how cursor movements work?

Is your feature request related to a problem? Please describe.
This is for keyboard-focused users.

When I'm above a folded block, and I want my cursor to be below the folded block, I will usually press Down, Down, which works perfectly in Vim, skipping me over the folded block.

Unfortunately whenever I do this in VSCode, it sees my cursor navigate inside the folded code, and then expands that fold.

This unwanted fold expansion is really annoying!

Describe the solution you'd like
Navigating the cursor Up or Down inside a folded block, should move us outside of the block, and not expand the fold.

Describe alternatives you've considered
Using the mouse to click on the other side of the folded block works. Urgh!

Additional context
I am using VSCodeVim.

If not possible, no worries. But it would make folding better, for me!

I have not requested this directly from VSCode, but I could. (And then watch my issue get closed automatically!)

Support for regex matching of start/end of region folding

Is your feature request related to a problem? Please describe.
No. Ability to specify the regex of the folding markers. ie. phpStorm uses // region relationships and // endregion relationships. Not all the team uses phpStorm but VS Code instead.

Describe the solution you'd like
It would be helpful to be able to specify the regex to match the start/end of region format. ie.

    "betterFolding.markersRegex": {
       "start": "^\\s*\\/[*]\\s?#region\\s*(.*)\\s*[*]\\/$",
       "end": "^\\s*\\/[*]\\s?#endregion\\s*(.*)\\s*[*]\\/$"
   }

Describe alternatives you've considered
N/A

Additional context
N/A

Feature request: support .svelte files

Is your feature request related to a problem? Please describe.
When editing a Svelte component, many blocks are not foldable when using Better Folding. They are foldable when Better Folding is disabled.

Specifically, a Svelte component contains zero or more <script> blocks and zero or more <style> blocks as well as normal HTML. It can also contain conditional blocks: {#if condition} … {:else} … {/if}.

Describe the solution you'd like
I'd like it if Better Folding supported Svelte, as this is what I'm mainly developing in. I prefer the way Better Folding folds things when I'm using file formats it supports, but having it not work with Svelte is a bit of a blocker for me…

Describe alternatives you've considered
Currently, I've disabled Better Folding so I can use the Visual Studio Code default folder, which loses the Better Folding improvements, but works with Svelte.

The only other alternative I could think of would be to surround blocks I want to fold with region comments, but this is a bit of a hack (and leads to complaints if any of them get committed, as other devs "don't want IDE-specific stuff in the codebase" 🙄)

Additional context

Changing the extension to .html makes Svelte blocks foldable with Better Folding, so enabling this support for .svelte files would at least let me collapse a long <style> block when I don't need to see it. Adding support for the other Svelte-specific stuff like {#if} … {:else} … {/if} could come later.

With Better Folding disabled:

image

With Better Folding enabled:

image

With Better Folding enabled, and the file type changed to .html:

image

Extension fails to load when being run in a Dev Container

Describe the bug

The extension fails to load when being run in a Dev Container, as bracket-pair-colorizer-2 is looking for a node_modules.asar folder which does not exist in this environment, crashing the extension on load.

To Reproduce

A simple reproduction repo is available here, with instructions in the README.

Expected behaviour

The extension loads.

Root cause

The cause of the bug can be seen when viewing the output for the Remote Extension Host which shows the extension failed to load with the following error:

2023-01-31 23:11:06.095 [error] Activating extension MohammadBaqer.better-folding failed due to an error:
2023-01-31 23:11:06.096 [error] Error: Cannot find module '/vscode/vscode-server/bin/linux-x64/97dec172d3256f8ca4bfb2143f3f76b503ca0534/node_modules.asar/vscode-textmate'

When checking the file system, the directory .../node_modules.asar/... does not exist. However, in the same path the directory .../node_modules/... does exist.

The issue lies with this function in brackets-pair-colorizer-2 src:

private getNodeModulePath(moduleName: string) {
return path.join(vscode.env.appRoot, "node_modules.asar", moduleName);
}

In a Dev Container, this folder does not have the .asar suffix. I did a proof-of-concept check, changing this from node_modules.asar to node_modules then recompiling and re-installing the extension. This worked and the extension loaded as expected in the Dev Container (note that the fixes only showed on new files, and I had to re-create test.js before folding worked correctly).

Suggested fix

My suggested fix would be to modify the function so it checks whether the .asar folder is present:

 private getNodeModulePath(moduleName: string) { 
-  return path.join(vscode.env.appRoot, "node_modules.asar", moduleName); 
+  return fs.existsSync(path.join(vscode.env.appRoot, "node_modules.asar"))
+    ? path.join(vscode.env.appRoot, "node_modules.asar", moduleName)
+    : path.join(vscode.env.appRoot, "node_modules", moduleName);
 } 

Also happy to submit this fix via PR if this helps.

Folded text is nearly invisible with theme Ayu Light

Describe the bug
When using the theme Ayu Light, the "comments" on the folded line are nearly invisible.

To Reproduce
Steps to reproduce the behavior:

  1. Install and activate Ayu Light theme
  2. Click on the region to fold
  3. Observe text in folded region

Expected behavior
You can read the text in the folded region.

Screenshots
https://user-images.githubusercontent.com/7757254/216602548-8faa3b3a-d57b-4313-abf4-521e18c5a287.mov

Desktop (please complete the following information):

  • OS: macOS 13.2
  • Version v.0.3.0

Add custom folding option

Is your feature request related to a problem? Please describe.
I'd love the ability to fold based on custom folding options. For example, the jEdit folding option of "{{{" open fold and "}}}" close fold

Describe the solution you'd like
The region within "{{{" and "}}}" would be folded as a region, with subregions being folded as well. Other fold methods could also be folded within these folding regions, and anything after the "{{{" would be kept on the line, which is currently done with this extension already.

If possible, a shortcut key sequence (like ALT-Down_Arrow and ALT-Up_Arrow) could navigate between folded sections.

Additional context
See the attached image of folding done in jEdit.

jedit-folding

Add "Collapse to Definitions" feature from Visual Studio

In Visual Studio, the following shortcut exist for outlining:

image

Collapse to Definitions
In my opinion, the "Collapse to Definitions" shortcut is the most important outlining feature of any IDE, as it collapses everything down to a basic outline, which (1) allows you to quickly navigate to anything you're looking for, and (2) allows you to easily view what functionality exists in any file that is new to you.

When invoked, this feature does the following:

  • Keeps all namespaces, classes, and enumerations expanded.
  • Collapses all top-level/class functions, but keeps their innards (if/for/while/inline lambdas) expanded.
  • Collapses all multi-line comments found anywhere in the file.
  • Collapses all regions found anywhere in the file (#region/#endregion).

Given what this extension is already able to do, it seems like implementing this feature would not be that difficult. Can it be added?

Slow startup time

Describe the bug
The startup time makes the folding features of the editor non-functional for at least 20 seconds for large (>1500 loc) files

To Reproduce

  1. Open a large file without extension
  2. Folding features work immediately
  3. Install extension and reload editor
  4. Folding features take a while to work

Expected behavior
I expected some slowness, but being unable to fold for up to half a minute is forcing me to uninstall the extension

Significantly slower autocomplete suggestions in CSS

With extension enabled, autocomplete suggestions in CSS file appear way slower than normally, with like almost a second delay...

To Reproduce
Just try typing basic CSS parameters like:
display: ...

Autosuggestions appear with huge delay. Almost no other extensions are enabled, apart from GitHub Pull requests, repositories, etc.
Disabling Better Folding fixes things immediately.

React autosuggestions in .tsx files work pretty much normally.

macOS 13.1
VSCode Version: 1.74.3 (Universal)

class generic on multi-line

To Reproduce
Steps to reproduce the behavior:
make structure like this

export class LocalHistoryESystem extends System<ECSE, [
	MSGTYPES.entity_registred, MSGTYPES.contextmenue_redo, MSGTYPES.contextmenue_undo,
	MSGTYPES.entity_change,
	MSGTYPES.camera_change,
] > {
	static state: 'undo' | 'redo' | null = null;
	constructor() {
		super(
			[UPDATEBEHAVIOR.update],
			[
				[MATCHRULES.hasAll, [LocalHistoryEComponent]],
			],
			[
				MSGTYPES.entity_registred, MSGTYPES.contextmenue_redo, MSGTYPES.contextmenue_undo, MSGTYPES.entity_change, MSGTYPES.camera_change,
			],
		);
	}
}

Expected behavior
when collapas LocalHistoryESystem , only the typescript generic array should collapse, what i we want just hide typescript part in this case ?

Screenshots

Additional context
Add any other context about the problem here.

original
image
vscode folding
image
betterfolding
image

Are there plans to add support for Laravel Blade tags?

I'm new to the extension so if there is a way to add custom tags, I'm unaware. But this extension would be perfect for me if it also collapsed tags like

@section
@endsection

@Push
@endpush

(and so on)

for laravel blade templates. That's all, really, so far this is great! Thanks :)

Doesn't fold the whole arrow function

Hi! Thank you for improving my vscode UX! I have an old issue, which was exist in vscode and I hope your extension could solve it.

Describe the bug

I can't fold the whole arrow function by one click, need to fold separate parts - very annoying.

To Reproduce

  1. Paste this code to vscode
  2. Try to fold the function
  3. Need 4 steps for it!

Expected behavior

Click to the arrow in line with the function name should fold the whole function

Screenshots

CleanShot 2023-03-15 at 07 37 49@2x

CleanShot 2023-03-15 at 06 47 39@2x

CleanShot.2023-03-15.at.06.49.57.mp4

Env

vscode 1.76.0

"End" key can't be used on line of folded code

Repro

  1. Fold a method.
  2. Move the keyboard caret to that line.
  3. Press the "End" key, with the intention of moving the caret to the end of the line so that you can then hit "Enter" and start writing a new function below it.

Expected result:

  • Caret moves to end of line like it does on a non-folder line, or like it does on a folded line in Visual Studio:
    image

Actual result:

  • Caret jumps to start of line for some reason.
    image

Handling brackets on the next line after functions

Describe the bug
When folding a function I assumed it would fold the function and not only the bracket pair itself, when the bracket for a function is on the next line.

To Reproduce
Steps to reproduce the behaviour:

  1. Write a function
  2. Add the brackets on the next line (which is the default for some languages)
  3. Fold the brackets (maybe select the anything within the brackets first)
  4. See error

Screenshots && Expected behaviour
PHP
image
image
Two different examples folded. I would expect these to fold on the function header line. function hello() {...} Actual code:

function hello()
{
    hello();
}

C#
image
image
Before and after folding. The very best case would be public class ParseException : Exception {...} I think.

Additional context
PHP and C# have this as default. I get why this happens, but maybe this is easy to fix in the extension. Maybe it is too hard or tied deep into the actual LSP for these languages, just let me know. Otherwise it looks really cool! Edit: this behaviour also happens in Rust, with exactly the same details as the PHP case.

Better comments [feature request]

Is your feature request related to a problem? Please describe.
Allow support comments concatenation in 1 inline.
ex of issue:

/**
 * @component
 * @description
 * Description of the component... bla bla bla...
 */
export class AComponent extends Component {

}

original
image

folding
image

Describe the solution you'd like
A folding option to allow see 1 inline comment when they are folding.
ex:
image

Describe alternatives you've considered

Additional context

[request] shortkey or command to unfold only comments

did you think it possible to add a command/shortkey for unfold/fold only comments.
In the scenario we folding everything , we usuel want see comments description sometime.

i think this feature would be a nice addition to make folding management in vsc even better.
if you think is possible and if you have time :)

when we fold all , it look like this
image

but we can use a shortcut to fold/unfold all comments (jsdoc) only
image

thank for your awesome plugin.
the plugin of the year for me :)

keep loading forever, impossible to work with github

Type: Bug

try to use soucecontrol on a large work file with this enabled

Extension version: 0.5.1
VS Code version: Code 1.77.3 (Universal) (704ed70d4fd1c6bd6342c436f1ede30d1cff4710, 2023-04-12T09:19:37.325Z)
OS version: Darwin x64 21.6.0
Modes:
Sandboxed: No

System Info
Item Value
CPUs Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz (12 x 2900)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Load (avg) 10, 6, 4
Memory (System) 32.00GB (5.15GB free)
Process Argv --crash-reporter-id 58e00d19-fb2c-4502-b5a6-5ceb083be8e4
Screen Reader no
VM 0%
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492:30256859
vslsvsres303:30308271
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263cf:30335440
vscoreces:30445986
pythondataviewer:30285071
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593cf:30376535
pythonvs932:30410667
cppdebug:30492333
vscaac:30438847
vsclangdf:30486550
c4g48928:30535728
dsvsc012:30540252
pynewext54:30695312
azure-dev_surveyone:30548225
nodejswelcome1:30587005
282f8724:30602487
pyind779:30671433
89544117:30613380
vscrpc:30673769
pythonsymbol12:30671437
2i9eh265:30646982
6233i204:30672705
vsccsb:30705552
vscodeenable:30660116
functionswalk:30687959
pythonms35:30701012
pythonfmttext:30710681
pythonclientmvcf:30713944

Nested #regions do not fold at correct #endregion

Given a nested set of #region tags, does not correctly fold to the correct #endregion. Bug was present on a .js file.

//#region imports

//#region react-native
import { Button, StyleSheet, Text, View } from "react-native";
//#endregion react-native

import { create } from "zustand";

//#endregion

Closing imports gives:

image

when the expectation from folding (without better-folding) would close the entire parent region.
Setting the final #endregion to be with title imports does not fix the issue.

Lost Folding After Installing This Extension -Latest Versions

**::: Describe the bug ::: **

Lost All VSCode Folding After Installing This Extension

** ::: To Reproduce ::: **

Installed the 'Better Foldng' extension and lost whatever folding there was in VSCode.

** ::: Expected behavior ::: **

I should have better folding not NO FOLDING :-)

** ::: Desktop :::**

  • OS: Linux PopOS v22.04
  • Browser : Chrome / Brave / Firefox. Default Browser is Brave
  • Version : Latest Versions of VsCode and Browser etc.

Additional context
After i uninstalled the 'Better Folding ' Extension - all the folding in VsCode returned

Folding Vitest tests hides their names

Describe the bug
When collapsing a Vitest test, it is summarised as it(…) or it(function), which is not very helpful as all the tests look the same when folded.

To Reproduce
Given the following code:

import { describe, it } from 'vitest'

describe('example', () => {
  const example = (a: string) => {
    console.log('example')
  }

  it('returns the logged-in user', function () {
    expect(get(user)).not.toBeNull
  })
})

If you fold each definition inside the describe, you get

image

Expected behaviour
Vitest's it and describe still show their names when folded, as RubyMine does:

image

Screenshots
(see above)

Desktop (please complete the following information):

  • OS: macOS 12.6.3 (21G419)

Additional context
I am using the default settings, apart from "betterFolding.showOnlyRegionsDescriptions": true.

Can't install 'mohammadbager.better-folding'extension because it is not compatible with the current version of Visual Studio Code (version 1.70.2).

Describe the bug
Can't install 'mohammadbager.better-folding'extension because it is not compatible
with the current version of Visual Studio Code (version 1.70.2).

To Reproduce
Steps to reproduce the behavior:
When I am ready to install, the above error pops up and refuses to install.

Expected behavior
Installation success

Screenshots
1678929428

Desktop (please complete the following information):

Version: 1.70.2 (user setup)
Commit: e4503b30fc78200f846c62cf8091b76ff5547662
Date: 2022-08-16T05:35:13.448Z
Electron: 18.3.5
Chromium: 100.0.4896.160
Node.js: 16.13.2
V8: 10.0.139.17-electron.0
OS: Windows_NT x64 10.0.19043

Smartphone (please complete the following information):

Additional context

Installed extension, but it's not doing anything

Describe the bug
I installed the extension.

I expanded/collapsed in a JS file to see if the closing brace would start disappearing, but nothing new happened. I got the existing experience, where the closing brace stays visible.

I tried closing and reopening VS Code.

I tried disabling and then re-enabling the extension.

Still nothing.

I checked the settings page for the extension and confirmed everything is turned on.

This extension looks like the greatest thing since sliced bread, but how can I get it to work?

OS: Windows 10 22H2 x64 (19045.2486)
VS Code: 1.74.3
Electron: 19.1.8
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0

Conflicts with Ansible lnaguage

This extnension breaks folding in Ansible language(and probably YAML also).
Without this extension:

image

With extnesion:
image

Vscode 1.75
Better folding v0.3.1
OS Arch Linux

I'm not sure, but this can be somehow connected with this issue: ansible/vscode-ansible#601

Editing large files with this extension takes a lot of performance resources

Type: Bug

When editing a relatively large file ~6000 lines, this extension apparently is the cause of a lot of cpu consumption it seems. Which causes VSCode to behave really slow most of the time, e.g. IntelliSense and saving files takes forever.

Extension version: 0.4.0
VS Code version: Code 1.75.0 (e2816fe719a4026ffa1ee0189dc89bdfdbafb164, 2023-02-01T15:23:45.584Z)
OS version: Windows_NT x64 10.0.19045
Modes:
Sandboxed: No

System Info
Item Value
CPUs AMD Ryzen 7 3700X 8-Core Processor (16 x 3593)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Load (avg) undefined
Memory (System) 15.95GB (8.16GB free)
Process Argv --folder-uri file:///c%3A/Users/Daan/Documents/Development-PC/ISOBUS/ISO11783-CAN-Stack --crash-reporter-id ba8e2d03-84c8-4f01-abf3-0d26248a50da
Screen Reader no
VM 0%
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
pythonvspyl392:30443607
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593:30376534
pythonvs932:30410667
cppdebug:30492333
vsclangdf:30486550
c4g48928:30535728
dsvsc012cf:30540253
azure-dev_surveyone:30548225
pyindex848cf:30577861
nodejswelcome1:30587005
2e4cg342:30602488
f6dab269:30613381
pythonsymbol12cf:30657549
a9j8j154:30646983
vsccsb:30659829

Performance problem with latest update

Type: Bug

The latest update seems to have serious performance problems: tested on both VSCode latest Insiders and Stable on two different Windows machines.

Typing is very slow to respond, letters appears seconds after being typed; the overall CPU utilization is normal for the machine.

Disabling the extension resolves the problem.

Extension version: 0.2.2
VS Code version: Code - Insiders 1.75.0-insider (b229eb5fa2ecadb8a5238ccb9f6f49f7ccba9d2b, 2023-01-27T22:17:10.413Z)
OS version: Windows_NT x64 10.0.22621
Modes:
Sandboxed: Yes

System Info
Item Value
CPUs Intel(R) Xeon(R) W-2133 CPU @ 3.60GHz (12 x 3600)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Load (avg) undefined
Memory (System) 31.57GB (12.61GB free)
Process Argv --crash-reporter-id a979586f-c5b5-4646-91b6-e3918bf5fa50
Screen Reader no
VM 0%
A/B Experiments
vsliv695:30137379
vsins829:30139715
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
pythonvspyl392:30422396
pythontb:30258533
pythonptprofiler:30281269
vshan820:30294714
pythondataviewer:30285072
vscod805:30301674
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593:30376534
pythonvs932:30404738
cppdebug:30492333
vsclangdf:30492506
c4g48928:30535728
dsvsc012:30540252
pynewext54:30618038
pylantcb52:30590116
pyindex848:30611229
nodejswelcome1:30587009
pyind779:30611226
pythonsymbol12:30651887

Failed to collapse ending bracket with TypeScript

Describe the bug
It fails to collapse ending bracket if the language of VSCode is TypeScript.
Same code works if the language is set to JavaScript.

To Reproduce
Steps to reproduce the behavior:

  1. Use the code in screenshots
  2. Collapse the interface

Expected behavior
Collapse ending bracket

Screenshots
image
image

Desktop (please complete the following information):

  • OS: Window 10

Slow down my VS Code when enable this plugin

Describe the bug
Thanks for your awesome plugin. I enjoy it! But when I enable this plugin, my VS Code becomes slow.

To Reproduce
Steps to reproduce the behavior:

I only encountered this issue in this repo, sorry for couldn't provide a mini reproduction.

  1. Clone repo https://github.com/Boshen/oxc.git
  2. Following the CONTRIBUTE.md to setup
  3. Search file crates/oxc_minifier/src/printer/gen.rs
  4. try to type something.

Expected behavior
Maybe should write codes smoothly.

Screenshots

In this video, I am using the same typing speed.

enabled: [start - 0:30]
disabled: [0:50 - end]

CleanShot.2023-05-14.at.10.41.42.mp4

Desktop (please complete the following information):

  • OS: macos 13.2.1, M1 Pro, 16 G.
  • Browser: Chrome
  • Version: v0.5.1

Additional context

None

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.