Skip to content

Commit

Permalink
add alternates for lua
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Steinke committed Apr 13, 2024
1 parent 1f309e6 commit f8c38e9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion nvim/lua/plugins/telescope.lua
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,14 @@ return {
},
["telescope-alternate"] = {
mappings = {
-- Go
{ "(.*).go", { { "[1]_test.go", "Test", function()
return not string.match(vim.api.nvim_buf_get_name(0), ".*_test.go")
end } } },
{ "(.*)_test.go", { { "[1].go", "Original", true } } },
{ "(.*)_test.go", { { "[1].go", "Original", true } } },
-- Lua
{ "lua/(.*).lua", { { "tests/[1]_spec.lua", "Test", true } } },
{ "tests/(.*)_spec.lua", { { "lua/[1].lua", "Original", true } } },
},
},
},
Expand Down

0 comments on commit f8c38e9

Please sign in to comment.