Title: CompletionItemKind of 0 (None) causes language server clients to fail · Issue #1531 · microsoft/python-language-server · GitHub
Open Graph Title: CompletionItemKind of 0 (None) causes language server clients to fail · Issue #1531 · microsoft/python-language-server
X Title: CompletionItemKind of 0 (None) causes language server clients to fail · Issue #1531 · microsoft/python-language-server
Description: Environment data Language Server version: master branch (last compiled on 51b2532ddc0161aecadda182b33f1b15ed6093b0 OS and version: MacOS 10.14.6 Python version (& distribution if applicable, e.g. Anaconda): 3.7.4 Expected behaviour Pytho...
Open Graph Description: Environment data Language Server version: master branch (last compiled on 51b2532ddc0161aecadda182b33f1b15ed6093b0 OS and version: MacOS 10.14.6 Python version (& distribution if applicable, e.g. A...
X Description: Environment data Language Server version: master branch (last compiled on 51b2532ddc0161aecadda182b33f1b15ed6093b0 OS and version: MacOS 10.14.6 Python version (& distribution if applicable, e....
Opengraph URL: https://github.com/microsoft/python-language-server/issues/1531
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"CompletionItemKind of 0 (None) causes language server clients to fail","articleBody":"\u003c!-- \r\nRead the guidelines for filing an issue first. \r\n\r\nhttps://github.com/microsoft/python-language-server/blob/master/TROUBLESHOOTING.md#filing-an-issue\r\n-->\r\n\r\n## Environment data\r\n\u003c!--\r\nTo find your version: \r\n\r\nSelect \"View: Toggle Output\" from the command palette (Ctrl+Shift+P on Windows/Linux, Command+Shift+P on macOS), then select \"Python\" in the dropdown on the right (\"Python Language Server\" if running Insiders build of VS Code). Look for the line Microsoft Python Language Server version X in the console.\r\n-->\r\n\r\n- Language Server version: `master` branch (last compiled on `51b2532ddc0161aecadda182b33f1b15ed6093b0`\r\n- OS and version: MacOS 10.14.6\r\n- Python version (& distribution if applicable, e.g. Anaconda): 3.7.4\r\n\r\n## Expected behaviour\r\n\r\nPython Language Server emits valid completion items.\r\n\r\n## Actual behaviour\r\n\r\nPython Language Server emits completion items with `kind` value of `0` as described in https://github.com/autozimu/LanguageClient-neovim/issues/633#issuecomment-515240338\r\n\r\nZero is not a valid `CompletionItemKind` according to the Language Server specification\r\nhttps://microsoft.github.io/language-server-protocol/specification\r\n\r\n>```\r\n>/**\r\n> * The kind of a completion entry.\r\n> */\r\n>namespace CompletionItemKind {\r\n>\texport const Text = 1;\r\n>\texport const Method = 2;\r\n>\texport const Function = 3;\r\n>\texport const Constructor = 4;\r\n>\texport const Field = 5;\r\n>\texport const Variable = 6;\r\n>\texport const Class = 7;\r\n>\texport const Interface = 8;\r\n>\texport const Module = 9;\r\n>\texport const Property = 10;\r\n>\texport const Unit = 11;\r\n>\texport const Value = 12;\r\n>\texport const Enum = 13;\r\n>\texport const Keyword = 14;\r\n>\texport const Snippet = 15;\r\n>\texport const Color = 16;\r\n>\texport const File = 17;\r\n>\texport const Reference = 18;\r\n>\texport const Folder = 19;\r\n>\texport const EnumMember = 20;\r\n>\texport const Constant = 21;\r\n>\texport const Struct = 22;\r\n>\texport const Event = 23;\r\n>\texport const Operator = 24;\r\n>\texport const TypeParameter = 25;\r\n>}\r\n>```\r\n\r\nThe result of Python Language Server emitting completion items with `\"kind\":0` breaks completion for language clients, like LanguageClient-neovim, that are set up to handle the Language Client spec.\r\n\r\n## Logs\r\n\r\nN/A\r\n\r\n## Code Snippet / Additional lnformation\r\n\r\n\u003c!--\r\nNote: If you think a GIF of what is happening would be helpful, consider tools like https://www.cockos.com/licecap/, https://github.com/phw/peek or https://www.screentogif.com/ .\r\n-->\r\n\r\nThe example I gave in https://github.com/autozimu/LanguageClient-neovim/issues/633#issuecomment-515240338 was\r\n\r\n```python\r\nimport logging\r\n\r\nlogging.getLogge\r\n```\r\n\r\n\r\n","author":{"url":"https://github.com/gotgenes","@type":"Person","name":"gotgenes"},"datePublished":"2019-09-10T03:43:01Z","url":"https://github.com/microsoft/python-language-server/issues/1531"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:8713ce9b-3eaa-762b-12f5-5804fbb73205 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EC28:37D9F:350764:47C058:6AFE526C |
| html-safe-nonce | 6406871516a3f0a8a4956a5e13aa4009be41c64ee33ff9604b62766592ba7328 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQzI4OjM3RDlGOjM1MDc2NDo0N0MwNTg6NkFGRTUyNkMiLCJ2aXNpdG9yX2lkIjoiNzYyOTk5NjYyMDI5MTk3OTMyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | b36c5d7417c41de1dd3ddc29c0fb14a7937da7167bcbc10504ce0004623c08d5 |
| hovercard-subject-tag | issue:491433029 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/python-language-server/1531/issue_layout |
| twitter:image | https://opengraph.githubassets.com/85418a79a1a7a914389d044a9b10f8c01feb3765dd6a464b8f4eae7a0dc5111c/microsoft/python-language-server/issues/1531 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/85418a79a1a7a914389d044a9b10f8c01feb3765dd6a464b8f4eae7a0dc5111c/microsoft/python-language-server/issues/1531 |
| og:image:alt | Environment data Language Server version: master branch (last compiled on 51b2532ddc0161aecadda182b33f1b15ed6093b0 OS and version: MacOS 10.14.6 Python version (& distribution if applicable, e.g. A... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | gotgenes |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3ad2b58e42f481583284b895305360b61b0223636c9dde6d696b575347163a26 |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/python-language-server git https://github.com/microsoft/python-language-server.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 145901977 |
| octolytics-dimension-repository_nwo | microsoft/python-language-server |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 145901977 |
| octolytics-dimension-repository_network_root_nwo | microsoft/python-language-server |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8df44dbe1c8091b38c3e0165c05a1e5c1563762e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width