From 2244af1a86e58f4e91d0b3a715736be789d2590d Mon Sep 17 00:00:00 2001 From: Arthur <82575487+arthur-mountain@users.noreply.github.com> Date: Thu, 6 Jun 2024 16:53:58 +0800 Subject: [PATCH] fix(kotlin): kotlin plugin messages and code maintain consistency (#3291) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ### Description I am the author of this [PR](https://github.com/LazyVim/LazyVim/pull/2890). While reviewing my own code and checking the LazyVim official website, I noticed some inconsistencies 😓 , so I created a small PR to address them: ### Changes 1.Each optional plugin has a comment message indicating that the plugin is optional, but DAP does not (as shown in the image). Since the official website already has an "optional" in title. **I removed the comment messages regarding "optional" to avoid confusion**. Screenshot 2024-05-23 at 10 31 38 PM --- 2. I changed the DAP to use local variables for DAP to maintain consistency, even though both require statements reference the same module. --- lua/lazyvim/plugins/extras/lang/kotlin.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/kotlin.lua b/lua/lazyvim/plugins/extras/lang/kotlin.lua index 1db56545..087f3620 100644 --- a/lua/lazyvim/plugins/extras/lang/kotlin.lua +++ b/lua/lazyvim/plugins/extras/lang/kotlin.lua @@ -16,7 +16,7 @@ return { { "williamboman/mason.nvim", opts = function(_, opts) - vim.list_extend(opts.ensure_installed or {}, { "ktlint", "kotlin-debug-adapter" }) + vim.list_extend(opts.ensure_installed or {}, { "ktlint" }) end, }, -- Add syntax highlighting @@ -35,7 +35,7 @@ return { }, }, }, - -- Add linting as optional + -- Add linting { "mfussenegger/nvim-lint", optional = true, @@ -44,7 +44,7 @@ return { linters_by_ft = { kotlin = { "ktlint" } }, }, }, - -- Add formatting as optional + -- Add formatting { "stevearc/conform.nvim", optional = true, @@ -52,7 +52,7 @@ return { formatters_by_ft = { kotlin = { "ktlint" } }, }, }, - -- Add formatting and linting as optional + -- Add formatting and linting { "nvimtools/none-ls.nvim", optional = true, @@ -72,7 +72,7 @@ return { opts = function() local dap = require("dap") if not dap.adapters.kotlin then - require("dap").adapters.kotlin = { + dap.adapters.kotlin = { type = "executable", command = "kotlin-debug-adapter", options = { auto_continue_if_many_stopped = false },