foam-language-server icon indicating copy to clipboard operation
foam-language-server copied to clipboard

Implement auto-completion with valid entries from solver errors

Open FoamScience opened this issue 4 years ago • 0 comments

Valid entries returned in Fatal Error as completion candidates

  • Press "space/tab" after a keyword
  • The language server inserts a dummy value; runs the solver and collects "Valid entries/models"
  • Return valid entries as completion candidates

Additional context

  • As diagnostics coming from OpenFOAM errors are not document-wise, the code has to check the document URI and cursor position before providing any candidates
  • What to add as dummy value is tricky. Particularly, deciding when to add ";" will be problematic.
  • Including valid entries shipped in custom shared libraries ($FOAM_USER_LIBBIN) can also be considered
    • With (possibly) automatic adding of the correct library to controlDict

FoamScience avatar Jan 02 '22 20:01 FoamScience