doomemacs / doomemacs/core

module "lookup": Work abnormally with LSP and xref etags in C

Open
#8,686 7 comments 0 reactions 0 assignees View on GitHub
:tools lookup
Dominant language
Emacs Lisp
Stars
22.7k
Forks
3.1k
Avg merge
10h 46m
Merged PRs (30d)
4

Description

### Describe your issue

One day I met a library that has a lot of header files. I need to lookup for a unknown symbol and its header file, but this time LSP couldn't help. Emacs has etags and xref supported, so I just generated tags for the library and try to lookup. But it worked abnormally (visit following reproduce steps). So I also tried it in plain emacs, it worked just fine. With some debug work, I found it was module `lookup`'s problem.

### Steps to reproduce

1. Generate etags for some C library
2. Put it in your C project
3. Type some unknown symbols in your file
4. Try find their definitions with `M-x +lookup/definitions`
5. Try find their definitions with `M-x xref-find-definitions`
6. Try find their definitions with `M-x xref-etags-mode` and then step 5
7. None of them work, but stay in original place
8. Remove `lookup` from `init.el`, and using `xref-etags-mode` to run `xref-find-definitions`
9. Everything worked just fine

### System information

https://pastebin.com/vxm19wpV

### Disclosures

- [ ] This issue was written with/by AI.

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.