LuaLS / LuaLS/lua-language-server

Feature Suggestion: setting so `callSnippet` only completes non-optional parameters

Open
#1,699 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Lua
Stars
4.4k
Forks
442
PR merge metrics
No merged PRs in 30d

Description

Right now, when using the call snippet from completion.callSnippet, it completes all parameters of the all.

However, more often than not, I do not need the optional parameters, so that I end up having to delete the extra arguments all the time.

Would it maybe be possible to have a setting so that the call snippet only includes the non-optional parameters?

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 at the completion.callSnippet entry point and trace how call arguments are selected and how completion settings are defined. Determine where the optional-parameter setting belongs, then verify that the default behavior is unchanged and that enabling it produces snippets containing only non-optional parameters.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
developer-experience, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.