-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
vim.lsp.buf.definition() should work with vim-go's stack #3547
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
You're free to disable vim-go's definition related mappings that control the stack by leveraging You could also configure the mappings to do whatever you find preferable by using a edit: typos |
Thanks @bhcleek. That helps. Why does vim-go maintain its own stack, rather than use vim's built-in tag stack? Oh, and thanks for all the vim-go maintenance/dev work! 🦸=you. vim-go is such a useful plugin. |
Vim-go maintains its own stack, because there didn't used to be an easy easy way to hook into Vim's tag stack. #667 has some relevant background. Looking into this a bit more, it appears that Vim has added some functions that may make this easier to deal with now. I'll leave this open, because I may be able to leverage As a further breadcrumb for myself, see |
@bitwombat can you give #3548 a try (being sure that |
Beaut, works great! |
I don't see any reason to avoid vim-go's mapping for <C-]> when |
Yep. Thanks for the quick response. I'll look forward to the merge. |
What did you do?
Used a key mapped to
vim.lsp.buf.definition()
Hit
<C-t>
What did you expect to happen?
Expected the stack to be popped and me returned to the original file.
What happened instead?
I stayed in the definition file. Received message:
vim-go: at bottom of the godef stack
I understand
vim-go
key maps<C-]>
and<C-t>
to GoDef and StackPop, but in order to work with multiple languages, I use other keys which are mapped to vim.lsp.* function calls. I was hoping that vim-go would somehow play nice with Neovim's LSP client and stack pushing/popping would work.Configuration (MUST fill this out):
vim-go version:
master/a494378
vimrc
you used to reproduce:vimrc
Vim version (first three lines from
:version
):NVIM v0.9.0
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Go version (
go version
):go version go1.20.2 linux/amd64
Go environment
go env
Output:gopls version
gopls version
Output:vim-go configuration:
vim-go configuration
filetype detection configuration:
filetype detection
The text was updated successfully, but these errors were encountered: