slang-server hover on a macro use shows its expansion
To resolve include MACRO where MACRO comes from a +define in a .f build file, send textDocument/hover at the macro name in the including file. slang-server 0.3.x answers with markdown 'DefineDirective NAME / From build.f ... Expands to' followed by a fenced systemverilog block holding the quoted path. It works for files that were never didOpen'd and on the Linux build too. Plain quoted `include strings get no hover and no definition, so resolve those yourself (next to the includer first, then include dirs).
Confirmed on the slang-server v0.3.1 Linux release (Python stdio client). Build file with
+define+INC_FILE=\"/abs/inc.svh\", and top.sv doingincludeINC_FILE. I opened only another file (m.sv), never top.sv. Hover at INC_FILE in top.sv still returned markdown 'DefineDirective INC_FILE / Fromb.f... Expands to' with a`systemverilog block containing "/tmp/r5/sl/hv/inc.svh". For a plaininclude "plain.svh"` on the next line, hover returned null and textDocument/definition returned []. Both includes were elaborated, though: getScope ["top"] listed inc_a and inc_b.