Skip to content

Commit 6fe5dfc

Browse files
chore: fix number types in lua docs (#1561)
* chore: fix number types in lua docs Signed-off-by: Tomas Slusny <slusnucky@gmail.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Signed-off-by: Tomas Slusny <slusnucky@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 5378035 commit 6fe5dfc

4 files changed

Lines changed: 12 additions & 13 deletions

File tree

CONTRIBUTING.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,4 +124,3 @@ Go to the CopilotChat.nvim in your GitHub account, select your branch, and click
124124

125125
- [health.lua](/lua/CopilotChat/health.lua): `:checkhealth` integration.
126126
Verifies commands, libraries, and Treesitter parsers.
127-

lua/CopilotChat/select.lua

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---@class CopilotChat.select.Selection
22
---@field content string
3-
---@field start_line number
4-
---@field end_line number
3+
---@field start_line integer
4+
---@field end_line integer
55
---@field filename string
66
---@field filetype string
7-
---@field bufnr number
7+
---@field bufnr integer
88

99
local log = require('plenary.log')
1010
local utils = require('CopilotChat.utils')
@@ -51,7 +51,7 @@ function M.marks()
5151
end
5252

5353
--- Highlight selection in target buffer or clear it
54-
---@param bufnr number
54+
---@param bufnr integer
5555
---@param clear boolean?
5656
function M.highlight(bufnr, clear)
5757
local selection_ns = vim.api.nvim_create_namespace('copilot-chat-selection')
@@ -76,7 +76,7 @@ function M.highlight(bufnr, clear)
7676
end
7777

7878
--- Get the selection from the target buffer
79-
---@param bufnr number
79+
---@param bufnr integer
8080
---@return CopilotChat.select.Selection?
8181
function M.get(bufnr)
8282
if not utils.buf_valid(bufnr) then
@@ -113,10 +113,10 @@ function M.get(bufnr)
113113
end
114114

115115
--- Sets the selection to specific lines in buffer or clears it
116-
---@param bufnr number
117-
---@param winnr number?
118-
---@param start_line number?
119-
---@param end_line number?
116+
---@param bufnr integer
117+
---@param winnr integer?
118+
---@param start_line integer?
119+
---@param end_line integer?
120120
function M.set(bufnr, winnr, start_line, end_line)
121121
if not utils.buf_valid(bufnr) then
122122
return

lua/CopilotChat/ui/chat.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ end
108108
---@field section CopilotChat.ui.chat.Section?
109109

110110
--- @class CopilotChat.ui.chat.Source
111-
--- @field bufnr number?
112-
--- @field winnr number?
111+
--- @field bufnr integer?
112+
--- @field winnr integer?
113113
--- @field cwd fun():string
114114

115115
---@class CopilotChat.ui.chat.Chat : CopilotChat.ui.overlay.Overlay

lua/CopilotChat/utils/diff.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ end
138138
--- Apply unified diff to a table of lines and return new lines
139139
---@param diff_text string
140140
---@param original_content string
141-
---@return table<string>, boolean, integer, integer
141+
---@return string[], boolean, integer?, integer?
142142
function M.apply_unified_diff(diff_text, original_content)
143143
local hunks = parse_hunks(diff_text)
144144
local new_content = original_content

0 commit comments

Comments
 (0)