atom / bracket-matcher

Jump to brackets
MIT License
142 stars 98 forks source link

Language specific bracket strings do not take effect #345

Open jordwalke opened 6 years ago

jordwalke commented 6 years ago

Prerequisites

Description

The autocompleteCharacters setting does not take effect in Reason files if I add this config:

{
  ".source.reason": {
    "editor": {
      "commentStart": "/* ",
      "commentEnd": " */",
      "foldEndPattern": "^\\s*\\}|^\\s*\\]|^\\s*\\)",
      "increaseIndentPattern": "(?x) \\{ [^}\"']* $ | \\[ [^\\]\"']* $ | \\( [^)\"']* $",
      "decreaseIndentPattern": "(?x) ^ \\s* (\\s* /[*] .* [*]/ \\s*)* [}\\])]",
      "preferredLineLength": 110
    },
    "bracket-matcher": {
      "autocompleteCharacters": [
        "()",
        "[]",
        "{}",
        "\"\"",
        "``",
        "“”",
        "‘’",
        "«»",
        "‹›"
      ]
    }
  }
}

I'm pretty sure this is a bug because if I add "autocompleteBrackets": false, it does take effect on a language level basis.

Steps to Reproduce

  1. Add that config.
  2. Load Reason file.
  3. See it does not take my customizations into account.

Expected behavior: My customizations should be taken into account.

Actual behavior: They aren't.

Reproduces how often: 100%

Versions

You can get this information from copy and pasting the output of atom --version and apm --version from the command line. Also, please include the OS and what version of the OS you're running.

Mac OS: bracket-matcher version 0.88.1. Atom version 1.24.0.

The feature for language level config was added in 2016 so I should have it.

no1xsyzy commented 6 years ago

I've countered a problem that seems similar from the starting when using racket language. And then I found that if the config is put in ~/.atom/config.cson, autocompleteCharacters works as well as autocompleteBrackets. However, when I put the config into language-racket package, it will only work after restarting atom (or, almost equivalently, doing Window: Reload). Hope that helps.