aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/diagnostic.lua
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2023-07-18 15:42:30 +0100
committerGitHub <noreply@github.com>2023-07-18 15:42:30 +0100
commitbe74807eef13ff8c90d55cf8b22b01d6d33b1641 (patch)
tree9f7e1cebdb2677057b066df9fea91bce86b4ab6a /runtime/lua/vim/lsp/diagnostic.lua
parentd0ae529861594b2e89a436ed2cfb3d2243f8bfcc (diff)
downloadrneovim-be74807eef13ff8c90d55cf8b22b01d6d33b1641.tar.gz
rneovim-be74807eef13ff8c90d55cf8b22b01d6d33b1641.tar.bz2
rneovim-be74807eef13ff8c90d55cf8b22b01d6d33b1641.zip
docs(lua): more improvements (#24387)
* docs(lua): teach lua2dox how to table * docs(lua): teach gen_vimdoc.py about local functions No more need to mark local functions with @private * docs(lua): mention @nodoc and @meta in dev-lua-doc * fixup! Co-authored-by: Justin M. Keyes <justinkz@gmail.com> --------- Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
Diffstat (limited to 'runtime/lua/vim/lsp/diagnostic.lua')
-rw-r--r--runtime/lua/vim/lsp/diagnostic.lua9
1 files changed, 1 insertions, 8 deletions
diff --git a/runtime/lua/vim/lsp/diagnostic.lua b/runtime/lua/vim/lsp/diagnostic.lua
index 3efa5c51ff..c2cf7c6ba5 100644
--- a/runtime/lua/vim/lsp/diagnostic.lua
+++ b/runtime/lua/vim/lsp/diagnostic.lua
@@ -5,7 +5,7 @@ local protocol = require('vim.lsp.protocol')
local M = {}
local DEFAULT_CLIENT_ID = -1
----@private
+
local function get_client_id(client_id)
if client_id == nil then
client_id = DEFAULT_CLIENT_ID
@@ -14,7 +14,6 @@ local function get_client_id(client_id)
return client_id
end
----@private
---@param severity lsp.DiagnosticSeverity
local function severity_lsp_to_vim(severity)
if type(severity) == 'string' then
@@ -23,7 +22,6 @@ local function severity_lsp_to_vim(severity)
return severity
end
----@private
---@return lsp.DiagnosticSeverity
local function severity_vim_to_lsp(severity)
if type(severity) == 'string' then
@@ -32,7 +30,6 @@ local function severity_vim_to_lsp(severity)
return severity
end
----@private
---@return integer
local function line_byte_from_position(lines, lnum, col, offset_encoding)
if not lines or offset_encoding == 'utf-8' then
@@ -48,7 +45,6 @@ local function line_byte_from_position(lines, lnum, col, offset_encoding)
return col
end
----@private
local function get_buf_lines(bufnr)
if vim.api.nvim_buf_is_loaded(bufnr) then
return vim.api.nvim_buf_get_lines(bufnr, 0, -1, false)
@@ -73,7 +69,6 @@ local function get_buf_lines(bufnr)
return lines
end
---- @private
--- @param diagnostic lsp.Diagnostic
--- @param client_id integer
--- @return table?
@@ -96,7 +91,6 @@ local function tags_lsp_to_vim(diagnostic, client_id)
return tags
end
----@private
---@param diagnostics lsp.Diagnostic[]
---@param bufnr integer
---@param client_id integer
@@ -133,7 +127,6 @@ local function diagnostic_lsp_to_vim(diagnostics, bufnr, client_id)
end, diagnostics)
end
---- @private
--- @param diagnostics Diagnostic[]
--- @return lsp.Diagnostic[]
local function diagnostic_vim_to_lsp(diagnostics)