diff --git a/lazy-lock.json b/lazy-lock.json index b63a1a2..d86ea32 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -12,6 +12,7 @@ "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, "code_runner.nvim": { "branch": "main", "commit": "6c5bfe44a6c7523350cd706e6b3b8101166eed99" }, "codeium.nvim": { "branch": "main", "commit": "d3b88eb3aa1de6da33d325c196b8a41da2bcc825" }, + "conform.nvim": { "branch": "master", "commit": "60e6fbddbdf37d7790de07dc7420beefaf650e5e" }, "dracula.nvim": { "branch": "main", "commit": "8d8bddb8814c3e7e62d80dda65a9876f97eb699c" }, "dressing.nvim": { "branch": "master", "commit": "71349f24c6e07b39f33600985843c289ca735308" }, "friendly-snippets": { "branch": "main", "commit": "682157939e57bd6a2c86277dfd4d6fbfce63dbac" }, @@ -23,7 +24,7 @@ "lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "9ae570e206360e47d30b4c35a4550c165f4ea7b7" }, "mason-null-ls.nvim": { "branch": "main", "commit": "2b8433f76598397fcc97318d410e0c4f7a4bea6a" }, - "mason-nvim-dap.nvim": { "branch": "main", "commit": "f5425eb1d0d794f0305d5eeebddabb74614683ff" }, + "mason-nvim-dap.nvim": { "branch": "main", "commit": "4ba55f9755ebe8297d92c419b90a946123292ae6" }, "mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" }, "mini.indentscope": { "branch": "main", "commit": "56d42be090e8fcc68eda69cfe55af8c5e562300e" }, "neoscroll.nvim": { "branch": "master", "commit": "a731f66f1d39ec6175fd201c5bf849e54abda99c" }, @@ -37,6 +38,7 @@ "nvim-dap": { "branch": "master", "commit": "5ba8ceace596360321cf33fa4b56d9d46e057ce9" }, "nvim-dap-ui": { "branch": "master", "commit": "f7d75cca202b52a60c520ec7b1ec3414d6e77b0f" }, "nvim-dap-virtual-text": { "branch": "master", "commit": "d7c695ea39542f6da94ee4d66176f5d660ab0a77" }, + "nvim-lint": { "branch": "master", "commit": "efc6fc83f0772283e064c53a8f9fb5645bde0bc0" }, "nvim-lspconfig": { "branch": "master", "commit": "0b8165cf95806bc4bb8f745bb0c92021b2ed4b98" }, "nvim-material-icon": { "branch": "main", "commit": "d8b1564a95330a5bfe5ef38defe99b9c440efe7d" }, "nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" }, diff --git a/lua/plugins/conform.lua b/lua/plugins/conform.lua index 65fbd3d..74e4cb0 100644 --- a/lua/plugins/conform.lua +++ b/lua/plugins/conform.lua @@ -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 diff --git a/lua/plugins/kotlin.lua b/lua/plugins/kotlin.lua index ba230a1..ae0511b 100644 --- a/lua/plugins/kotlin.lua +++ b/lua/plugins/kotlin.lua @@ -108,7 +108,7 @@ if pcode.active_kotlin_config or false then -- setting cek -- https://stackoverflow.com/questions/9356543/logging-while-testing-through-gradle { "T", "", desc = " Test" }, - { "Ta", "terminal ./gradlew test", desc = "Run All" }, + { "Ta", "terminal gradle test", desc = "Run All" }, { "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", }, diff --git a/lua/plugins/nonels.lua b/lua/plugins/nonels.lua index 86f28be..4bf1ea6 100644 --- a/lua/plugins/nonels.lua +++ b/lua/plugins/nonels.lua @@ -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", diff --git a/lua/user/utils/cfgstatus.lua b/lua/user/utils/cfgstatus.lua index 14a4289..d3f1bbe 100644 --- a/lua/user/utils/cfgstatus.lua +++ b/lua/user/utils/cfgstatus.lua @@ -1,21 +1,25 @@ -local M={} +local M = {} -M.cheack=function () - local sts= false +M.cheack = function() + local sts = false if pcode.active_javascript_config.active or false then - sts=true + sts = true elseif pcode.active_rust_config or false then - sts=true + sts = true elseif pcode.active_php_config or false then - sts=true + sts = true elseif pcode.active_golang_config or false then - sts=true + sts = true elseif pcode.active_python_config or false then - sts=true + sts = true elseif pcode.active_cpp_config or false then - sts=true + sts = true elseif pcode.active_java_config.active or false then - sts=true + sts = true + elseif pcode.active_deno_config or false then + sts = true + elseif pcode.active_kotlin_config or false then + sts = true end return sts end