Skip to content

Commit

Permalink
feat(treesitter): pass string arg for position_id (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
rcarriga authored Oct 9, 2022
1 parent d506f83 commit adc99b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/neotest-go/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ end

---@param position neotest.Position The position to return an ID for
---@param namespaces neotest.Position[] Any namespaces the position is within
local function generate_position_id(position, namespaces)
function adapter._generate_position_id(position, namespaces)
local prefix = {}
for _, namespace in ipairs(namespaces) do
if namespace.type ~= 'file' then
Expand Down Expand Up @@ -379,7 +379,7 @@ function adapter.discover_positions(path)
return lib.treesitter.parse_positions(path, query, {
require_namespaces = false,
nested_tests = true,
position_id = generate_position_id,
position_id = "require('neotest-go')._generate_position_id",
})
end

Expand Down

0 comments on commit adc99b8

Please sign in to comment.