Giter VIP home page Giter VIP logo

vscode-blockman's Introduction

VS Code Marketplace Installs VS Code Marketplace Downloads VS Code Marketplace Version VS Code Marketplace Rating

Donation is really appreciated. Blockman is a hard work of many months. My name is Levan Katsadze (ლევან კაცაძე), 1995-03-03, from Tbilisi, Georgia (Not USA).

Buy Me A Coffee ko-fi facebook logo youtube logo




For better experience: Blockman will ask you to change these 7 items in VS Code settings (only one-time at the installation event). These 7 settings are very non-vital, so maybe you don't even need to backup them first.

// settings.json (User/Global config, not Workspace config)
// To open this file in VS Code, press F1, type 'settings json' and choose 'Preferences: Open Settings (JSON)'
{
    // ...
    "editor.inlayHints.enabled": "off",
    "editor.guides.indentation": false, // new API for indent guides. The old one is: "editor.renderIndentGuides": false,
    "editor.guides.bracketPairs": false, // advanced indent guides (But only for brackets) (This does not turn off editor.bracketPairColorization)
    "editor.wordWrap": "off",
    "diffEditor.wordWrap": "off",

    "workbench.colorCustomizations": {
        // ...
        "editor.lineHighlightBorder": "#9fced11f",
        "editor.lineHighlightBackground": "#1073cf2d"
    }
}



VS Code Blockman Icon

Blockman

VS Code Extension For Nested Block Highlighting

Watch Video Intro

You can toggle enable/disable: Press F1 and then type "blockman toggle".

Also You can go to Blockman settings and set Black List Of File Formats to disable Blockman for certain files.

alt text testing

Animated PNG:

alt text testing


Added NEW color combos as "Super gradients".

Blockman now supports gradients for both: borders and backgrounds.

super gradients color combos in Blockman

super gradients color combos in Blockman for Python


You can hide backgrounds and keep only borders.

Go to Blockman settings, find "N33 A01 B2" and type "45,0,0,2; none".

only borders instruction in Blockman


You can highlight all the parents of the focused block.

only borders instruction in Blockman


How to do it? Go to Blockman settings, find "N33 A03 B1" and delete "!".

"!" (exclamation mark) means the option is disabled.

only borders instruction in Blockman

Also you can type other colors and other propagation logic with your taste. See the instructions of advanced coloring.




Supported programming languages:

Non-indentation based languages: JavaScript, JSX, TypeScript, TSX, C, C#, C++, Java, Ruby, PHP, R, Go (Golang), Dart, Rust, Swift, PowerShell, SQL, HTML, CSS, LESS, SCSS and more...

Indentation based languages: currently Python and Yaml.


Python code:

alt text testing


If you use double width characters, then you may want to run the experimental command to support such characters. Press F1 and type the command name: Blockman Toggle Try Support Double Width Chars.

Such as,

  • Chinese characters (汉字): ex. 字符串最大字符串最
  • Korean characters (한글): ex. 한글 텍스트

Blockman settings

You can change nesting depth

alt text testing


You can choose color combos

alt text testing

alt text testing


You can choose right side padding strategies

alt text testing


You can change color of each depth

Colors can be any CSS color value: red, green... rgb(), hsl(), linear-gradient()...

alt text testing


You can change focused block colors and general border color

alt text testing


You can change basis of block analysis

(Curly brackets, square brackets, round brackets, tags, indentation)

alt text testing


Currently only Python and Yaml are supported from indentation based languages

alt text testing

You can provide other tokenizer algorithms and we can add them into this extension, so Blockman will be able to highlight blocks based on different or more advanced logic, or add support for other indentation based languages.


You can disable rendering single line blocks

alt text testing


All Blockman quick commands

Press F1 and find:

>Blockman Toggle Enable/Disable
>Blockman Toggle Enable/Disable And Force Show/Hide Indent Guides

>Blockman Select Focused --- Select text inside focused block
>Blockman Toggle Freeze/Unfreeze Focus

>Blockman Toggle Try Support Double Width Chars (e.g. Chinese)

>Blockman Clear State Storage --- revert back to the first installation state

All Blockman settings

// settings.json (User/Global config, not Workspace config)
// To open this file in VS Code, press F1, type 'settings json' and choose 'Preferences: Open Settings (JSON)'

// Each item is with default value
{
    // n01 and n02 are deprecated.
    "blockman.n03MaxDepth": 12, // -1 is no blocks, 0 is ground block, 1 is first depth blocks, 2 is second depth blocks
    "blockman.n04ColorComboPreset": "Classic Dark 1 (Gradients)", // This does not change VS Code theme. Choose preset combo of colors. Corresponding colors are overridden by custom colors (if not empty string). Also This setting can be overriden by the next 3 combo settings
    "blockman.n04Sub01ColorComboPresetForDarkTheme": "none", // Color combo to apply when current theme kind is Dark.
    "blockman.n04Sub02ColorComboPresetForLightTheme": "none", // Color combo to apply when current theme kind is Light.
    "blockman.n04Sub03ColorComboPresetForHighContrastTheme": "none", // Color combo to apply when current theme kind is High Contrast.

    "blockman.n04Sub04RightSideBaseOfBlocks": "Rightmost Edge Of Inner Content", // or "Rightmost Edge Of Viewport" or "Rightmost Edge Of File Content"
    "blockman.n04Sub05MinDistanceBetweenRightSideEdges": 0, // CSS pixels. 4 is probably good. Keep in mind that for some devices, CSS pixel is larger/smaller than physical pixel.
    "blockman.n04Sub06AdditionalPaddingRight": 0, // CSS pixels. Keep in mind that for some devices, CSS pixel is larger/smaller than physical pixel.

    "blockman.n05CustomColorOfDepth0": "", // Any CSS color, e.g. rgb, rgba, hsl. Type 'none' for same color as editor background.

    "blockman.n06CustomColorOfDepth1": "", // Any CSS color, e.g. rgb, rgba, hsl. Type 'none' for same color as editor background.
    "blockman.n07CustomColorOfDepth2": "", // Any CSS color, e.g. rgb, rgba, hsl. Type 'none' for same color as editor background.
    "blockman.n08CustomColorOfDepth3": "", // Any CSS color, e.g. rgb, rgba, hsl. Type 'none' for same color as editor background.
    "blockman.n09CustomColorOfDepth4": "", // Any CSS color, e.g. rgb, rgba, hsl. Type 'none' for same color as editor background.
    "blockman.n10CustomColorOfDepth5": "", // Any CSS color, e.g. rgb, rgba, hsl. Type 'none' for same color as editor background.

    "blockman.n11CustomColorOfDepth6": "", // Any CSS color, e.g. rgb, rgba, hsl. Type 'none' for same color as editor background.
    "blockman.n12CustomColorOfDepth7": "", // Any CSS color, e.g. rgb, rgba, hsl. Type 'none' for same color as editor background.
    "blockman.n13CustomColorOfDepth8": "", // Any CSS color, e.g. rgb, rgba, hsl. Type 'none' for same color as editor background.
    "blockman.n14CustomColorOfDepth9": "", // Any CSS color, e.g. rgb, rgba, hsl. Type 'none' for same color as editor background.
    "blockman.n15CustomColorOfDepth10": "", // Any CSS color, e.g. rgb, rgba, hsl. Type 'none' for same color as editor background.

    "blockman.n16EnableFocus": true, // Highlight block differently if caret is inside it.
    "blockman.n17CustomColorOfFocusedBlock": "", // Requires 'Enable Focus' to be true/enabled. Type 'same' if you want it to be same color as if not focused.
    "blockman.n18CustomColorOfFocusedBlockBorder": "", // Requires 'Enable Focus' to be true/enabled. Type 'same' if you want it to be same color as if not focused.
    "blockman.n19CustomColorOfBlockBorder": "",
    "blockman.n20CustomColorOfDepth0Border": "",

    "blockman.n21BorderRadius": 6,
    "blockman.n22AnalyzeCurlyBrackets": true, // Render blocks inside curly brackets {}, keep in mind: the parser/tokenizer will ignore brackets inside comments, inside strings and inside some other areas.
    "blockman.n23AnalyzeSquareBrackets": false, // Render blocks inside square brackets [], keep in mind: the parser/tokenizer will ignore brackets inside comments, inside strings and inside some other areas.
    "blockman.n24AnalyzeRoundBrackets": false, // Render blocks inside Round brackets (), keep in mind: the parser/tokenizer will ignore brackets inside comments, inside strings and inside some other areas.
    "blockman.n25AnalyzeTags": true, // Render blocks inside HTML/XML/JSX/TSX tags <tag></tag>, keep in mind: the parser/tokenizer will ignore tags inside comments, inside strings and inside some other areas.

    "blockman.n26AnalyzeIndentDedentTokens": true, // This option affects only files of indentation based languages like Python. Currently only Python and Yaml are supported for indentation analysis. Keep in mind: the parser/tokenizer will ignore indentations inside comments, inside strings and inside some other areas.
    "blockman.n27AlsoRenderBlocksInsideSingleLineAreas": false, // {I am a single line area} <p>Me too</p>. Focused single line block will still be rendered even if this setting is off. Use n27B01 to hide block of focused single line area.
    "blockman.n27B01HideBlockOfFocusedSingleLineArea": false, // {I am a single line area} <p>Me too</p>.

    "blockman.n28TimeToWaitBeforeRerenderAfterLastChangeEvent": 1.2, // (Seconds). For optimization: enter more time for slow computers. Less than 0.05 is NOT recommended even for fast computers.
    "blockman.n29TimeToWaitBeforeRerenderAfterLastFocusEvent": 0.2, // (Seconds). For optimization: enter more time for slow computers. Less than 0.2 is NOT recommended because double-clicking may become problematic.
    "blockman.n30TimeToWaitBeforeRerenderAfterLastScrollEvent": 0.1, // (Seconds). For optimization: enter more time for slow computers. Less than 0.05 is NOT recommended even for fast computers.
    "blockman.n31RenderIncrementBeforeAndAfterVisibleRange": 22, // Less is faster because less blocks will be rendered outside the viewport but scrolling may become less comfortable. If less than 1 (e.g. -5), the blocks will render in limited area.

    "blockman.n32BlackListOfFileFormats": "plaintext, markdown, ", // Disable Blockman for certain file formats, e.g. plaintext, markdown, css, less, scss, html, json, jsonc, typescriptreact, typescript, javascriptreact, javascript, python, go, dart, php, c, csharp, cpp, java. If the first character is '^' (caret symbol), the list will act as a white list, e.g. '^ typescript, typescriptreact'.

    // Advanced Coloring:
    // Video instruction: https://youtu.be/UsET6-kPu90

    // Textual instruction:
    // '!' means disabled.
    // Advanced coloring string, if enabled, will override basic coloring settings.

    // Right side: sequence of colors/gradients.

    // Left side:
    // --- FIRST number relates priority,
    // --- SECOND number relates zero-based index of first item of first loop, So it splits the sequence into what should not be looped and what should be looped,
    // --- THIRD number relates loop part reversion (0: original, 1: reversed),
    // --- FOURTH number relates looping strategy (0: all the continuation items to be 'neutral', 'neutral' means it will be overriden by any other setting, 1: Only the last item will be looped. Yes, it will ignore the SECOND option number (split index), 2: loop as forward, 3: loop as pair of forward and backward).

    // 'neutral' color means it will be overriden by any other coloring setting.
    // 'basic' color means it will set a color from basic color settings.

    // 'transparent' and partially transparent colors work fine for borders, but backgrounds have some problems with such values,
    // so, if you type 'transparent' on background, it will be the color of VS Code editor backgound.

    "blockman.n33A01B1FromDepth0ToInwardForAllBorders": "!10,0,0,0; red > green > blue",
    "blockman.n33A01B2FromDepth0ToInwardForAllBackgrounds": "!10,1,0,3; hsl(235, 30%, 7%) > hsl(0, 0%, 7.1%) > hsl(0, 0%, 9.5%) > hsl(0, 0%, 11.15%) > hsl(0, 0%, 12.8%)",

    "blockman.n33A02B1FromFocusToOutwardForAllBorders": "!20,0,0,0; red > green > blue",
    "blockman.n33A02B2FromFocusToOutwardForAllBackgrounds": "!20,0,0,0; red > green > blue",

    "blockman.n33A03B1FromDepth0ToInwardForFocusTreeBorders": "!30,1,0,2; linear-gradient(to right, hsl(251, 22%, 25%), hsl(292, 20%, 18%)) > linear-gradient(to right, hsl(20, 50%, 30%), hsl(250, 30%, 30%))",
    "blockman.n33A03B2FromDepth0ToInwardForFocusTreeBackgrounds": "!30,0,0,0; red > green > blue",

    "blockman.n33A04B1FromFocusToOutwardForFocusTreeBorders": "40,0,0,0; basic",
    "blockman.n33A04B2FromFocusToOutwardForFocusTreeBackgrounds": "40,0,0,0; basic",

    "blockman.n33A05B1FromFocusToInwardForAllBorders": "!50,0,0,0; red > green > blue",
    "blockman.n33A05B2FromFocusToInwardForAllBackgrounds": "!50,0,0,0; red > green > blue",

    //
    //
    //

    "blockman.n34A01BorderThicknessOfNonFocusedBlock": 1,
    "blockman.n34A02BorderThicknessOfFocusedBlock": 2,

    "blockman.n35A01DisableRecommendationDialog": false,

    "blockman.n36A01MaxCharCountInAnyLine": 3000 // Blockman will not work in a file if the file has at least one line with N (or more) number of chars.
}

Things to consider

1) Each line of code must have less than 3000 (You can change this number) characters, otherwise blocks will not be rendered in entire file.

2) Please don't use non-monospace font. Use only monospace font like 'Oxygen Mono', 'BPG 2017 DejaVu Sans Mono' or other. Block-rendering is based on equal character-frame-widths, because pixel locations of characters is not accessible through VS Code API.

alt text testing

Just for the information, the letter "ლ" is Georgian alphabet character,
like: ა, ბ, გ, დ, ე, ვ, ზ, თ, ი, კ, ლ, მ, ნ, ო, პ, ჟ, რ, ს, ტ, უ, ფ, ქ, ღ, ყ, შ, ჩ, ც, ძ, წ, ჭ, ხ, ჯ, ჰ.

3) If you want to use mix of multiple fonts (like in the image above), Please don't use any non-monospace font. Use monospace fonts which have at least almost same width of character. For example: 'Oxygen Mono' and 'BPG 2017 DejaVu Sans Mono' have not only equal char frame width by themselves alone, but also almost equal char frame width to each other.

For Georgian (ქართული) language oriented developers: without multiple font mixing, just BPG 2017 DejaVu Sans Mono as a single font seems fine for me, and maybe you can use it too. For now, 2022, I think it is the one and only monospace font which has English (both lowercase and UPPERCASE) and Georgian lowercase letters, as well as Georgian UPPERCASE (known as Mtavruli/მთავრული) letters. You can also see the Unicode chart of Georgian lowercase and UPPERCASE letters.

For English language oriented developers: the same statement above goes here.


4) If you want to use ligatured monospace font like "Fira Code" (Typographic ligatures are when multiple characters appear to combine into a single character), please make sure that the font maintains the text width on every line with ligatures like there were no ligatures. "Fira Code" seems fine, and maybe most of ligatured monospace fonts are fine.

5) Recommended to turn off word wrap. Blocks will not render properly if there is any word wrapping.

alt text testing


6) Recommended to turn off "Editor: Guides: Indentation" (new) / "Editor: Render Indent Guides" (old).

alt text testing


7) Recommended to set pale color (e.g. pale blue) to lineHighlightBorder and lineHighlightBackground like this:

alt text testing

alt text testing

// settings.json
// To open this file (as global config) in VS Code, press F1, type 'settings json' and choose 'Preferences: Open Settings (JSON)'
{
    // ...
    "workbench.colorCustomizations": {
        // ...
        "editor.lineHighlightBorder": "#9fced11f",
        "editor.lineHighlightBackground": "#1073cf2d",

        // Or for specific VS Code themes:
        "[Default Dark+]": {
            // ...
            // "editor.lineHighlightBorder": "#9fced11f"
            // "editor.lineHighlightBackground": "#1073cf2d",
        },
        "[Abyss]": {
            // ...
            // "editor.lineHighlightBorder": "#9fced11f",
            // "editor.lineHighlightBackground": "#1073cf2d"
        }
    }
}

Optimization Notes

Optimization is taken very seriously, half of the work is dedicated just for the optimization.

If a file is already analyzed, rendering blocks takes about 0.02 seconds with default Blockman settings. So, rendering is not a big issue, but analyzing is quite heavy work. Here are some test cases of some programming languages:

Yaml file:
    analyze: 0.70 seconds (10,000 lines), 0.06 seconds (1,000 lines)

Dart file:
    analyze: 0.90 seconds (10,000 lines), 0.09 seconds (1,000 lines)

CSharp file:
    analyze: 1.40 seconds (10,000 lines), 0.15 seconds (1,000 lines)

TSX file:
    analyze: 1.60 seconds (10,000 lines), 0.17 seconds (1,000 lines)

JavaScript file:
    analyze: 2.70 seconds (10,000 lines), 0.28 seconds (1,000 lines)

Python file:
   analyze: 10.70 seconds (10,000 lines), 0.86 seconds (1,000 lines)

So, currently I'm trying to find more optimized ways to analyze files, especially for Python langauge.


Big thanks to these source codes

Bracket Pair Colorizer 2 (by CoenraadS)

Highlight Matching Tag (by vincaslt)

dt-python-parser (by DTStack)


Also Big thanks

From 1.1.0 version, manual setup of line height and char width is not needed anymore, thanks to alexdima (Alexandru Dima).

From 1.2.0 version, the problem of block-rendering widths at the locations of Color Decorators have been fixed for most of monospace fonts. Thanks to rioV8 from stackoverflow.


Published In:

Github repository: https://github.com/leodevbro/vscode-blockman

Marketplace: https://marketplace.visualstudio.com/items?itemName=leodevbro.blockman

Open VSX: https://open-vsx.org/extension/leodevbro/blockman


Donation

Buy Me A Coffee: https://www.buymeacoffee.com/leodevbro

Ko-fi: https://ko-fi.com/leodevbro

Bank account (USD): GE08TB7774936615100013 (TBCBGE22)

Bank account (GEL/Lari): GE18TB7774936515100011 (TBCBGE22)

vscode-blockman's People

Contributors

gogi2811 avatar jeanp413 avatar khoicandev avatar leodevbro avatar zelixir 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  avatar  avatar  avatar  avatar  avatar

vscode-blockman's Issues

Support for Motoko language

I'd really appreciate if you add support for Motoko language of Internet Computer too https://sdk.dfinity.org/docs/language-guide/motoko.html
It's getting popular over time as they've made to the public source release of the Internet Computer platform.

Also I'm not sure if it's a good thing to make an addition like this (if not I can create another issue for this) but what about an optional, generic support for all languages that use regular {} blocks etc?

Add support for newer version of VS code to install the extension.

Screen Shot 2021-06-21 at 6 27 14 PM

As you can see the screenshot while installing this extension on my Mac VS Code it throws the error about not compatible which is a blocker to install and use such a nice extension.

VScode details
Version: 1.56.0
Commit: cfa2e218100323074ac1948c885448fdf4de2a7f
Date: 2021-05-04T22:06:21.189Z
Electron: 12.0.4
Chrome: 89.0.4389.114
Node.js: 14.16.0
V8: 8.9.255.24-electron.0
OS: Darwin x64 19.6.0

How do I set overwidth on purpose? I would like to increase the negative space of the containers

I like the idea of this a lot and in my own personal set up I have used several different extensions to mark out the block scope visually. I am testing out blockman, and I like it's basic idea but I would like if I could set more negative space or padding in the container. As it is now things feel too close to the edge of the container. 

In the art world this concept is know as a tangent composition mistake: https://willkempartschool.com/compostional-mistakes-in-drawing/

Disable certain depth levels ( specifically Depth0 )

I would prefer for the lowest depth to not be outlined. In Python, there doesn't seem to be any advantage in having the whole module outlined.

Could you introduce the ability to ignore certain depths?

{
    "blockman.ignoredDepths": [
        0,
        1
    ]
}

Or perhaps to specify a range of depths that the user would like to outline?

{
    "blockman.range": "2:8"
}

Fantastic extension needs performance optimization

Issue Type: Performance Issue

Love this extension. Helps me visualize my position in code, especially in deeply nested widgets. But it's lagging even on my high end device. Even at N6 it's barely usable. Also I suspect it might have a memory leak, as it keeps getting worse and gets better after a a reload.

Extension version: 1.2.16
VS Code version: Code - Insiders 1.62.0-insider (4bbec283c36a51cf80f9b77c7a81c140a76a363b, 2021-11-02T08:19:40.220Z)
OS version: Windows_NT x64 10.0.22000
Restricted Mode: No

System Info
Item Value
CPUs AMD Ryzen 9 4900H with Radeon Graphics (16 x 3294)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 31.42GB (12.52GB free)
Process Argv --crash-reporter-id 76213229-3f45-4857-b470-1778a95699b5
Screen Reader no
VM 0%
Process Info
CPU %	Mem MB	   PID	Process
    0	   137	  3956	code-insiders main
    0	    24	  9636	   crashpad-handler
    4	   217	 13612	   window (series_list_sort_section.dart - banagher - Visual Studio Code - Insiders)
   10	   256	 11588	     extensionHost
    0	     5	 19536	       C:\WINDOWS\system32\cmd.exe /d /s /c ""C:\flutter\bin\cache\dart-sdk\bin\dart.exe" "C:\flutter\bin\cache\dart-sdk\bin\snapshots\analysis_server.dart.snapshot" "--lsp" "--client-id=VS-Code" "--client-version=3.28.0""
    0	    11	  3876	         console-window-host (Windows internal process)
   12	    89	 25268	         "C:\flutter\bin\cache\dart-sdk\bin\dart.exe"  "C:\flutter\bin\cache\dart-sdk\bin\snapshots\analysis_server.dart.snapshot" "--lsp" "--client-id=VS-Code" "--client-version=3.28.0"
    0	     6	 29944	       C:\WINDOWS\system32\cmd.exe /d /s /c ""C:\flutter\bin\flutter.bat" "daemon""
    0	    11	 30516	         console-window-host (Windows internal process)
    3	   123	 30568	         "C:\flutter\bin\cache\dart-sdk\bin\dart.exe"  --disable-dart-dev --packages="C:\flutter\packages\flutter_tools\.packages"  "C:\flutter\bin\cache\flutter_tools.snapshot" "daemon" 
    0	     5	 30804	       C:\WINDOWS\system32\cmd.exe /d /s /c ""c:\Users\Agone\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\node_modules.asar.unpacked\vscode-ripgrep\bin\rg.exe" --no-messages --vimgrep -H --column --line-number --color never --max-columns=1000 --no-config  -f "c:\Users\Agone\AppData\Roaming\Code - Insiders\User\workspaceStorage\33938f9b144b76f96ab13177c795021d\Gruntfuggly.todo-tree\2hbwjcffks.txt" -g "!**/node_modules" -g "!**/banagher/windows/**/*" -g "!c:\Users\Agone\Source\work\comikey\banagher\lib\helpers\platform.dart" "c:\Users\Agone\Source\work\comikey\banagher""
    0	    11	 30204	         console-window-host (Windows internal process)
    0	     9	 32232	         "c:\Users\Agone\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\node_modules.asar.unpacked\vscode-ripgrep\bin\rg.exe"  --no-messages --vimgrep -H --column --line-number --color never --max-columns=1000 --no-config  -f "c:\Users\Agone\AppData\Roaming\Code - Insiders\User\workspaceStorage\33938f9b144b76f96ab13177c795021d\Gruntfuggly.todo-tree\2hbwjcffks.txt" -g "!**/node_modules" -g "!**/banagher/windows/**/*" -g "!c:\Users\Agone\Source\work\comikey\banagher\lib\helpers\platform.dart" "c:\Users\Agone\Source\work\comikey\banagher"
    0	     6	 32092	       "C:\Program Files\Git\cmd\git.exe" for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track) refs/heads/dev refs/remotes/dev
    0	    11	 28588	         console-window-host (Windows internal process)
    0	     0	 30500	         
    1	   469	 15708	   gpu-process
    0	    39	 25308	   utility
    7	   139	 30700	   shared-process
    0	    68	 13304	     ptyHost
    0	     7	 14368	       console-window-host (Windows internal process)
    0	    51	 26732	       "C:\Program Files\PowerShell\7\pwsh.exe"
    0	    88	 30924	     watcherServiceParcelSharedProcess
    0	    92	 31528	   window (Issue Reporter)
    0	     7	 32724	   "C:\Program Files\Google\Drive File Stream\52.0.6.0\crashpad_handler.exe" --database=C:\Users\Agone\AppData\Local\Google\DriveFS\Crashpad --url=https://clients2.google.com/cr/report "--annotation=application=Code - Insiders.exe" --annotation=prod=DriveFS --annotation=ver=52.0.6.0 --initial-client-data=0x15b0,0x15a4,0x1574,0x1594,0x1558,0x7ffce569f820,0x7ffce569f830,0x7ffce569f840
Workspace Info
|  Window (series_list_sort_section.dart - banagher - Visual Studio Code - Insiders)
|    Folder (banagher): 10689 files
|      File types: xml(2133) json(1217) flat(1056) svg(308) class(294)
|                  jar(219) png(178) dart(156) txt(126) len(123)
|      Conf files: cmake(12) sln(6) github-actions(1) launch.json(1)
|                  tasks.json(1)
|      Launch Configs: dart(4);

Feature Request: support per-language configuration

I would like to disable blockman for certain languages like markdown or plain text.
But the option blockman.n03MaxDepth does not support this.

image

This might also be usefull for other options like Custom Color of DepthX.
For example: I would like to set Depth0 and Depth1 to none for json files.

replacing Node fs with vscode.workspace.fs

@CoenraadS,
As you suggested, vscode.workspace.fs works fine in all the areas of the source code as an alternative of Node fs, but there is just one persistent problem with loading the wasm file.

As you can see, both Node fs and vscode.workspace.fs prints the buffer, but in different length and different encoding. So, there comes the error as you see in the screenshot.

Any ideas what can we do about it?

2021-11-02_19-47-23

Support for `editor.letterSpacing`

I use a monotype font but with a modified letter spacing property the text is wider than the block

Without editor.letterSpacing
image

With editor.letterSpacing
image

Bug: boxes overlap text

I installed the plugin without changing any settings and the blocks are deeper than the text they should contain.

This goes for .ts files. .ejs files look just fine.

block overlap

First level elements are not surrounded

I'm not sure if this is a bug or a feature:

image

On the left side (actual) you can see, that aaa(), bbb(), bbb2() and Test are not surrounded by anythying. I would expect them to also be surrounded.

This goes a little beyond this bug:
I would also enjoy, if all structured class/function/method/namespace ranges that are returned by vscode.executeDocumentSymbolProvider would get surrounded - perhaps as option?.

Need Display Support

When Chinese characters are included in a line, the width of the BLOCK cannot be expanded correctly.

For example, when I text in such below,

class 新建自定义类(socketserver.BaseRequestHandler):

The BLOCK seems to ignore the Chinese in this line, showing the wrong width, which is significantly shorter than the length of the row.

Great plugin by the way, thank you for your contribution.
Hope to get support soon.

Support for SQL Queries

I would like to congratulate you for the tool, very good!
Secondly, I would like to suggest support for SQL queries, many people have been using VSCode as their default editor and many procedures give developers a headache.

Reverse Rendering Order for Gradients

Could the tool give a options , using Reverse Order for rendering ?
Which means, the focused block order number = 0
then the outer =1, then 2 , then 3....

Conflict with eslint rule

Image from Gyazo

I'm using eslint :

 "key-spacing": [
            // dùng cho việc thẳng hàng Value của Object
            "error",
            {
                "align": {
                    "beforeColon": true,
                    "afterColon": true,
                    "on": "colon"
                }
            }
        ]

which cause the problem

Left Padding

Is there a way to add a pixel or three of padding on the left? It's pretty jarring to have no padding on the box.

Feature Request: indent dedent tocken support for any language

I want to be able to use blockman with Lua files, unfortunately, Lua doesn't have clear block tokens (its keywords do double duty). Being able to allow any language to piggyback on the current python support system will expand the feature to many languages at least partially.

Alternatively, proper Lua support would be appreciated, perhaps allowing the user to provide a list of words that start a block and what ends that block. Having these be language-specific like #22 wants would be even better.

Feature: Support to SQL language

Hello! I'd like to use Blockman with SQL language (e.g.: Stored Procedures, Functions, Views).
Will be useful in large SQL code.

Remove horizontal lines that are distracting at normal zoom levels

Hi. Firstly, let me say that this is a great extension! I heard about it when you posted it on Codecademy and have shared with so many people!

When at normal zoom levels, I have an awful lot of horizontal lines generated by Blockman, as shown in the first screen shot:

image

However, when I zoom out a bit, these disappear, leaving behind just the borders of the blocks. I can't find an option to make this the default choice for me - is it possible?

image

Thank you!

Theme issues

I installed blockman, and when a txt file was set as a django txt Language Mode, the background of text turned from blue to white

before
image

after
image

How do I change my settings if I use settings.json?

The readme shows exclusively the changing of settings through the GUI. I prefer to use text based configs because I can version control them, and more explicitly write out the exact changes I want. 

There is no real explanation of how to do this in the readme though. Please consider adding this information.

cannot install on VSCodium, Kubuntu

Bug: Looks like there is an issue or validation when trying to install this using the open source version of VS Code.

Unable to install "leodevbro.blockman" extension because is not compatible with the current version of VS Code (Version 1.56.0)

the window console:

[2021-10-13 16:31:50.377] [renderer3] [error] ["incompatible: Unable to install 'leodevbro.blockman' extension because it is not compatible with the current version of VS Code (version 1.56.0).","    at H.checkAndGetCompatibleVersion (file:///snap/codium/166/usr/share/codium/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js:47:215682)","
at async H.installFromGallery (file:///snap/codium/166/usr/share/codium/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js:47:213343)"]

[2021-10-13 16:31:50.385] [renderer3] [error] Unable to install 'leodevbro.blockman' extension because it is not compatible with the current version of VS Code (version 1.56.0).: incompatible: Unable to install 'leodevbro.blockman' extension because it is not compatible with the current version of VS Code (version 1.56.0).
    at H.checkAndGetCompatibleVersion (file:///snap/codium/166/usr/share/codium/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js:47:215682)
    at async H.installFromGallery (file:///snap/codium/166/usr/share/codium/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js:47:213343)

I'm pretty sure there shouldn't be any incompatibility here so my best guess is that the validation has a logic issue.

Feature Request: Support if-directives from AsciiDoc

It would be great if ifdef and endif directives from AsciiDoc would be supported.
These "blocks" are not defined by brackets or tags, but they should be considered as blocks, I think.

The blocks are defined from ifdef::foo[] (or ifndef:foo[]) to endif.

ifdef::foo[]
This content is for GitHub only.
endif::[]

Or endif::[] can include the same attribute as the beginning like endif::foo[].

ifdef::foo[]
Thius is some Text.
And some more Text.
endif::foo[]

There is also ifeval:
You can use this to supports multiple languages in one document.
And this is where blockman really would come in handy.

ifeval::["{lang}" == "de"]
Das ist mein Text.
endif::[]
ifeval::["{lang}" == "en"]
This is my text.
endif::[]
ifeval::["{lang}" == "es"]
Spanish text.
endif::[]

There are also one-liner, that I would not consider as blocks.

ifdef::foo[This is some text]

Feature Request: VHDL-2008 language support

You may choose not to do this, depending on how many people want it. It is not a popular language when compared to Python, C++ etc so there will be less users for this feature

Feature request: generate block colors based on current editor background.

I'm currently using "Winter Is Coming (Dark Blue - No Italics)" theme, which has a dark blue background, that doesn't look good with any of current presets.
I know that I can set block colors myself in the settings, but it would be nice if this extension could dynamically generate block colors based on current editor theme.

Przechwytywanie

Indent guide issues after uninstalling

After uninstalling Blockman, my indent guide color doesn't revert back to what it is in the theme I'm using which should be:
"editorIndentGuide.activeBackground": "#363b54",

Also, the vscode setting "Highlight Active Indent Guide" stops working since your style shows either way.

Highlight Disappers with SVG in code

I'm no sure if it's just me, but when I have <svg></svg> in my code all the highlight blocks disappear. As soon as I get rid of the svg block the highlight comes back.

Idea: Open-ended gradient

A free idea for you :D

As a design alternative that mitigates the autosizing limitations, having the right side of the boxes borderless and fading out would be interesting to see. Something like this crude mockup:
image

Drawback: Midline blocks won't look that good, maybe?

Edit: As a choice, not a replacement of course ;)

vscode-insider install fail

Error Message:
The "leodevbro.blockman" extension could not be installed because it is not compatible with the current version of VS Code (version 1.55.0- INSIDER).

Feature request - highlight selected block only

Is there a possibility to add a toggle that lets you highlight only the last block you are working on?
Personally, I think that the rest of the lines are distracting. I would like to focus only on what I am working on without extra visuals. What would be perfect is to have a feature for negative depth.
The last block and two blocks before for example.

Feature request: only show blocks for current scope tree

Nice extension!

I'd love if there was a toggle to only show blocks for the current scope. It would make it a lot easier to know where the cursor is and help understand the code I'm working on actively, while ignoring the rest.

I think this would help performance too.

Thanks for reading!

Extension not loading

Hey there! thanks for building this!

I'm having an issue with the latest version of the extension (1.1.4) and VSCode (1.56.2) where the extension will not load.
I've attached the log below. Happy to provide anything else if it helps you debug further.

[2021-06-09 20:36:14.502] [exthost] [info] ExtensionService#_doActivateExtension leodevbro.blockman {"startup":false,"extensionId":{"value":"leodevbro.blockman","_lower":"leodevbro.blockman"},"activationEvent":"onStartupFinished"}
[2021-06-09 20:36:14.502] [exthost] [info] ExtensionService#loadCommonJSModule file:///Users/lachlanheywood/.vscode/extensions/leodevbro.blockman-1.1.4/out/extension.js
[2021-06-09 20:36:15.085] [exthost] [error] Activating extension leodevbro.blockman failed due to an error:
[2021-06-09 20:36:15.085] [exthost] [error] Error: Cannot invoke loadWASM more than once.
    at Object.t.loadWASM (/Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar/vscode-oniguruma/release/main.js:1:4823)
    at TextMateLoader.loadOniguruma (/Users/~~/.vscode/extensions/leodevbro.blockman-1.1.4/out/bracketAlgos/textMateLoader.js:122:19)
    at new TextMateLoader (/Users/~~/.vscode/extensions/leodevbro.blockman-1.1.4/out/bracketAlgos/textMateLoader.js:21:31)
    at new Settings (/Users/~~/.vscode/extensions/leodevbro.blockman-1.1.4/out/bracketAlgos/settings.js:10:31)
    at new DocumentDecorationManager (/Users/~~/.vscode/extensions/leodevbro.blockman-1.1.4/out/bracketAlgos/documentDecorationManager.js:10:25)
    at activate (/Users/~~/.vscode/extensions/leodevbro.blockman-1.1.4/out/extension.js:747:30)
    at Function._callActivateOptional (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:92:14813)
    at Function._callActivate (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:92:14486)
    at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:92:12643
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async Promise.all (index 0)

It also shows an error when I attempt the 'Toggle Enable/Disable' command. Not sure if this is related, or if it is a result of the extension failing to load, but here's that error also:

Command 'Blockman Toggle Enable/Disable' resulted in an error (command 'blockman.toggleEnableDisable' not found)

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.