chrisgrieser / nvim-tinygit

A lightweight bundle of commands focussed on swift and streamlined git operations.
MIT License
170 stars 5 forks source link

feat(functionHistory): handle "Method" as well as "Function" #5

Closed humblehacker closed 11 months ago

humblehacker commented 11 months ago

Checklist

Changes

I was trying to get functionHistory to work with Swift. I modified my git-attributes so git log -L :func:file works with Swift, but invoking functionHistory() presented an empty list. Turns out Swift functions have kind "Method" instead of "Function", so I added that to the filter.

In addition, for Method I had to strip off everything after the initial function name (foo(bar:baz:)foo), otherwise git log ... would fail.

This change should be transparent to the user, so I didn't update the README.

chrisgrieser commented 11 months ago

Thx!