Closed fwcd closed 5 months ago
The issue seems to be that the interface (.icurry
) files seem to take precedence in the frontend if they already exist, otherwise the source file locations (e.g. <path to pakcs>/lib/Prelude.curry
) are indexed as intended. This is where the indexing happens on the language server side:
Since the symbols are only indexed once, the language server will keep the correct source path for until it is restarted, if the .icurry
didn't exist at startup. Thus we would have to update the frontend to always 'prefer' the source file's location.
A potential solution here would be to attach source information via #line
directives in the .icurry
files, similar to those emitted by the C preprocessor. The frontend should also know how to parse these directives and include them in the abstract representation, for use by the language server.
Find symbols in the project's source file, even if the compiler refers to a definition from an
ICurry
file.