Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3297 from niksilver/master
Elm,Units: Type and constructor tags exclude parameters etc. Quoted from the pull request: This has been tested with make units UNITS=simple-elm which passes. This is based on a problem encountered in Vim using ctags. It's possible this problem is entirely different (or maybe isn't even a problem!) with a different Vim configuration, a different editor, or a different use case. To understand the problem being addressed, consider the following code: type Param a = Cons a | Other a baz : Param Int baz = Cons 42 If the cursor is positioned under the Cons of the last line, then hitting Ctrl-] should take us to the definition of Cons on line 2. However, this fails because Vim identifies the tag under the cursor as the pure alphanumeric string Cons, but the tag in the tag file is Cons a. Similarly for when the cursor is placed under Param in the third line from the bottom. Also, if the definition of Param was type Param a = Cons a | Other a then its tag would be recorded as Param a =. Even though that's not the recommended way to format Elm it would still be helpful to generate a useful tag. So this change is to have tags for types and constructors limited to the initial alphanumeric part, which solves all these problems.
- Loading branch information