redguardtoo / emacs.d

Fast and robust Emacs setup.
http://blog.binchen.org
GNU General Public License v3.0
2.39k stars 619 forks source link

Is there a plugin to show the definition of a variable quickly, just like the vs code ? #987

Open guoqinglei opened 2 years ago

guoqinglei commented 2 years ago

For example, in vs code, when you place the cursor at a variable (e.g., when i am programing with verilog or other language), it will show the definition of this variable. I wonder whether this feature could be enabled in emacs ? (maybe I need to install lsp ?)

redguardtoo commented 2 years ago

https://github.com/emacs-lsp/lsp-ui ?

guoqinglei commented 2 years ago

I think lsp is too heavy, I wonder if there is any lightweight solution ?

redguardtoo commented 1 year ago

I use universal-ctags+counsel-etags.

guoqinglei commented 1 year ago

I use universal-ctags+counsel-etags.

Then you need to press Ctrl+] on the variable to go to the definition of this variable. However, the vscode can pop up the definition when you put the mouse on this variable, this is amazing.

redguardtoo commented 1 year ago

I use universal-ctags+counsel-etags.

Then you need to press Ctrl+] on the variable to go to the definition of this variable. However, the vscode can pop up the definition when you put the mouse on this variable, this is amazing.

Mouse will drag down my speed.

I know this feature. It's not new to me. It's doable in Emacs, maybe some ivy-postframe api need be used.