Skip to content

Rework pos types, add types for mark utils#1420

Open
bew wants to merge 13 commits intoL3MON4D3:masterfrom
bew:types-for-mark-pos
Open

Rework pos types, add types for mark utils#1420
bew wants to merge 13 commits intoL3MON4D3:masterfrom
bew:types-for-mark-pos

Conversation

@bew
Copy link
Copy Markdown
Contributor

@bew bew commented Jan 10, 2026

Extracted from #1396 (and reworked a little)

  • Rework position types
  • Add types for all Mark utils
  • Remove unused Mark:update method (ref)

---@param p2 LuaSnip.RawPos00|LuaSnip.Pos00
---@return boolean
--
-- FIXME(@bew): I don't know how to enforce the use of the same type of pos..
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be doable via @overload, but I'm not getting the correct results with this simple example

---@param a number
---@param b number
---@return boolean
---@overload fun(table,table) : boolean
local function test(a, b) return a == b end

test(1,{})

@bew
Copy link
Copy Markdown
Contributor Author

bew commented Jan 23, 2026

could we get this merged ? it's an important one to get the ball rolling ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants