@yaegassy/coc-mypy
yaegassymicrosoft/vscode-mypy’s language server extension for coc.nvim.
Published Package Summary
coc-mypy
microsoft/vscode-mypy's langauge server extension for coc.nvim.
Install
CocInstall:
:CocInstall @yaegassy/coc-mypy
When using a plugin manager, etc:
e.g. vim-plug
Plug 'yaegassy/coc-mypy', {'do': 'yarn install --frozen-lockfile'}
Server Install
coc-mypy allows you to create an extension-only "venv" and install microsoft/vscode-mypy's langauge server.
When using coc-mypy for the first time, if microsoft/vscode-mypy's langauge server is not present in the runtime environment, you will be prompted to do a built-in install.
To use the built-in installation feature, execute the following command.
:CocCommand mypy-type-checker.installServer
Note
Use "dmypy" or "mypy"
The microsoft/vscode-mypy language server uses dmypy by default. If you want to use mypy, set mypy-type-checker.useDmypy to false.
coc-settings.json:
{
"mypy-type-checker.useDmypy": false
}
[Use dmypy] Vim/Neovim will exit a little slower
If you are using dmypy, the process of killing the dmypy process is included when Vim/Neovim exits. This may slow down the Vim/Neovim exit process slightly.
[Use mypy] Initial Diagnostic Display
The mypy command takes time to complete execution if the cache file for mypy does not exist. In other words, the first time it is executed, it takes time.
The same is true if you are using a language server, so it will take some time to display the initial diagnostics.
Thanks
License
MIT
This extension is built with create-coc-extension
- microsoft/vscode-mypy’s language server extension for coc.nvim.
- onLanguage:python
Want to build, test, or contribute to coc.nvim extensions? Explore our official SDK and testing toolkits.
Open Developer GuideVersion History
This published npm package does not include a history.md or changelog.md file. Browse its npm versions or repository releases for available release information.
Contributed Commands
All contributes.commands entries from the published package manifest for @yaegassy/coc-mypy@0.2.1.
| Command (:CocCommand) | Description |
|---|---|
| mypy-type-checker.restart | Restart Server |
| mypy-type-checker.installServer | Install Server |
| mypy-type-checker.showOutput | Show output channel |
| mypy-type-checker.version | Show the version of the server installed by the extension |
Configuration Schema
All contributes.configuration entries from the published package manifest, including each raw property schema for coc-settings.json.
Raw JSON Schema
{
"type": "array",
"items": {
"type": "string"
},
"scope": "resource",
"default": [],
"markdownDescription": "Arguments passed in. Each argument is a separate string in the array."
}Raw JSON Schema
{
"type": "array",
"items": {
"type": "string"
},
"scope": "resource",
"default": [],
"markdownDescription": "When set to a path to `mypy` binary, extension will use that for linting. NOTE: Using this option may slowdown linting."
}Raw JSON Schema
{
"type": "boolean",
"default": true,
"description": "Enable coc-mypy extension."
}Raw JSON Schema
{
"type": "object",
"scope": "resource",
"default": {
"note": "Information",
"error": "Error"
},
"markdownDescription": "Mapping from severity of `mypy` message type to severity shown in problem window.",
"additionalProperties": {
"enum": [
"Error",
"Hint",
"Information",
"Warning"
],
"type": "string"
}
}Raw JSON Schema
{
"type": "boolean",
"default": true,
"description": "Use dmypy deamon mode as the linting command run by microsoft/vscode-mypy's language server."
}Raw JSON Schema
{
"type": "array",
"items": {
"type": "string"
},
"scope": "resource",
"default": [],
"markdownDescription": "When set to a path to python executable, extension will use that to launch the server and any subprocess."
}Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": true,
"markdownDescription": "When set to true, `dmypy` is preferred over `mypy`; otherwise, `mypy` is preferred. This setting will be overridden if `mypy-type-checker.path` is set. NOTE: Setting this option to false may slowdown linting."
}Raw JSON Schema
{
"enum": [
"off",
"messages",
"verbose"
],
"type": "string",
"default": "off",
"description": "Traces the communication between coc.nvim and the language server."
}Raw JSON Schema
{
"type": "array",
"items": {
"type": "string"
},
"scope": "resource",
"default": [],
"description": "Configure glob patterns to exclude files or folders from being type checked by Mypy."
}Raw JSON Schema
{
"enum": [
"useBundled",
"fromEnvironment"
],
"type": "string",
"scope": "window",
"default": "fromEnvironment",
"markdownDescription": "Defines where `mypy` is imported from. This setting may be ignored if `mypy-type-checker.path` is set.",
"markdownEnumDescriptions": [
"Always use the bundled version of `mypy`.",
"Use `mypy` from environment, fallback to bundled version only if `mypy` not available in the environment."
]
}Raw JSON Schema
{
"enum": [
"file",
"workspace"
],
"type": "string",
"scope": "resource",
"default": "file",
"markdownDescription": "Defines the scope of the problems reported by the extension.",
"markdownEnumDescriptions": [
"Problems are reported for the files open in the editor only.",
"Problems are reported for files in the workspace."
]
}Raw JSON Schema
{
"type": "string",
"default": "",
"markdownDescription": "(DEV) Set server script path."
}Raw JSON Schema
{
"enum": [
"off",
"onError",
"onWarning",
"always"
],
"type": "string",
"scope": "machine",
"default": "off",
"markdownDescription": "Controls when notifications are shown by this extension.",
"markdownEnumDescriptions": [
"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.",
"Notifications are show for anything that the server chooses to show."
]
}Raw JSON Schema
{
"type": "string",
"default": "",
"description": "Python 3.x path (Absolute path) to be used for built-in install."
}Raw JSON Schema
{
"type": "string",
"default": "",
"markdownDescription": "(DEV) Set the python interpreter where the server is installed."
}Raw JSON Schema
{
"type": "boolean",
"default": true,
"description": "Whether to display the code action for open the Mypy rule documentation web page included in the diagnostic information."
}