iamcco/vim-language-server
在 GitHub 查看Feature: goto definition for values defined in another script
Open
#39 建立於 2020年5月5日
enhancementhelp wanted
倉庫指標
- Star
- (544 star)
- PR 合併指標
- (PR 指標待抓取)
描述
First, thanks for this language server! It does its job well.
I have lots of plugins and it would be nice if I could jump to the definition of a function, a variable, or a command that is defined in another function. For example:
:verbose command FiletypeFormat
Name Args Address Complete Definition
FiletypeFormat 0 % silent! let b:filetype_formatter_winview = winsaveview() | <line1>,<line2>call filetype_formatter#format_filetype() | silent call winrestview(b:filetype_formatter_win
view)
Last set from ~/.config/nvim/pack/packager/start/vim-filetype-formatter/plugin/filetype_formatter.vim line 113
The result gives me the file and line where the command (or function if using function) was last defined. Maybe we can use this, or something like it, to locate definitions in other VimScripts?
The above assumes that the user is using Vim to edit their Vimscript.