bergercookie / asm-lsp

Language server for NASM/GAS/GO Assembly
https://crates.io/crates/asm-lsp
BSD 2-Clause "Simplified" License
269 stars 18 forks source link

feat: Support compile_commands.json/compile_flags.txt, correct include directories #96

Closed WillLillis closed 4 months ago

WillLillis commented 4 months ago

This PR adds support for the LLVM project's compile_commands.json and compile_flags.txt standards. I created a separate crate to provide a wrapper type around the formats, which the server then depends on.

The standard allows for a compile command to be associated with a given source file. From this command, we can extract additional include directories. In addition to searching default include directories (as before), the server will now check for additional include directories, respecting the source file a request was made in. This checks off another item from #80, and moves us one step closer to #85.

Closes #77