vim: Maybe suggest using compile_commands.json instead of platformio init?

Open
#387 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
55/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Stale
Tech stack
vim
Domain
documentation

Research direction

Start with integration/ide/vim.rst and compare its pio init/.ccls instructions with the reported pio run -t compiledb workflow. Check whether the documentation should describe compile_commands.json for library indexing, then verify the revised guidance with the cited ccls and Vim LSP commands.

Written by the indexing model from the issue text.

Description

The vim documentation

https://github.com/platformio/platformio-docs/blob/develop/integration/ide/vim.rst

suggests generating a .ccls file via pio init. For me, this wasn't working, as I was getting "declaration not found" (using e.g. :LspPeekDeclaration) only. What did help for me was running pio run -t compiledb.

I'm not sure why, running ccls --index=. with the pio-ide-vim approach suggests only my own files are indexed, not the library ones.
With the compiledb approach (and deleting .ccls), libraries are indexed as well.

Should the documentation be updated?

Dominant language
Python
Stars
288
Forks
361
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from platformio/platformio-docs

All issues in platformio/platformio-docs

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.