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

enh(autodetect) multiple autodetect fixes #2745

Merged
merged 30 commits into from Nov 15, 2020

Commits on Nov 15, 2020

  1. Copy the full SHA
    ca540b0 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    d6e9d22 View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    f55bc37 View commit details
    Browse the repository at this point in the history
  4. Copy the full SHA
    dd02953 View commit details
    Browse the repository at this point in the history
  5. fix(autodetect) improve rule matcher

    - can start with `*` (css hacks)
    - can include a comment after attribute name before : (css hacks)
    joshgoebel committed Nov 15, 2020
    Copy the full SHA
    5bdd357 View commit details
    Browse the repository at this point in the history
  6. enh(autodetect) csharp: improve autodetection

    - `value` is too common variable name to score points as keyword
    - reduce 2x relevance for beginKeywords
    - bump csharp relevance slightly
    joshgoebel committed Nov 15, 2020
    Copy the full SHA
    dc6bbaf View commit details
    Browse the repository at this point in the history
  7. enh(autodetect) clojure: reduce runaway relevance

    - operators get 0 relevance (consistency: no other grammars score them)
    - "name" gets 0 relevance since almost any identifier will match
    
    This reduces false positives in the language-detection.el rosetta data
    set significantly.
    joshgoebel committed Nov 15, 2020
    Copy the full SHA
    8e7b582 View commit details
    Browse the repository at this point in the history
  8. Copy the full SHA
    aa45193 View commit details
    Browse the repository at this point in the history
  9. enh(autodetect) groovy

    - Add relevance for groovy shebang line
    - Ternary should not grant extra relevance
    joshgoebel committed Nov 15, 2020
    Copy the full SHA
    ad2aea4 View commit details
    Browse the repository at this point in the history
  10. enh(autodetect) lisp: tune relevancy

    - "name" gets 0 relevance since almost any identifier will match
    
    Applying same logic as used with Clojure.
    joshgoebel committed Nov 15, 2020
    Copy the full SHA
    659f794 View commit details
    Browse the repository at this point in the history
  11. enh(autodetect) php: improve auto-detection

    - only count => in `fn` context
    - prevent beginKeywords double relevancy
    - reduce relevance of `match`
    joshgoebel committed Nov 15, 2020
    Copy the full SHA
    c4062f3 View commit details
    Browse the repository at this point in the history
  12. Copy the full SHA
    36ab9a2 View commit details
    Browse the repository at this point in the history
  13. Copy the full SHA
    e36c161 View commit details
    Browse the repository at this point in the history
  14. Copy the full SHA
    250fa62 View commit details
    Browse the repository at this point in the history
  15. enh(autodetect) ruby improvements

    - add `__FILE__` to keywords
    - add `proc` and `lambda` Kernel methods to build_ins
    - stricter rule for identifying method definition
    - highlight variables
    - `|` style params now get no relevance (can be too many other things)
    - add SHEBANG rule
    - make Ruby REPL matching a little stricter
    joshgoebel committed Nov 15, 2020
    Copy the full SHA
    cb66c9f View commit details
    Browse the repository at this point in the history
  16. Copy the full SHA
    e4319db View commit details
    Browse the repository at this point in the history
  17. enh(autodetect) vbscript: improve auto-detection

    - built-ins should only match if they are a call
    - fix function detection
    joshgoebel committed Nov 15, 2020
    Copy the full SHA
    2421e24 View commit details
    Browse the repository at this point in the history
  18. Copy the full SHA
    656402c View commit details
    Browse the repository at this point in the history
  19. enh(autodetect) fewer false positives on variables

    For languages with $ident and @Ident style variables this attempts
    to prevent positives for $ident$ and @Ident@ type expressions, which
    are likely something else entirely.
    
    - bash
    - perl
    - php
    - ruby
    joshgoebel committed Nov 15, 2020
    Copy the full SHA
    de11ad1 View commit details
    Browse the repository at this point in the history
  20. Copy the full SHA
    49f430a View commit details
    Browse the repository at this point in the history
  21. Copy the full SHA
    de74ab8 View commit details
    Browse the repository at this point in the history
  22. Copy the full SHA
    f92cc46 View commit details
    Browse the repository at this point in the history
  23. Copy the full SHA
    c8c52e8 View commit details
    Browse the repository at this point in the history
  24. fix(ocaml) => does not actually seem to be a part of language

    - I looked but couldn't find any reference to this.
    joshgoebel committed Nov 15, 2020
    Copy the full SHA
    b60b1c4 View commit details
    Browse the repository at this point in the history
  25. Copy the full SHA
    d39c107 View commit details
    Browse the repository at this point in the history
  26. fix(n1ql) do not hobble relevancy of strings

    - There is no reason to do this every other language gets
      credit for simple strings.
    joshgoebel committed Nov 15, 2020
    Copy the full SHA
    7c60e51 View commit details
    Browse the repository at this point in the history
  27. fix(javascript) remove relevance of ident =>

    - This is found in other langauges and isn't a strong signal.
    joshgoebel committed Nov 15, 2020
    Copy the full SHA
    8e55681 View commit details
    Browse the repository at this point in the history
  28. Copy the full SHA
    50a0483 View commit details
    Browse the repository at this point in the history
  29. Copy the full SHA
    b0de56d View commit details
    Browse the repository at this point in the history
  30. add comment, fix typos

    - also fix pgsql markup test
    joshgoebel committed Nov 15, 2020
    Copy the full SHA
    9d06fe9 View commit details
    Browse the repository at this point in the history