Skip to content

Commit

Permalink
Disable "snippets" expansion in Jedi LSP
Browse files Browse the repository at this point in the history
This brings the Jedi based completion experience in line with that
provided by Pylance. Completions now insert only the current symbol
rather than assuming that the user wants to e.g: call that symbol.

This means for example that completing `max` will insert just `max`
rather `max(arg1, arg2)`. While for this case this may be seen as
less useful, it means that insertions in places where a call is
not desired (such as imports and typing contexts) will not be forced
to manually remove the parentheses and template arguments which
might otherwise be inserted.

Users can still use the signature support UI to explore signatures
and of course insertion of an opening parenthesis will still insert
a closing one.

Hopefully this new configuration will be preferable to a majority
of users.

Fixes #15858
  • Loading branch information
PeterJCLaw committed May 7, 2023
1 parent f0253e5 commit 00ced55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/client/activation/jedi/analysisOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export class JediLanguageServerAnalysisOptions extends LanguageServerAnalysisOpt
markupKindPreferred: 'markdown',
completion: {
resolveEagerly: false,
disableSnippets: false,
disableSnippets: true,
},
diagnostics: {
enable: true,
Expand Down

0 comments on commit 00ced55

Please sign in to comment.