dial.nvim
                                
                                
                                
                                    dial.nvim copied to clipboard
                            
                            
                            
                        `PascalCase` matches one word
The help says Currently, this augend does NOT recognize identifiers that consist of only one word.,  but PascalCase matches to the word starts with capital letter like 'Word' and 'WORD'.
This is a minimum setting to reproduce ↓
lua << EOF
local augend = require("dial.augend")
require("dial.config").augends:register_group{
  default = {
    augend.case.new{
      types = {"camelCase", "PascalCase"},
    },
  },
}
EOF
In this GIF, dial.nvim thinks that 'EOF' is PascalCase ↓

Thanks for the report. You are right, it is inconvenient. However, I am not sure how to solve this problem, because it is not obvious how to handle a sequence of uppercase letters in PascalCase. For example, if I want to change the word "LicenseMIT" from PascalCase to snake_case, how should that be handled? What about the case of "ParseCLanguage"?
Using Regex Lookahead, a sequence of capital letters can be considered a single word. Here is an example in JavaScript:
const regex = /[A-Z]([A-Z](?![a-z]))+|[A-Z][a-z]*/g
'LicenseMIT'.match(regex)
// -> ['License', 'MIT']
'ParseCLanguage'.match(regex)
// -> ['Parse', 'C', 'Language']
'JSONToYAMLConverter'.match(regex)
// -> ['JSON', 'To', 'YAML', 'Converter']
In this case, however, there are some probrems.
- The capital parts cannot be restore once convert to snake_case: 
LicenseMIT -> license_mit -> LicenseMit - The sequence of capital-only-word cannot be detect: 
JSONYAMLConverter -> jsonyaml_converter 
It is a difficult problem and it may good to ignore the word that has a sequence of capital letters.
I reported this issue because the behavior was different from the help.
Yes, as you say, the current implementation is compatibility oriented. However, the word detection algorithm could use a little more improvement. It may be possible to sacrifice compatibility for greater convenience.
@monaqa A "potential" solution/workaround could be to implement something similar to ActiveSupport::Inflections#acronym and then keep the current algorithm as it is 🤔