Skip to content
This repository has been archived by the owner on Feb 4, 2023. It is now read-only.

Latest commit

 

History

History
20 lines (16 loc) · 1014 Bytes

lsp-based-ides.md

File metadata and controls

20 lines (16 loc) · 1014 Bytes

Development with LSP-based IDEs (Visual Studio [Code], Vim, Sublime Text, etc.)

  1. Run python utils/bootstrap.py to download required dependencies.

  2. Create a build directory and enter it (mkdir build, cd build).

  3. Invoke CMake directly with your configuration, for example:

    cmake .. -G Ninja \
             -DCMAKE_TOOLCHAIN_FILE=../cmake/GccArmNoneEabi.cmake \
             -DCMAKE_EXPORT_COMPILE_COMMANDS=YES \
             -DBOOTLOADER=YES \
             -DPRINTER=MINI \
             -DCMAKE_BUILD_TYPE=Debug

    See the header of ./CMakeLists.txt for more command-line options (most of them are one-to-one mapped with build.py's options).

  4. And invoke ninja. It will generate a compile_commands.json file, that an LSP server can pick up and use to provide autocompletion to your editor (we recommend using ccls).

  5. Install some spell checker (optional but recommended).

This assumes you have sufficient version of cmake and ninja available in your PATH.