Skip to content

Commit

Permalink
little fix (not about signature)
Browse files Browse the repository at this point in the history
  • Loading branch information
jinzhongjia committed Jan 31, 2024
1 parent 2afe762 commit 2d5aa66
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions lua/LspUI/_meta.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@
--
-- this is just some config for definition, type definition, declaration, reference, implementation
--- @class LspUI_pos_config
--- @field secondary_keybind { jump: string?, jump_tab: string?, jump_split: string?, jump_vsplit: string?, quit:string?, hide_main:string?, fold_all:string?, expand_all:string?, enter: string? }?
--- @field main_keybind { back: string?, hide_secondary: string? }?
--- @field transparency number
--- @field secondary_keybind { jump: string?, jump_tab: string?, jump_split: string?, jump_vsplit: string?, quit:string?, hide_main:string?, fold_all:string?, expand_all:string?, enter: string? }? secondary view keybind
--- @field main_keybind { back: string?, hide_secondary: string? }? main view keybind
--- @field transparency number? transparency for pos_config

--- @class LspUI_definition_config
--- @field enable boolean? whether enable `definition` module
Expand Down
10 changes: 5 additions & 5 deletions lua/LspUI/diagnostic/util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ local diagnostic_severity_to_hightlight = function(severity)
return arr[severity] or nil
end

--- @param diagnostics Diagnostic[]
--- @return Diagnostic[][][]
--- @param diagnostics vim.Diagnostic[]
--- @return vim.Diagnostic[][][]
local sort_diagnostics = function(diagnostics)
local sorted_diagnostics = {}

for _, diagnostic in pairs(diagnostics) do
--- @type Diagnostic[][]?
--- @type vim.Diagnostic[][]?
local lnum_diagnostics = sorted_diagnostics[diagnostic.lnum]
if lnum_diagnostics == nil then
lnum_diagnostics = {}
Expand All @@ -64,12 +64,12 @@ local sort_diagnostics = function(diagnostics)
end

-- get next position diagnostics
--- @param sorted_diagnostics Diagnostic[][][]
--- @param sorted_diagnostics vim.Diagnostic[][][]
--- @param row integer (row,col) is a tuple, get from `nvim_win_get_cursor`, 1 based
--- @param col integer (row,col) is a tuple, get from `nvim_win_get_cursor`, 0 based
--- @param search_forward boolean true is down, false is up
--- @param buffer_id integer
--- @return Diagnostic[]?
--- @return vim.Diagnostic[]?
local next_position_diagnostics = function(
sorted_diagnostics,
row,
Expand Down

0 comments on commit 2d5aa66

Please sign in to comment.