fix-lsp #37

Merged
navicore merged 3 commits from fix-lsp into main 2026-06-04 05:01:16 +00:00
Owner
No description provided.
Completion bug (crates/lsp/src/buffer.rs): replaced the truncate-at-last-.
  fallback with a chunked recovery. parse_best_effort splits the buffer on
  both clause terminators (.\s or .<EOF>) and clause-start heuristics (\n
  followed by a column-0 [a-z_:]), then parses each chunk independently.
  Successfully-parsed chunks contribute their clauses; broken ones fall away
  silently.

  Why the second boundary matters: a .\s-only split glued a broken clause and
  the next well-formed one into a single failing chunk. Adding the
  column-0-lowercase signal lets the chunker recognize where the user's
  incomplete clause likely ends, even when it has no closing .. Three
  regression tests cover the cases: trailing-broken-clause,
  middle-broken-with-good-clauses-around, and multiple broken middles.

  Verified through the LSP wire — a buffer like above(X) :- field(X).\nbroken
  :- bel\nbelow(Y).\n with cursor mid-bel now returns below/1 from BELOW the
  cursor (alongside above/1 from above). Pre-fix this returned nothing.

  API cleanup: parse_best_effort reverted to a single-argument signature; the
  cursor-byte threading that briefly entered completion::compute and
  hover::compute is gone since the chunker doesn't need it.

  Syntax (patch-prolog.nvim/syntax/prolog.vim): added two atom patterns.
  - prologPredicateCall — lowercase identifier immediately followed by ( →
  Function.
  - prologAtom — bare lowercase identifier → Constant.

  Ordering matters here: Vim's last-defined syn match wins between siblings,
  so prologAtom is declared first and prologPredicateCall after it. Now
  Prolog code lights up with distinct colors per role — predicate calls
  (violation, field), bare data atoms (ssn, red), variables (Field),
  built-ins (findall, member), directives (dynamic), operators (:-, is), all
  in different highlight groups. Comment block above the patterns documents
  the ordering invariant for the next contributor.
gd
Some checks failed
CI - Linux / CI - Linux x86_64 (pull_request) Failing after 20s
916741e38e
lint
All checks were successful
CI - Linux / CI - Linux x86_64 (pull_request) Successful in 47s
2dfb596b07
navicore deleted branch fix-lsp 2026-06-04 05:01:16 +00:00
Commenting is not possible because the repository is archived.
No description provided.