LuaLS / LuaLS/lua-language-server

autocomplete for table.insert?

Open
#1,822 0 comments 0 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

When building an array of known type, the language server gives me a nice suggestion:

![image](https://user-images.githubusercontent.com/1103761/212530025-07cd7fcc-fed6-4131-8516-57325468c59c.png)

However, when using `table.insert` I don't get this suggestion:

![image](https://user-images.githubusercontent.com/1103761/212530084-d47838a4-6f1b-4ae8-b820-3da56327a7a2.png)

Related: https://github.com/sumneko/lua-language-server/discussions/1631

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

Reproduce the two completion cases shown in the issue and compare the missing table.insert suggestion with the working known-array suggestion. Read the related discussion at sumneko/lua-language-server#1631 for context; done means table.insert receives the expected type-aware autocomplete suggestion.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.