mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-21 08:35:48 +02:00
enc: run kotlin test under cursor
This commit is contained in:
parent
c3d0591394
commit
4ba72487b4
1 changed files with 9 additions and 3 deletions
|
@ -112,8 +112,14 @@ if pcode.active_kotlin_config or false then
|
|||
{
|
||||
"<leader>Tu",
|
||||
function()
|
||||
local current_word = vim.fn.expand("<cword>")
|
||||
vim.cmd("terminal ./gradlew test --tests *." .. current_word)
|
||||
-- local current_word = vim.fn.expand("<cword>")
|
||||
local current_word = ""
|
||||
local input = vim.fn.getline(".")
|
||||
current_word = all_trim((input:gsub("class", "")):gsub("{", "")) -- hilangkan bagian class
|
||||
current_word = current_word:gsub("fun", "")
|
||||
current_word = current_word:gsub("%(%)", "")
|
||||
current_word = current_word:gsub("{", "")
|
||||
vim.cmd("terminal ./gradlew test --tests *." .. all_trim(current_word))
|
||||
end,
|
||||
desc = "Run Under Cursor",
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue