home: vim: lua: lsp: fix comments
All checks were successful
ci/woodpecker/push/check Pipeline was successful

This commit is contained in:
Bruno BELANYI 2023-09-14 11:14:04 +00:00
parent 3f7a062376
commit f2f4b9f91e

View file

@ -3,9 +3,9 @@ local M = {}
-- Simplified LSP formatting configuration -- Simplified LSP formatting configuration
local lsp_format = require("lsp-format") local lsp_format = require("lsp-format")
-- Move to the next/previous diagnostic, automatically showing the diagnostics --- Move to the next/previous diagnostic, automatically showing the diagnostics
-- float if necessary. --- float if necessary.
-- @param forward whether to go forward or backwards --- @param forward whether to go forward or backwards
local function goto_diagnostic(forward) local function goto_diagnostic(forward)
vim.validate({ vim.validate({
forward = { forward, "boolean" }, forward = { forward, "boolean" },
@ -28,21 +28,21 @@ local function goto_diagnostic(forward)
end end
end end
-- Move to the next diagnostic, automatically showing the diagnostics float if --- Move to the next diagnostic, automatically showing the diagnostics float if
-- necessary. --- necessary.
M.goto_next_diagnostic = function() M.goto_next_diagnostic = function()
goto_diagnostic(true) goto_diagnostic(true)
end end
-- Move to the previous diagnostic, automatically showing the diagnostics float --- Move to the previous diagnostic, automatically showing the diagnostics float
-- if necessary. --- if necessary.
M.goto_prev_diagnostic = function() M.goto_prev_diagnostic = function()
goto_diagnostic(false) goto_diagnostic(false)
end end
-- shared LSP configuration callback --- shared LSP configuration callback
-- @param client native client configuration --- @param client native client configuration
-- @param bufnr int? buffer number of the attched client --- @param bufnr int? buffer number of the attched client
M.on_attach = function(client, bufnr) M.on_attach = function(client, bufnr)
-- Format on save -- Format on save
lsp_format.on_attach(client, bufnr) lsp_format.on_attach(client, bufnr)