Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,3 @@ Go to the CopilotChat.nvim in your GitHub account, select your branch, and click

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

18 changes: 9 additions & 9 deletions lua/CopilotChat/select.lua
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---@class CopilotChat.select.Selection
---@field content string
---@field start_line number
---@field end_line number
---@field start_line integer
---@field end_line integer
---@field filename string
---@field filetype string
---@field bufnr number
---@field bufnr integer

local log = require('plenary.log')
local utils = require('CopilotChat.utils')
Expand Down Expand Up @@ -51,7 +51,7 @@ function M.marks()
end

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

--- Get the selection from the target buffer
---@param bufnr number
---@param bufnr integer
---@return CopilotChat.select.Selection?
function M.get(bufnr)
if not utils.buf_valid(bufnr) then
Expand Down Expand Up @@ -113,10 +113,10 @@ function M.get(bufnr)
end

--- Sets the selection to specific lines in buffer or clears it
---@param bufnr number
---@param winnr number?
---@param start_line number?
---@param end_line number?
---@param bufnr integer
---@param winnr integer?
---@param start_line integer?
---@param end_line integer?
function M.set(bufnr, winnr, start_line, end_line)
if not utils.buf_valid(bufnr) then
return
Expand Down
4 changes: 2 additions & 2 deletions lua/CopilotChat/ui/chat.lua
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ end
---@field section CopilotChat.ui.chat.Section?

--- @class CopilotChat.ui.chat.Source
--- @field bufnr number?
--- @field winnr number?
--- @field bufnr integer?
--- @field winnr integer?
--- @field cwd fun():string

---@class CopilotChat.ui.chat.Chat : CopilotChat.ui.overlay.Overlay
Expand Down
2 changes: 1 addition & 1 deletion lua/CopilotChat/utils/diff.lua
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ end
--- Apply unified diff to a table of lines and return new lines
---@param diff_text string
---@param original_content string
---@return table<string>, boolean, integer, integer
---@return string[], boolean, integer?, integer?
function M.apply_unified_diff(diff_text, original_content)
local hunks = parse_hunks(diff_text)
local new_content = original_content
Expand Down
Loading