New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[READY] Remap GoTo commands in Python completer #1275
[READY] Remap GoTo commands in Python completer #1275
Conversation
Map GoTo, GoToDefinition, and GoToDeclaration to Jedi goto_assignments. Add GoToType command and map it to Jedi goto_definitions.
Tried this out on ycmd codebase and it works great. Thanks @micbou ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, despite the Jedi API being really confusing regarding these things, .
Reviewed 12 of 12 files at r1.
Reviewable status: 1 of 2 LGTMs obtained
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 12 of 12 files at r1.
Reviewable status: complete! 2 of 2 LGTMs obtained
Thanks for sending a PR! |
1 similar comment
Thanks for sending a PR! |
Codecov Report
@@ Coverage Diff @@
## master #1275 +/- ##
==========================================
+ Coverage 97.19% 97.22% +0.03%
==========================================
Files 96 96
Lines 7414 7433 +19
Branches 153 153
==========================================
+ Hits 7206 7227 +21
+ Misses 167 165 -2
Partials 41 41 |
Thanks for sending a PR! |
ycm-core/ycmd#1275 Remap python GoTo* commands ycm-core/ycmd#1274 Migrate to Omnisharp-Roslyn ycm-core/ycmd#1239 Error ID in diagnostic messages ycm-core/ycmd#1267 Clangd extra conf support ycm-core/ycmd#1266 JDT update to 0.40.0 ycm-core/ycmd#1245 Generic (pluggable) LSP completer support ycm-core/ycmd#1263 Support JDT extensions ycm-core/ycmd#1261 Typescript update ycm-core/ycmd#1264 [vimspector](/puremourning/vimspector) configuration ycm-core/ycmd#1262 Multi-user installation ycm-core/ycmd#1243 Migrate to GOPLS ycm-core/ycmd#1249 Support MSVC 16 (VS2019) ycm-core/ycmd#1224 Migrate to RLS
ycm-core/ycmd#1275 Remap python GoTo* commands ycm-core/ycmd#1274 Migrate to Omnisharp-Roslyn ycm-core/ycmd#1239 Error ID in diagnostic messages ycm-core/ycmd#1267 Clangd extra conf support ycm-core/ycmd#1266 JDT update to 0.40.0 ycm-core/ycmd#1245 Generic (pluggable) LSP completer support ycm-core/ycmd#1263 Support JDT extensions ycm-core/ycmd#1261 Typescript update ycm-core/ycmd#1264 [vimspector](/puremourning/vimspector) configuration ycm-core/ycmd#1262 Multi-user installation ycm-core/ycmd#1243 Migrate to GOPLS ycm-core/ycmd#1249 Support MSVC 16 (VS2019) ycm-core/ycmd#1224 Migrate to RLS
ycm-core/ycmd#1275 Remap python GoTo* commands ycm-core/ycmd#1274 Migrate to Omnisharp-Roslyn ycm-core/ycmd#1239 Error ID in diagnostic messages ycm-core/ycmd#1267 Clangd extra conf support ycm-core/ycmd#1266 JDT update to 0.40.0 ycm-core/ycmd#1245 Generic (pluggable) LSP completer support ycm-core/ycmd#1263 Support JDT extensions ycm-core/ycmd#1261 Typescript update ycm-core/ycmd#1264 [vimspector](/puremourning/vimspector) configuration ycm-core/ycmd#1262 Multi-user installation ycm-core/ycmd#1243 Migrate to GOPLS ycm-core/ycmd#1249 Support MSVC 16 (VS2019) ycm-core/ycmd#1224 Migrate to RLS
ycm-core/ycmd#1275 Remap python GoTo* commands ycm-core/ycmd#1274 Migrate to Omnisharp-Roslyn ycm-core/ycmd#1239 Error ID in diagnostic messages ycm-core/ycmd#1267 Clangd extra conf support ycm-core/ycmd#1266 JDT update to 0.40.0 ycm-core/ycmd#1245 Generic (pluggable) LSP completer support ycm-core/ycmd#1263 Support JDT extensions ycm-core/ycmd#1261 Typescript update ycm-core/ycmd#1264 [vimspector](/puremourning/vimspector) configuration ycm-core/ycmd#1262 Multi-user installation ycm-core/ycmd#1243 Migrate to GOPLS ycm-core/ycmd#1249 Support MSVC 16 (VS2019) ycm-core/ycmd#1224 Migrate to RLS
ycm-core/ycmd#1275 Remap python GoTo* commands ycm-core/ycmd#1274 Migrate to Omnisharp-Roslyn ycm-core/ycmd#1239 Error ID in diagnostic messages ycm-core/ycmd#1267 Clangd extra conf support ycm-core/ycmd#1266 JDT update to 0.40.0 ycm-core/ycmd#1245 Generic (pluggable) LSP completer support ycm-core/ycmd#1263 Support JDT extensions ycm-core/ycmd#1261 Typescript update ycm-core/ycmd#1264 [vimspector](/puremourning/vimspector) configuration ycm-core/ycmd#1262 Multi-user installation ycm-core/ycmd#1243 Migrate to GOPLS ycm-core/ycmd#1249 Support MSVC 16 (VS2019) ycm-core/ycmd#1224 Migrate to RLS
PR ycm-core#1275 broke GoTo in python in more ways than one. See: - ycm-core/YouCompleteMe#3458 - ycm-core#1341 Changes in the behaviour: - GoTo, GoToDefinition and GoToDeclaration now do what GoToType used to do. - We don't expose jedi's `goto_assignments` which can be useful, but we do have GoToReferences that calls jedi's `usages()`. - This means that `GoTo` on `self.x` will now jump to the definition of the type of `x`, while `GoToReferences` will do what is expected. - The `goto_usages` for this case returns "weird" locations, see ycm-core#1341 for details.
PR ycm-core#1275 broke GoTo in python in more ways than one. See: - ycm-core/YouCompleteMe#3458 - ycm-core#1341 Changes in the behaviour: - GoTo, GoToDefinition and GoToDeclaration now do what GoToType used to do. - We don't expose jedi's `goto_assignments` which can be useful, but we do have GoToReferences that calls jedi's `usages()`. - This means that `GoTo` on `self.x` will now jump to the definition of the type of `x`, while `GoToReferences` will do what is expected. - The `goto_usages` for this case returns "weird" locations, see ycm-core#1341 for details.
PR ycm-core#1275 broke GoTo in python in more ways than one. See: - ycm-core/YouCompleteMe#3458 - ycm-core#1341 Changes in the behaviour: - GoTo, GoToDefinition and GoToDeclaration now do what GoToType used to do. - We don't expose jedi's `goto_assignments` which can be useful, but we do have GoToReferences that calls jedi's `usages()`. - This means that `GoTo` on `self.x` will now jump to the definition of the type of `x`, while `GoToReferences` will do what is expected. - The `goto_usages` for this case returns "weird" locations, see ycm-core#1341 for details.
Map GoTo, GoToDefinition, and GoToDeclaration to Jedi goto_assignments.
Add GoToType command and map it to Jedi goto_definitions.
Rebases #1200 on master.
This change is