fix(kotlin): kotlin plugin messages and code maintain consistency (#3291)

### 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**.
<img width="300" alt="Screenshot 2024-05-23 at 10 31 38 PM"
src="441979fc-20dd-4599-a91d-f27bc0841d79">


---

2. I changed the DAP to use local variables for DAP to maintain
consistency, even though both require statements reference the same
module.
This commit is contained in:
Arthur 2024-06-06 16:53:58 +08:00 committed by GitHub
parent 8010f50aa5
commit 2244af1a86
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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 },