nvim-tree / nvim-tree/nvim-tree.lua

Validate Array Like Table Options

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

Nobody has claimed this yet.

Dominant language
Lua
Stars
8.6k
Forks
639
Avg merge
1d 14h
Merged PRs (30d)
2

Description

Options like renderer.special_files are validated only as a table; their contents are skipped as they are array-like.

Add functionality to validate the contents, in the above case strings.

Possibility:

local ACCEPTED_TYPES = {
  renderer = {
    special_files = "string[]",
  },

See #2655 : filters.custom cannot be validated as an array or a function.

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

Start by tracing the existing option validation for renderer.special_files and compare it with the related filters.custom case in issue #2655. Check how table options are represented in ACCEPTED_TYPES and how array-like values are handled. Done means the contents of array-like options are validated, including string elements for renderer.special_files.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
40/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.