mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +02:00
dev/list-plugins: properly error out when parsing is unsuccessfull
This commit is contained in:
parent
0edc061a6c
commit
0fb43cbfb6
1 changed files with 9 additions and 2 deletions
|
@ -9,12 +9,15 @@ from typing import Optional
|
||||||
|
|
||||||
QUESTION_MARK = "❔"
|
QUESTION_MARK = "❔"
|
||||||
|
|
||||||
|
# Ignore files that are not plugin definitions
|
||||||
EXCLUDES: list[str] = [
|
EXCLUDES: list[str] = [
|
||||||
# Not plugin files
|
# Patterns
|
||||||
"TEMPLATE.nix",
|
"TEMPLATE.nix",
|
||||||
"colorschemes/base16/theme-list.nix",
|
|
||||||
"deprecations.nix",
|
"deprecations.nix",
|
||||||
|
"renamed-options",
|
||||||
"helpers.nix",
|
"helpers.nix",
|
||||||
|
# Specific files
|
||||||
|
"colorschemes/base16/theme-list.nix",
|
||||||
"plugins/by-name/dap/dapHelpers.nix",
|
"plugins/by-name/dap/dapHelpers.nix",
|
||||||
"plugins/by-name/efmls-configs/packages.nix",
|
"plugins/by-name/efmls-configs/packages.nix",
|
||||||
"plugins/by-name/gitsigns/options.nix",
|
"plugins/by-name/gitsigns/options.nix",
|
||||||
|
@ -194,6 +197,10 @@ def parse_file(path: str) -> Optional[Plugin]:
|
||||||
):
|
):
|
||||||
kind = Kind.VIM
|
kind = Kind.VIM
|
||||||
state = State.NEW
|
state = State.NEW
|
||||||
|
else:
|
||||||
|
raise ValueError(
|
||||||
|
f"I was not able to categorize `{path}`. Consider adding it to `EXCLUDES` or `KNOWN_PATHS`."
|
||||||
|
)
|
||||||
|
|
||||||
return Plugin(
|
return Plugin(
|
||||||
path=path,
|
path=path,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue