mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
feat(Code Node): Add Python support (#4295)
This commit is contained in:
@@ -33,7 +33,12 @@ export const completerExtension = mixins(
|
||||
jsonFieldCompletions,
|
||||
).extend({
|
||||
methods: {
|
||||
autocompletionExtension(): Extension {
|
||||
autocompletionExtension(language: 'javaScript' | 'python'): Extension {
|
||||
const completions = [];
|
||||
if (language === 'javaScript') {
|
||||
completions.push(jsSnippets, localCompletionSource);
|
||||
}
|
||||
|
||||
return autocompletion({
|
||||
compareCompletions: (a: Completion, b: Completion) => {
|
||||
if (/\.json$|id$|id['"]\]$/.test(a.label)) return 0;
|
||||
@@ -41,8 +46,7 @@ export const completerExtension = mixins(
|
||||
return a.label.localeCompare(b.label);
|
||||
},
|
||||
override: [
|
||||
jsSnippets,
|
||||
localCompletionSource,
|
||||
...completions,
|
||||
|
||||
// core
|
||||
this.itemCompletions,
|
||||
|
||||
Reference in New Issue
Block a user