vectordotdev / vectordotdev/vector

Support autocompletion when editing Vector's configs in popular text editors

Open
#2,264 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

domain: config have: nice meta: idea
Dominant language
Rust
Stars
22.6k
Forks
2.3k
Avg merge
1d 7h
Merged PRs (30d)
146

Description

Editing complex Vector configs can be greatly facilitated by auto-completion. Because Vector's configs have static schema, it should be possible to perform context-aware completion for configuration options and enums values.

The users would be able to open a config and have names of configuration options and values of enums automatically complied. Additionally, it could be benifitial to highlight configuration options names that violate the schema, to make it easier to identify typos.

I think implementation of this could be split into two parts:

  • Add a subcommand to Vector that would implement an autocompletion protocol.
  • Implement support for this for some popular text editors, for example Emacs and Vim.

The architecture can be kept simple, so that Vector's executable is invoked each time the autocompletion is requested (i.e. no long-running server processes). Alternatively, it might be possible to implement language server protocol on the Vector's side and recommend using community-provided editor's extensions. However, this protocol is somewhat complex by itself, so this option has to be weighed against simpler ones.

Contributor guide

Open the contributing guide

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.

Research direction

The issue names no files, tests, or entry points. Start by reviewing Vector's command structure and the proposed completion protocols, then decide whether to define a Vector subcommand or language-server approach and which editor integrations to support. Done means context-aware schema and enum completion, with schema violations highlighted where supported.

Written by the indexing model from the issue text.

Assessment

Tech stack
emacs, rust, vim
Domain
developer-experience, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.