Skip to content

Commit

Permalink
remove unused field and detection function
Browse files Browse the repository at this point in the history
  • Loading branch information
zbirenbaum committed Sep 9, 2023
1 parent d427de0 commit 842beea
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
14 changes: 0 additions & 14 deletions lua/copilot_cmp/format.lua
Original file line number Diff line number Diff line change
Expand Up @@ -75,19 +75,6 @@ format.get_indent_offset = function(text)
return #text - #format.remove_leading_whitespace(text)
end

-- format.detect_indent_char = function(text)
-- local lines = format.split(text, '\n')
-- local indent = format.get_indent_string(lines[1])
-- for _, line in ipairs(lines) do
-- local indent = format.get_indent_string(line)
-- if indent then
-- return string.sub(indent, 1, 1)
-- end
-- end
-- default to space if no indent detected
-- return ' '
-- end

format.to_multi_line = function (item, ctx)
-- get indent on line before cursor
local indent_offset = format.get_indent_offset(ctx.cursor_before_line)
Expand Down Expand Up @@ -135,7 +122,6 @@ format.to_multi_line = function (item, ctx)
text = text,
insert = offset,
replace = offset
-- range = range
}
end

Expand Down
1 change: 0 additions & 1 deletion lua/copilot_cmp/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ local M = {
local default_opts = {
event = { "InsertEnter", "LspAttach" },
fix_pairs = true,
indent_char = '\t',
}

M._on_insert_enter = function(opts)
Expand Down

0 comments on commit 842beea

Please sign in to comment.