Skip to content
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

Merged

Conversation

puremourning
Copy link
Member

@puremourning puremourning commented Jun 26, 2019

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 Reviewable

Map GoTo, GoToDefinition, and GoToDeclaration to Jedi goto_assignments.
Add GoToType command and map it to Jedi goto_definitions.
@puremourning
Copy link
Member Author

Tried this out on ycmd codebase and it works great.

Thanks @micbou !

Copy link
Collaborator

@bstaletic bstaletic left a 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, :lgtm:.

Reviewed 12 of 12 files at r1.
Reviewable status: 1 of 2 LGTMs obtained

Copy link
Member Author

@puremourning puremourning left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 12 of 12 files at r1.
Reviewable status: :shipit: complete! 2 of 2 LGTMs obtained

@mergify
Copy link
Contributor

mergify bot commented Jun 26, 2019

Thanks for sending a PR!

1 similar comment
@mergify
Copy link
Contributor

mergify bot commented Jun 26, 2019

Thanks for sending a PR!

@codecov
Copy link

codecov bot commented Jun 26, 2019

Codecov Report

Merging #1275 into master will increase coverage by 0.03%.
The diff coverage is 100%.

@@            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

@mergify mergify bot merged commit b404550 into ycm-core:master Jun 26, 2019
@mergify
Copy link
Contributor

mergify bot commented Jun 26, 2019

Thanks for sending a PR!

bstaletic pushed a commit to bstaletic/YouCompleteMe that referenced this pull request Jul 3, 2019
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
bstaletic pushed a commit to bstaletic/YouCompleteMe that referenced this pull request Jul 4, 2019
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
bstaletic pushed a commit to bstaletic/YouCompleteMe that referenced this pull request Jul 4, 2019
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
bstaletic pushed a commit to bstaletic/YouCompleteMe that referenced this pull request Jul 4, 2019
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
bstaletic pushed a commit to bstaletic/YouCompleteMe that referenced this pull request Jul 5, 2019
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
bstaletic pushed a commit to bstaletic/ycmd that referenced this pull request Oct 19, 2019
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.
@bstaletic bstaletic mentioned this pull request Oct 19, 2019
bstaletic pushed a commit to bstaletic/ycmd that referenced this pull request Oct 19, 2019
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.
mergify bot added a commit that referenced this pull request Oct 19, 2019
ObiWahn pushed a commit to ObiWahn/ycmd that referenced this pull request Dec 2, 2019
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants