Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@lgeiger
Copy link
Contributor

@lgeiger lgeiger commented Sep 22, 2017

This PR adds a new config option to allow users to configure if symbols from all scopes are shown or not.

This was originally brought up on the ide-python package for Atom: atom-community/ide-python#11

all_scopes=false (default / old behavior)

all_scopes=false (default)

all_scopes=true

 all_scopes=true

Note: I'm using Atom to test this and haven't tried the VSCode plugin, but judging from the existing config options this should work as expected.

@palantirtech
Copy link
Member

Thanks for your interest in palantir/python-language-server, @lgeiger! Before we can accept your pull request, you need to sign our contributor license agreement - just visit https://cla.palantir.com/ and follow the instructions. Once you sign, I'll automatically update this pull request.

@gatesn
Copy link
Contributor

gatesn commented Sep 23, 2017

I’m not opposed to turning this on by default if you think it makes sense?

Wonder if we can get a better list of symbols though, as this seems to include method parameters.

@gatesn
Copy link
Contributor

gatesn commented Sep 25, 2017

@lgeiger thanks very much for this! Looks good. If you could change the default to true (not too fussed about changing existing behaviour since we're still pre-1.x), then I'd be happy to merge this.

@lgeiger
Copy link
Contributor Author

lgeiger commented Sep 27, 2017

Sorry for the late reply.

Wonder if we can get a better list of symbols though, as this seems to include method parameters.

Unfortunately this seams to be jedi's fault. When calling jedi_names with all_scopes=false on:

def test(param1, param2):
    pass

It also returns both test, param1 and param2.

@lgeiger thanks very much for this! Looks good. If you could change the default to true (not too fussed about changing existing behaviour since we're still pre-1.x), then I'd be happy to merge this.

👍 I'll change that.

I've been experimenting with properly structuring the symbols using containerName but I'm getting strange UI behavior in conjunction with Atom's language server plugin. I'll submit another PR once I know if the bug is inside my code or comes from Atom's language server plugin.

@gatesn gatesn merged commit a1bbd40 into palantir:develop Sep 27, 2017
@lgeiger lgeiger deleted the jedi_all_scopes branch September 27, 2017 13:26
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.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.