dense-analysis / dense-analysis/ale

Tagstack is always appended to, behaves different to native tags

Open
#2,945 1 comment 0 reactions 0 assignees View on GitHub
enhancement help wanted LSP
Dominant language
Vim Script
Stars
14k
Forks
1.5k
Avg merge
17h 49m
Merged PRs (30d)
1

Description

Currently ale doesn't replicate Vim's native tag behavior when using `:ALEGoToDefinition`. The way that the tagstack is updated is different.

Natively, `CTRL-T` will go up in the tagstack, decrementing the "current index". A subsequent `CTRL-]` will push to the tagstack at the position of the current index, replacing everything that came after this index.

Ale, however, always appends at the end of the tagstack, ignoring the current index. This breaks `CTRL-T` because it will jump to the last definition that had been jumped to chronologically, rather than the one that was previously "current".

Unfortunately `settagstack` can only replace or append to the tagstack, so we have to manually replicate the behavior. (I've just opened https://github.com/vim/vim/issues/5405 to suggest to provide it natively.)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.