Skip to content

Commit

Permalink
Diagnostics disabled by default
Browse files Browse the repository at this point in the history
  • Loading branch information
pappasam committed Nov 18, 2022
1 parent 541e6d5 commit 3f85ac0
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 39 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 0.34.0

- Jls `0.39.0`
- Diagnostics are disabled by default

## 0.33.1

- Ensure every `package.json` `contributes.configuration` property has a default value. Resolves a weird parsing edge case for implied null values, and has the added benefit of making things more explicit (omitted values result in `null`, by default).
Expand Down
20 changes: 13 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ The following is a snippet of `coc-settings.json` with some defaults or with acc
"jedi.completion.disableSnippets": false,
"jedi.completion.resolveEagerly": false,
"jedi.completion.ignorePatterns": [],
"jedi.diagnostics.enable": true,
"jedi.diagnostics.enable": false,
"jedi.diagnostics.didOpen": true,
"jedi.diagnostics.didChange": true,
"jedi.diagnostics.didSave": true,
Expand Down Expand Up @@ -263,10 +263,12 @@ Regular Expression:

### jedi.diagnostics.enable

Enables (or disables) diagnostics provided by Jedi
Enables (or disables) diagnostics provided by Jedi.

- type: `boolean`
- default: `true`
- default: `false`

**Note:** This is disabled by default because Jedi's syntax checking is not supported for new syntax in Python 3.10+. For a detailed discussion on this topic, please refer to [this issue](https://github.com/pappasam/jedi-language-server/issues/187).

### jedi.diagnostics.didOpen

Expand Down Expand Up @@ -416,11 +418,13 @@ Performance optimization that sets names of folders that are ignored for `worksp

If you manually set this option, it overrides the default. Setting it to an empty array will result in no ignored folders.

## Additional Diagnostics
## Diagnostics

jedi-langugage-server provides diagnostics about syntax errors, powered by Jedi. If you would like additional diagnostics, we suggest using the powerful [diagnostic-language-server](https://github.com/iamcco/diagnostic-languageserver).
Jedi-powered diagnostics are disabled by default because Jedi's syntax checking is not supported for new syntax in Python 3.10+. For a detailed discussion on this topic, please refer to [this issue](https://github.com/pappasam/jedi-language-server/issues/187).

If using Neovim/coc, this can easily be done with [coc-diagnostic](https://github.com/iamcco/coc-diagnostic). Configure with [pylint](https://github.com/PyCQA/pylint) in your `coc-settings.json`:
If you would like diagnostics (from [pylint](https://github.com/PyCQA/pylint), [mypy](https://github.com/python/mypy), etc.), we recommend using the powerful [diagnostic-language-server](https://github.com/iamcco/diagnostic-languageserver).

If using Neovim/coc, this can easily be done with [coc-diagnostic](https://github.com/iamcco/coc-diagnostic). An example configuration for pylint in your `coc-settings.json`:

```json
"diagnostic-languageserver.filetypes": {
Expand Down Expand Up @@ -508,7 +512,7 @@ If you experience any problems with pylint you can configure [coc-diagnostic](ht

## Code Formatting

You can also use diagnostic [diagnostic-language-server](https://github.com/iamcco/diagnostic-languageserver) for code formatting:
You can also use [diagnostic-language-server](https://github.com/iamcco/diagnostic-languageserver) for code formatting:

```json
"diagnostic-languageserver.formatFiletypes": {
Expand All @@ -530,6 +534,8 @@ You can also use diagnostic [diagnostic-language-server](https://github.com/iamc
}
```

Alternatively, you can rely on non-LSP-based tooling for your code formatting needs (which I do, for performance and logging reasons). One great tool the adventurous types might consider: <https://github.com/pappasam/vim-filetype-formatter>.

## FAQ / Debugging

### No completion / goto definition while using Conda, homebrew, asdf, etc
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "coc-jedi",
"version": "0.33.1",
"version": "0.34.0",
"jlsName": "jedi-language-server",
"jlsVersion": "0.38.0",
"jlsVersion": "0.39.0",
"jlsVenv": ".venv",
"description": "coc.nvim wrapper for the jedi-language-server for Python",
"author": "Sam Roeca <[email protected]>",
Expand Down Expand Up @@ -138,7 +138,7 @@
},
"jedi.diagnostics.enable": {
"type": "boolean",
"default": true,
"default": false,
"description": "Enable (or disable) diagnostics provided by Jedi"
},
"jedi.diagnostics.didOpen": {
Expand Down
58 changes: 29 additions & 29 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@
"@types/estree" "*"

"@types/eslint@*":
version "8.4.8"
resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.4.8.tgz#720dd6a32b8219b9aba1a07b13e9d03b622695fd"
integrity sha512-zUCKQI1bUCTi+0kQs5ZQzQ/XILWRLIlh15FXWNykJ+NG3TMKMVvwwC6GP3DR1Ylga15fB7iAExSzc4PNlR5i3w==
version "8.4.10"
resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.4.10.tgz#19731b9685c19ed1552da7052b6f668ed7eb64bb"
integrity sha512-Sl/HOqN8NKPmhWo2VBEPm0nvHnu2LL3v9vKo8MEq0EtbJ4eVzGPl41VNPvn5E1i5poMk4/XD8UriLHpJvEP/Nw==
dependencies:
"@types/estree" "*"
"@types/json-schema" "*"
Expand Down Expand Up @@ -92,9 +92,9 @@
integrity sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==

"@types/node@*":
version "18.11.7"
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.7.tgz#8ccef136f240770c1379d50100796a6952f01f94"
integrity sha512-LhFTglglr63mNXUSRYD8A+ZAIu5sFqNJ4Y2fPuY7UlrySJH87rRRlhtVmMHplmfk5WkoJGmDjE9oiTfyX94CpQ==
version "18.11.9"
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.9.tgz#02d013de7058cea16d36168ef2fc653464cfbad4"
integrity sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg==

"@types/node@^13.13.1":
version "13.13.52"
Expand Down Expand Up @@ -340,9 +340,9 @@ call-bind@^1.0.0, call-bind@^1.0.2:
get-intrinsic "^1.0.2"

caniuse-lite@^1.0.30001400:
version "1.0.30001426"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001426.tgz#58da20446ccd0cb1dfebd11d2350c907ee7c2eaa"
integrity sha512-n7cosrHLl8AWt0wwZw/PJZgUg3lV0gk9LMI7ikGJwhyhgsd2Nb65vKvmSexCqq/J7rbH3mFG6yZZiPR5dLPW5A==
version "1.0.30001431"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001431.tgz#e7c59bd1bc518fae03a4656be442ce6c4887a795"
integrity sha512-zBUoFU0ZcxpvSt9IU66dXVT/3ctO1cy4y9cscs1szkPlcWb6pasYM144GqrUygUbT+k7cmUCW61cvskjcv0enQ==

chalk@^2.4.1:
version "2.4.2"
Expand Down Expand Up @@ -477,7 +477,7 @@ error-ex@^1.3.1:
dependencies:
is-arrayish "^0.2.1"

es-abstract@^1.19.0, es-abstract@^1.19.1, es-abstract@^1.19.5:
es-abstract@^1.19.0, es-abstract@^1.20.4:
version "1.20.4"
resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.20.4.tgz#1d103f9f8d78d4cf0713edcd6d0ed1a46eed5861"
integrity sha512-0UtvRN79eMe2L+UNEF1BwRe364sj/DXhQ/k5FmivgoSdpM90b8Jc0mDzKMGo7QS0BVbOP/bTwBKNnDc9rNzaPA==
Expand Down Expand Up @@ -1285,31 +1285,31 @@ spdx-license-ids@^3.0.0:
integrity sha512-rr+VVSXtRhO4OHbXUiAF7xW3Bo9DuuF6C5jH+q/x15j2jniycgKbxU09Hr0WqlSLUs4i4ltHGXqTe7VHclYWyA==

string.prototype.padend@^3.0.0:
version "3.1.3"
resolved "https://registry.yarnpkg.com/string.prototype.padend/-/string.prototype.padend-3.1.3.tgz#997a6de12c92c7cb34dc8a201a6c53d9bd88a5f1"
integrity sha512-jNIIeokznm8SD/TZISQsZKYu7RJyheFNt84DUPrh482GC8RVp2MKqm2O5oBRdGxbDQoXrhhWtPIWQOiy20svUg==
version "3.1.4"
resolved "https://registry.yarnpkg.com/string.prototype.padend/-/string.prototype.padend-3.1.4.tgz#2c43bb3a89eb54b6750de5942c123d6c98dd65b6"
integrity sha512-67otBXoksdjsnXXRUq+KMVTdlVRZ2af422Y0aTyTjVaoQkGr3mxl2Bc5emi7dOQ3OGVVQQskmLEWwFXwommpNw==
dependencies:
call-bind "^1.0.2"
define-properties "^1.1.3"
es-abstract "^1.19.1"
define-properties "^1.1.4"
es-abstract "^1.20.4"

string.prototype.trimend@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz#914a65baaab25fbdd4ee291ca7dde57e869cb8d0"
integrity sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog==
version "1.0.6"
resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz#c4a27fa026d979d79c04f17397f250a462944533"
integrity sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==
dependencies:
call-bind "^1.0.2"
define-properties "^1.1.4"
es-abstract "^1.19.5"
es-abstract "^1.20.4"

string.prototype.trimstart@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz#5466d93ba58cfa2134839f81d7f42437e8c01fef"
integrity sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg==
version "1.0.6"
resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz#e90ab66aa8e4007d92ef591bbf3cd422c56bdcf4"
integrity sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==
dependencies:
call-bind "^1.0.2"
define-properties "^1.1.4"
es-abstract "^1.19.5"
es-abstract "^1.20.4"

strip-bom@^3.0.0:
version "3.0.0"
Expand Down Expand Up @@ -1386,9 +1386,9 @@ ts-loader@^9.2.6:
semver "^7.3.4"

typescript@^4.4.3:
version "4.8.4"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.4.tgz#c464abca159669597be5f96b8943500b238e60e6"
integrity sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==
version "4.9.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.3.tgz#3aea307c1746b8c384435d8ac36b8a2e580d85db"
integrity sha512-CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA==

unbox-primitive@^1.0.2:
version "1.0.2"
Expand Down Expand Up @@ -1463,9 +1463,9 @@ webpack-sources@^3.2.3:
integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==

webpack@^5.56.0:
version "5.74.0"
resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.74.0.tgz#02a5dac19a17e0bb47093f2be67c695102a55980"
integrity sha512-A2InDwnhhGN4LYctJj6M1JEaGL7Luj6LOmyBHjcI8529cm5p6VXiTIW2sn6ffvEAKmveLzvu4jrihwXtPojlAA==
version "5.75.0"
resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.75.0.tgz#1e440468647b2505860e94c9ff3e44d5b582c152"
integrity sha512-piaIaoVJlqMsPtX/+3KTTO6jfvrSYgauFVdt8cr9LTHKmcq/AMd4mhzsiP7ZF/PGRNPGA8336jldh9l2Kt2ogQ==
dependencies:
"@types/eslint-scope" "^3.7.3"
"@types/estree" "^0.0.51"
Expand Down

0 comments on commit 3f85ac0

Please sign in to comment.