很多ide 具有在当前页面 弹窗模式 显示函数或变量定义的功能 刚接触emacs的时候看过一篇帖子 是基于rtags 实现的 现在大家都用lsp-mode了就想着能不能结合一下 奈何还不太会写插件 看看有没有人能贡献一下 感谢各位大神~~
https://tuhdo.github.io/emacs-frame-peek.html
效果应该是这样的 不知道为啥 这个链接的图打不开了 能看到图的补个图吧 链接很难打开 补上代码吧 At this point, implementing a peek definition in Emacs is simply automating these steps:
- Find the absolute position of the current beginning of the symbol at point, in pixels.
- Create a new invisible frame, with the current buffer in it.
- Position the new frame right under the beginning of the symbol at point.
- Jump to the symbol at point.
- Make frame visible again.