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

fineTuning #113

Closed
cmhughes opened this issue May 13, 2018 · 6 comments
Closed

fineTuning #113

cmhughes opened this issue May 13, 2018 · 6 comments
Labels
enhancement enhancement which might be to an existing feature or the development of a new feature implemented implemented tag means that either an enhancement or feature request has been implemented, or bugfix

Comments

@cmhughes
Copy link
Owner

I wonder if it's worth exploring a field called (something like) fineTuning which would allow users to specify all the different constructions in the various different reg exps.

For example, it might look something like

fineTuning:
      environmentName:
           - [a-z]
           - [A-Z]
           ...
      UnnamedBracesBracketsFollow:
          - ','
         - '\{'
     ...

Perhaps each one of these should have an 'amalgamate' field?...

@cmhughes cmhughes added the enhancement enhancement which might be to an existing feature or the development of a new feature label May 13, 2018
@cmhughes
Copy link
Owner Author

Part of this should be customization of betterFullStop.

@cmhughes
Copy link
Owner Author

The double back slash regex should be included in this: #106, unless there's another way to have it customised somehwhere else....

@cmhughes
Copy link
Owner Author

Stuff between arguments in Command.pm should be part of this.

@cmhughes
Copy link
Owner Author

verbatim environments and filecontents

@cmhughes
Copy link
Owner Author

As of d27ef47 this feature is implemented and documented. Explicitly, this has introduced the following to defaultSettings.yaml:

# fineTuning allows you to tweak the internal pattern matching that 
# is central to latexindent.pl
fineTuning:
    environments:
      name: '[a-zA-Z@\*0-9_\\]+' 
    ifElseFi:
      name: '@?if[a-zA-Z@]*?' 
    commands:
      name: '[+a-zA-Z@\*0-9_\:]+?'
    keyEqualsValuesBracesBrackets:
      name: '[a-zA-Z@\*0-9_\/.\h\{\}:\#-]+?'
      follow: '(?:(?<!\\)\{)|,|(?:(?<!\\)\[)'
    NamedGroupingBracesBrackets:
      name: '[0-9\.a-zA-Z@\*><]+?'
      follow: '\h|\R|\{|\[|\$|\)|\('
    UnNamedGroupingBracesBrackets: 
      follow: '\{|\[|,|&|\)|\(|\$'
    arguments:
      before: '(?:#\d\h*;?,?\/?)+|\<.*?\>'
      between: '_|\^|\*'
    modifyLineBreaks:
      betterFullStop: '(?:\.\)(?!\h*[a-z]))|(?:(?<!(?:(?:e\.g)|(?:i\.e)|(?:etc))))\.(?!(?:[a-z]|[A-Z]|\-|~|\,|[0-9]))'
      doubleBackSlash: '\\\\(?:\h*\[\h*\d+\h*[a-zA-Z]+\h*\])?'
      comma: ','

@cmhughes cmhughes added the implemented implemented tag means that either an enhancement or feature request has been implemented, or bugfix label Jun 23, 2019
@cmhughes cmhughes mentioned this issue Jul 13, 2019
@cmhughes
Copy link
Owner Author

Implemented as of #169

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement enhancement which might be to an existing feature or the development of a new feature implemented implemented tag means that either an enhancement or feature request has been implemented, or bugfix
Projects
None yet
Development

No branches or pull requests

1 participant