You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 14, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 14, 2022. It is now read-only.
python.autoComplete.addBrackets does not work #868
Using Microsoft Python Language Server version 0.2.41.0, the setting python.autoComplete.addBrackets does not add parentheses for functions such as "print" and "input". Switching back to jedi fixes the issue.
I tried to find out where the settings.json files was located like so:
esn89shell: find . -type f -name "settings.json"
~/.config/nvim/plugged/coc.nvim/node_modules/vscode-uri/.vscode/settings.json
~/.config/nvim/plugged/coc.nvim/node_modules/vscode-languageserver/node_modules/vscode-uri/.vscode/settings.json
And inside both of these files, I added:
"python.autoComplete.addBrackets": true
and still had no luck getting it to work. Any ideas?
The commit looks like the extension, not the LS. Adding brackets works if you type pri and then TAB from the completion list. I get print() inserted. How it works is that LS returns print($0) snippet as insertion text for the print label. Does vim handle snippets in the language server protocol?
The language server itself is working but I am unable to find a settings.json file in repository that I cloned. can I just touch settings.json somewhere? If so, where should the settings.json be located?
the setting python.autoComplete.addBrackets does not add parentheses for functions such as "print" and "input". Switching back to jedi fixes the issue.
I am having the same issue.
"python.pythonPath": "/usr/local/bin/python3",
"python.languageServer": "Microsoft",
"python.autoComplete.addBrackets": true
VS Code
Version: 1.48.0
Commit: db40434f562994116e5b21c24015a2e40b2504e6
Date: 2020-08-13T08:03:27.059Z (3 days ago)
Electron: 7.3.2
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Darwin x64 19.6.0
Activity
esn89 commentedon Apr 3, 2019
Can confirm. Using this with the 2019.1 release on neovim
esn89 commentedon Jun 22, 2019
Thanks for the fix and close. To get this to work, it is a simple matter of adding this option to the settings file?
jakebailey commentedon Jun 24, 2019
To have brackets auto added, yes. It's not enabled by default.
esn89 commentedon Nov 20, 2019
I'm using the language server from coc.nvim and they have a fork of this commit:
microsoft/vscode-python@16899f6
I tried to find out where the settings.json files was located like so:
MikhailArkhipov commentedon Nov 20, 2019
The commit looks like the extension, not the LS. Adding brackets works if you type
priand then TAB from the completion list. I getprint()inserted. How it works is that LS returnsprint($0)snippet as insertion text for theprintlabel. Doesvimhandle snippets in the language server protocol?esn89 commentedon Nov 21, 2019
Thanks Mikhail Arkhipov (@MikhailArkhipov)
You are right, maybe it is a commit not related to MPLS. I was just wondering because I remember in a commit to master, you have fixed:
#1241
Unfortunately, in mine it does not work with tab/print.
I am actually using a version of it that's built manually via the instructions here: https://github.com/microsoft/python-language-server/blob/master/CONTRIBUTING.md#setup
The language server itself is working but I am unable to find a
settings.jsonfile in repository that I cloned. can I justtouch settings.jsonsomewhere? If so, where should the settings.json be located?Brodersen commentedon Aug 13, 2020
This should be reopened as it is still not working :(
MikhailArkhipov commentedon Aug 13, 2020
Which specific example does not work?
Brodersen commentedon Aug 14, 2020
For example this one:
MikhailArkhipov commentedon Aug 14, 2020
What Python version is selected?
Brodersen commentedon Aug 14, 2020
Python 3.8.5
CzJLee commentedon Aug 16, 2020
I am having the same issue.
"python.pythonPath": "/usr/local/bin/python3",
"python.languageServer": "Microsoft",
"python.autoComplete.addBrackets": true
VS Code
Version: 1.48.0
Commit: db40434f562994116e5b21c24015a2e40b2504e6
Date: 2020-08-13T08:03:27.059Z (3 days ago)
Electron: 7.3.2
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Darwin x64 19.6.0
MikhailArkhipov commentedon Aug 18, 2020
Something changed either in protocol or core extension. PR #2113
MikhailArkhipov commentedon Aug 18, 2020
Gabriel Brodersen (@Brodersen), Christian Lee (@CzJLee) - what is your Python extension version?
MikhailArkhipov commentedon Aug 18, 2020
Looks like there was a bug in pre-release version of LSP that we started using microsoft/vscode-python#13511 should fix this.