posit-dev / posit-dev/ark

Eliminate ad hoc creation of function completion items

Open
#849 0 comments 0 reactions 1 assignee View on GitHub

@jennybc is already working on this.

Since Jun 24, 2025.

area: language server enhancement
Dominant language
Rust
Stars
337
Forks
32
Avg merge
8d 17h
Merged PRs (30d)
11

Description

Loose end discovered while working on #819:

https://github.com/posit-dev/ark/blob/bcdaed2b9f89b04df0b912778fde0cf059f40b62/crates/ark/src/lsp/completions/completion_item.rs#L122-L135

completion_item_from_assignment(), which is used for document completions, hand crafts a function completion item, which means it doesn't benefit from all the smarts in completion_item_from_function().

I actually found this problem when writing tests for #819, because my first crack at it was with a user-defined function in the global environment. I wondered why things weren't working! This issue is a reminder to me to come back and route this through completion_item_from_function() and to look hard for any other instances of similar.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.