Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add bracket indentation semantics to (* *) #1998

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Apr 1, 2024

  1. Add bracket indentation semantics to (* *)

    Background: ionide/ionide-fsgrammar#209 and ionide/ionide-fsgrammar#210
    
    This comes from a comment regarding a pull request that I made on the
    ionide-fsgrammar repository, which removes the `(* *)` bracket pair from
    the "brackets" field of language-configuration.json. One issue with
    doing this is that we lose the bracket-like indentation that VSCode
    provides by default for all bracket pairs. This pull request re-adds the
    same semantics to the indentation rules.
    
    In other words, when I hit Enter in the following configuration,
    cursor location represented by the white block:
    
        (*█*)
    
    It should indent the cursor and then put the `*)` on the next line
    with the same indentation level as the `(*` as follows:
    
        (*
            █
        *)
    
    ---
    
    When I hit Enter with an unaccompanied `(*`:
    
        (*█
    
    It should simply indent as follows:
    
        (*
            █
    
    ---
    
    Lastly, an unaccompanied `*)` should outdent. That is,
    
            *)█
    
    should become
    
        *)█
    mbottini committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    2b507b1 View commit details
    Browse the repository at this point in the history