Closed gnikit closed 3 years ago
Hello,
I had the same question and I managed to find more info about this in another issue, with a functional workaround: https://github.com/hansec/fortran-language-server/issues/115#issuecomment-506767486
I simply added the PETSc types that I needed. They are now recognized as variables of PETSCINT type for example.
Just a caveat, the syntax coloration of the ::
is not done for those cas, but it is good enough for my use.
Parsing the header files for type definition would be a better solution, but I don't know where the work on this feature is.
Hi @gbogopolsky,
Thank you for the suggestion and the issue link, it is a substantial improvement from before. However, I cannot help but wonder if we could automate the parsing of the preprocessor directives by just including the Fortran header files holding these definitions. I might have a play with that idea in the near future and report any meaningful progress.
Until then, I am closing this issue. Thanks again.
Hi
I have noticed that when a variable type, like Mat or PC from PETSc is used as an input argument to a subroutine or a function or even a local variable, the language server fails to recognise it all together as a variable