mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-24 01:38:47 +02:00
enc: testing kotlin on windows
This commit is contained in:
parent
ef6ac90acf
commit
1d622094b9
5 changed files with 31 additions and 19 deletions
|
@ -45,6 +45,7 @@ if disable then
|
|||
local ignore = {
|
||||
["php"] = "tlint",
|
||||
["lua"] = "ast-grep",
|
||||
["kotlin"] = "ktlint",
|
||||
}
|
||||
|
||||
for _, pkg in pairs(mason_reg.get_installed_packages()) do
|
||||
|
@ -70,7 +71,7 @@ if disable then
|
|||
}
|
||||
end
|
||||
|
||||
-- local listtest = {}
|
||||
local listtest = {}
|
||||
-- finally add the formatter to it's compatible filetype(s)
|
||||
for _, ft in pairs(pkg.spec.languages) do
|
||||
local ftl = string.lower(ft)
|
||||
|
@ -84,9 +85,9 @@ if disable then
|
|||
pkg.spec.name = name_map[pkg.spec.name]
|
||||
end
|
||||
|
||||
-- if substring(pkg.spec.name, "prettier") then
|
||||
-- table.insert(listtest, ftl)
|
||||
-- end
|
||||
if substring(pkg.spec.name, "ktfmt") then
|
||||
table.insert(listtest, ftl)
|
||||
end
|
||||
|
||||
-- add new mapping language
|
||||
for key, value in pairs(addnew) do
|
||||
|
@ -102,7 +103,7 @@ if disable then
|
|||
end
|
||||
end
|
||||
end
|
||||
-- print(table.concat(listtest, ","))
|
||||
print(table.concat(listtest, ","))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -108,7 +108,7 @@ if pcode.active_kotlin_config or false then
|
|||
-- setting cek
|
||||
-- https://stackoverflow.com/questions/9356543/logging-while-testing-through-gradle
|
||||
{ "<leader>T", "", desc = " Test" },
|
||||
{ "<leader>Ta", "<cmd>terminal ./gradlew test<cr>", desc = "Run All" },
|
||||
{ "<leader>Ta", "<cmd>terminal gradle test<cr>", desc = "Run All" },
|
||||
{
|
||||
"<leader>Tu",
|
||||
function()
|
||||
|
@ -119,7 +119,8 @@ if pcode.active_kotlin_config or false then
|
|||
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))
|
||||
current_word = current_word:gsub("@Test", "")
|
||||
vim.cmd("terminal gradle test --tests *." .. all_trim(current_word))
|
||||
end,
|
||||
desc = "Run Under Cursor",
|
||||
},
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
local M = {}
|
||||
if not (pcode.disable_null_ls or false) then
|
||||
local disable = pcode.disable_null_ls or false
|
||||
if not require("user.utils.cfgstatus").cheack() then
|
||||
disable = true
|
||||
end
|
||||
if disable then
|
||||
M = {
|
||||
{
|
||||
"nvimtools/none-ls.nvim",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue