posit-dev / posit-dev/ark

Language server allows recognize column's name

Open
#814 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

I dont know how possible to implement this feature, as currently the LSP is able to display column name in code completion. What I want is that they have their own token, which allow for syntax highlighting feature. My expectation is to display column name with different color, so when I scan code I can quickly recognize them

Example code

# create a sample data frame
my_data <- data.frame(
  id = 1:5,
  value = c(10, 20, 30, 40, 50)
)

my_data %>% 
  select(id, value) %>% 
  filter(value > 30) 

Expected behavior:
Color for id and value is displayed differently.

Image

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.

Research direction

Start by reviewing the language server's existing code-completion handling, which the issue identifies as the place where column names are currently displayed. Determine how the LSP could represent recognized columns as their own token, then verify that the example's id and value receive distinct syntax highlighting.

Written by the indexing model from the issue text.

Assessment

Tech stack
r, rust
Domain
developer-experience, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.