HealsCodes / vim-gas

Advanced syntax highlighting for GNU As
BSD 3-Clause "New" or "Revised" License
143 stars 21 forks source link

No error checking #23

Closed albinahlback closed 2 years ago

albinahlback commented 2 years ago

First of all, thank you developing this package and for quickly resolving my issues.

I write here because one usually has error checking by default in C and assembly in Vim. When using this package, at least I do not get any error checking of any kind.

Now, I'm not very good at the internals of Vim, but my idea would be to use the error checking for filetype=asm and simply to expand macros and includes like in C.

HealsCodes commented 2 years ago

This syntax already provides error handling based on instruction sets - please read the documentation. What it can do is mark instructions not supported by your current target as errors:

" globally disable all x86_64 opcodes 
:let g:gasDisableOpcodes='x86_64' 

" disable SSE and SSE2 for this buffer 
let b:gasDisableOpcodes='sse sse2' 

It can't and won't ever support syntax analysis to highlight programming errors as that is the domain of language servers and language plugins, not of syntax definitions. filetype=asm can only do what it does currently having the very limited scope it does, while this syntax includes almost all generations of intel 80** CPUs as well as ARM and ARM Thumb [and possibly RISC in the future].