This corrects the treatment of compile_flags.txt during the server's generation of diagnostics. The server now treats compile_flags.txt files correctly, as if they only contain flags. If such a file is loaded, the server will attempt to invoke gcc with the provided flags. If it fails to invoke gcc, it will also try clang. There is a new opts section of .asm-lsp.toml with an optional compiler entry. If the compiler field is set, the server will attempt to invoke the provided compiler in order to generate diagnostics.
This also enables diagnostics by default. That is, if no compile command applies to the source file when a request comes in, the server will still try to invoke gcc (and if that fails, clang) on the contents of the current buffer, with the file path being the only argument. This enables diagnostics even when no compile_commands.json or compile_flags.txt are available for the current project.
This corrects the treatment of
compile_flags.txt
during the server's generation of diagnostics. The server now treatscompile_flags.txt
files correctly, as if they only contain flags. If such a file is loaded, the server will attempt to invokegcc
with the provided flags. If it fails to invokegcc
, it will also tryclang
. There is a newopts
section of.asm-lsp.toml
with an optionalcompiler
entry. If thecompiler
field is set, the server will attempt to invoke the provided compiler in order to generate diagnostics.This also enables diagnostics by default. That is, if no compile command applies to the source file when a request comes in, the server will still try to invoke
gcc
(and if that fails,clang
) on the contents of the current buffer, with the file path being the only argument. This enables diagnostics even when nocompile_commands.json
orcompile_flags.txt
are available for the current project.Closes #138