@bratel/coc-black-formatter
Version:
microsoft/vscode-black-formatter’s langauge server extension for coc.nvim.
223 lines (222 loc) • 6.92 kB
JSON
{
"name": "@bratel/coc-black-formatter",
"version": "0.2.6",
"vscodeBlackFormatterVersion": "v2025.2.0",
"description": "microsoft/vscode-black-formatter’s langauge server extension for coc.nvim.",
"author": "lsq <lsqypj@gmail.com>",
"license": "MIT",
"main": "lib/index.js",
"files": [
"lib/index.js",
"server",
"scripts/upstream-tags-check.mjs"
],
"keywords": [
"coc.nvim",
"python",
"python3",
"black",
"formatting",
"coc-black",
"vim",
"neovim"
],
"engines": {
"coc": "^0.0.80"
},
"repository": {
"type": "git",
"url": "https://github.com/lsq/coc-black-formatter"
},
"publishConfig": {
"access": "public"
},
"scripts": {
"tags-get": "curl -o resources/vscode-black-formatter-tags.json https://api.github.com/repos/microsoft/vscode-black-formatter/tags",
"tags-check": "node scripts/upstream-tags-check.mjs",
"lint": "eslint src --ext ts",
"clean": "rimraf lib",
"watch": "node esbuild.js --watch",
"build": "node esbuild.js",
"prepare": "node esbuild.js"
},
"prettier": {
"singleQuote": true,
"printWidth": 120,
"semi": true
},
"devDependencies": {
"@dking/dgit": "^0.0.12",
"@types/node": "^24.10.1",
"@types/node-fetch": "^2.6.13",
"@types/rimraf": "^4.0.5",
"@types/which": "^3.0.4",
"@typescript-eslint/eslint-plugin": "^8.47.0",
"@typescript-eslint/parser": "^8.47.0",
"coc.nvim": "^0.0.83-next.19",
"esbuild": "^0.25.0",
"eslint": "^9.39.0",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-prettier": "^5.5.4",
"extract-zip": "^2.0.1",
"https-proxy-agent": "^7.0.6",
"node-fetch": "^2.7.0",
"prettier": "^3.6.2",
"rimraf": "^6.1.2",
"typescript": "^5.7.3",
"which": "^6.0.0"
},
"activationEvents": [
"onLanguage:python"
],
"contributes": {
"rootPatterns": [
{
"filetype": "python",
"patterns": [
".black",
"pyproject.toml",
"setup.py",
"setup.cfg",
"tox.ini",
"Pipfile",
"requirements.txt"
]
}
],
"configuration": {
"type": "object",
"title": "coc-black-formatter configuration",
"properties": {
"black-formatter.enable": {
"type": "boolean",
"default": true,
"description": "Enable coc-black-formatter extension."
},
"black-formatter.useDetectBlackCommand": {
"type": "boolean",
"default": true,
"description": "Automatically detects the black command in the execution environment and sets `black-formatter.path`."
},
"black-formatter.useGlobalCommand": {
"type": "boolean",
"default": false,
"description": "Automatically detects the black command in the execution environment and sets `black-formatter.path`."
},
"black-formatter.builtin.pythonPath": {
"type": "string",
"default": "",
"description": "Python 3.x path (Absolute path) to be used for built-in install."
},
"black-formatter.dev.serverInterpreter": {
"type": "string",
"default": "",
"markdownDescription": "(DEV) Set the python interpreter where the server is installed."
},
"black-formatter.dev.serverScript": {
"type": "string",
"default": "",
"markdownDescription": "(DEV) Set server script path."
},
"black-formatter.args": {
"default": [],
"items": {
"type": "string"
},
"markdownDescription": "Arguments passed in. Each argument is a separate string in the array.",
"scope": "resource",
"type": "array"
},
"black-formatter.importStrategy": {
"default": "useBundled",
"enum": [
"fromEnvironment",
"useBundled"
],
"markdownDescription": "Defines where `black` is imported from. This setting may be ignored if `black-formatter.path` is set.",
"markdownEnumDescriptions": [
"Use `black` from environment, fallback to bundled version only if `black` not available in the environment.",
"Always use the bundled version of `black`."
],
"scope": "resource",
"type": "string"
},
"black-formatter.interpreter": {
"default": [],
"items": {
"type": "string"
},
"markdownDescription": "When set to a path to python executable, extension will use that to launch the server and any subprocess.",
"scope": "resource",
"type": "array"
},
"black-formatter.path": {
"default": [],
"examples": [
[
"-m",
"black",
"~/.env/python"
],
[
"~/global_env/black"
]
],
"items": {
"type": "string"
},
"markdownDescription": "When set to a path to `black` binary, extension will use that for linting. NOTE: Using this option may slowdown linting.",
"scope": "resource",
"type": "array"
},
"black-formatter.showNotifications": {
"default": "off",
"enum": [
"always",
"off",
"onError",
"onWarning"
],
"markdownDescription": "Controls when notifications are shown by this extension.",
"markdownEnumDescriptions": [
"Notifications are show for anything that the server chooses to show.",
"All notifications are turned off, any errors or warning are still available in the logs.",
"Notifications are shown only in the case of an error.",
"Notifications are shown for errors and warnings."
],
"scope": "machine",
"type": "string"
},
"black-formatter.trace.server": {
"type": "string",
"enum": [
"off",
"messages",
"verbose"
],
"default": "off",
"description": "Traces the communication between coc.nvim and the language server."
}
}
},
"commands": [
{
"title": "Restart Server",
"command": "black-formatter.restart"
},
{
"title": "Install Server",
"command": "black-formatter.installServer"
},
{
"title": "Show output channel",
"command": "black-formatter.showOutput"
},
{
"title": "Show the version of the server installed by the extension",
"command": "black-formatter.version"
}
]
},
"packageManager": "yarn@1.22.19+sha1.4ba7fc5c6e704fce2066ecbfb0b0d8976fe62447"
}