Closed psprint closed 1 year ago
Can you link the dedicated Zsh parser that Ctags released?
https://github.com/universal-ctags/ctags/issues/3494 https://github.com/universal-ctags/ctags/pull/3499
On Wed, 5 Apr 2023 at 17:37, vladislav doster @.***> wrote:
Can you link the dedicated Zsh parser that Ctags released?
— Reply to this email directly, view it on GitHub https://github.com/zdharma-continuum/zinit/pull/482#issuecomment-1497873043, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABOE4CBASX2YVUE7DBFRFQ3W7WUVPANCNFSM6AAAAAAVQBKTX4 . You are receiving this because you authored the thread.Message ID: @.***>
-- Best regards, Sebastian Gniazdowski
@psprint,
I left two comments when I reviewed it.
However, I've tried to use this and think this functionality should be removed from Zinit and moved to be encapsulated in a Zsh plugin.
My thoughts:
Under these circumstances, developers are less likely to sacrifice personal interests in favor of the interests of the product. The product's complexity grows due to developers adding new designs and altering earlier ones to reflect changes in fashion and individual taste.
Mostly, the ctags
bits in Zinit are relatively isolated. However, the few lines in zinit.zsh
add complexity with minimal benefit and support a niche feature. Additionally, this feature is not (AFAIK) discoverable in Zinit CLI; instead requires running a make target.
The functionality and required steps would be much better as a Zsh plugin.
Programmers sometimes make implementation choices that work but have unintended negative consequences. The most common of these mistakes are cataloged and referred to as smells in the book Refactoring by Martin Fowler. Over time, many such implementation choices degrade the software's design, making it increasingly difficult to understand.
Additionally, I've seen no issues related to this functionality raised by users leading me to believe the usage is low.
@pschmitt Thoughts?
This will end up as bitrot and should not be merged. See my reasoning above.
I agree with your take on that one @vladdoster . This should be outsourced to an annex imo.
@psprint,
I am closing this PR.
The browse-symbol function is still in the repo and share/zsh,.ctags too. Would the feature survive in the end? I think that such support – to open a function/var/etc. of any source supported by Ctags is useful, however it is hard to draw users into using it. If such feature would be provided by Zinit (and documented – PRs with README updates haven't been merged) it would help. However I can see the code going out, I already provide the same feature in my Angel project.
Universal Ctags has been updated with dedicated zsh parser, so one cannot use zsh language defined via regex. I've renamed it to
zsh3
, so that both languages can be used to generate more tags. The newzsh
parser supportsautoload
but it doesn't support local/typeset/declare/etc., so it's good to enable them both.Usage examples
Types of changes
Checklist: