sebasmonia / sharper

.NET Core for Emacs (via transient)
MIT License
60 stars 6 forks source link

c-defun-name-and-limits returns nil always #25

Open sebasmonia opened 3 years ago

sebasmonia commented 3 years ago

Find a more reliable way to find out the current method.

sebasmonia commented 3 years ago

Apparently this was broken only in Emacs 28 (dev branch), so I can assume it will work again by the time Emacs 28 releases. Still worth it to look into, maybe, an lsp-mode setup? The code would try to get the method name from lsp, then c-defun-name-and-limits, and finally thing-at-point.

sebasmonia commented 1 year ago

Wondering if tree sitter can also be incorporated into this mix.

TS -> LSP/Eglot -> c-defun-name-and-limits -> symbol-at-point