No IDE no headache;
(Neo)VIM for the lazy Foamer

The stable stuff!

We’ll walk you through setting up your NeoVIM to work more effectively with OpenFOAM case files!

  • Here is an example NeoVim config.
  • There is also a foamscience/foam-language-server:latest Docker image which has all required software.
Stable features
  1. Fast and fault-tolerant syntax highlighting using TreeSitter grammar
    • Native handling of C++ code blocks
  2. Hustle-free folding
  3. Syntax-aware text objects
  4. Smart syntax-aware text subjects
  5. Context display

Notes to remember

  • Every feature has a demo, make sure to scroll down to view it

  • NeoVIM-specific technology is used here but everything is easy to replicate in other editors, or even with (Neo)VIM using other plugins

  • You need at least NeoVim 0.6.0+

1. Syntax highlighting

Highlighting C++ code blocks

Expression-based folding

Syntax-aware text objects

Smart Text subjects

Context display

The UNstable stuff!

LSP features are still under development; but kind of useful already.

  • Expect frequent changes
  • Here, we’re using NeoVim’s native LSP client
  • The following works also with VS-Code through this extension

Get the language server working!

Before showing you the features

  • Please file bug reports if any unwanted behavior is observed.
  • Or even better, solve the issues, and PR!
  • You’re also welcome to discuss any suggestions or feature requests you/others might have.
  • You probably have all the following commands mapped to some keys, find them with :map

Auto-Completion

Jump to definition

Hover documentation

Signature help

Document symbols

Diagnostics

Next steps

  • Better parsing performance
    • Eventually, switch to native node bindings (using WASM bindings for now).
    • Goal: No waiting time for full-case workspace symbols.
  • Better server performance
    • Async-do everything