Skip to content

Commit

Permalink
uhmmm
Browse files Browse the repository at this point in the history
  • Loading branch information
fonsp committed Jan 3, 2025
1 parent fb9a085 commit be1295e
Show file tree
Hide file tree
Showing 3 changed files with 732 additions and 613 deletions.
4 changes: 2 additions & 2 deletions frontend/components/CellInput/pkg_bubble_plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { EditorView, syntaxTree, Decoration, ViewUpdate, ViewPlugin, Facet, Edit
import { PkgStatusMark, PkgActivateMark } from "../PkgStatusMark.js"
import { html } from "../../imports/Preact.js"
import { ReactWidget } from "./ReactWidget.js"
import { create_specific_template_maker, iterate_with_cursor, jl, jl_dynamic, narrow, t, template } from "./lezer_template.js"
import { iterate_with_cursor } from "./lezer_template.js"

/**
* @typedef PkgstatusmarkWidgetProps
Expand Down Expand Up @@ -50,7 +50,7 @@ function find_import_statements({ state, from, to }) {
if (node.name === "import") currently_using_or_import = "import"
if (node.name === "using") currently_using_or_import = "using"

console.group("exploring", node.name, doc.sliceString(node.from, node.to), node)
// console.group("exploring", node.name, doc.sliceString(node.from, node.to), node)

if (node.name === "CallExpression" || node.name === "MacrocallExpression") {
let callee = node.node.firstChild
Expand Down
2 changes: 2 additions & 0 deletions frontend/components/CellInput/pluto_autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,9 @@ const writing_variable_name_or_keyword = (/** @type {autocomplete.CompletionCont
let inside_do_argument_expression = ctx.matchBefore(/do [\(\), \p{L}\p{Nl}\p{Sc}\d_!]*$/u)

let node = syntaxTree(ctx.state).resolve(ctx.pos, -1)
// TODO: BareTupleExpression
let node2 = node?.parent?.name === "BareTupleExpression" ? node?.parent : node
// TODO: AssignmentExpression
let inside_assigment_lhs = node?.name === "Identifier" && node2?.parent?.name === "AssignmentExpression" && node2?.nextSibling != null

return just_finished_a_keyword || after_keyword || inside_do_argument_expression || inside_assigment_lhs
Expand Down
Loading

0 comments on commit be1295e

Please sign in to comment.