jonnyboyC / kos-language-server

A language server for the Kerboscript (kOS) a language for Kerbal Space Program
MIT License
25 stars 6 forks source link

[BUG] Warning "Function xy already exists. Originally declared here" always refers to the current file #111

Closed chrbkr closed 4 years ago

chrbkr commented 4 years ago

Hey, thanks for this great tool!

I noticed a small bug that confused me until I realized what was going on (using Visual Studio Code):

When a function is already defined in ANOTHER file, I get warned, and the line number etc. is correct, but the filename specified is the current one, not the one where the function is defined.

Example:

Problem:

Expected result:

jonnyboyC commented 4 years ago

Thanks for the issue, make it a lot easier these small edge cases! This should be an easy one liner fix I'll try to push out a small patch update sometime this week.