Skip to content

Commit

Permalink
Format with stylua
Browse files Browse the repository at this point in the history
  • Loading branch information
iguanacucumber authored and github-actions[bot] committed Oct 29, 2024
1 parent 09ff17b commit 1115937
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
24 changes: 16 additions & 8 deletions lua/cmp_buffer/buffer.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local timer = require('cmp_buffer.timer')
local timer = require("cmp_buffer.timer")

local function clear_table(tbl)
for k in pairs(tbl) do
Expand Down Expand Up @@ -272,7 +272,11 @@ function buffer.watch(self)
end
end

if first_line == self.last_edit_first_line and old_last_line == self.last_edit_last_line and new_last_line == self.last_edit_last_line then
if
first_line == self.last_edit_first_line
and old_last_line == self.last_edit_last_line
and new_last_line == self.last_edit_last_line
then
self.unique_words_curr_line_dirty = true
else
self.unique_words_curr_line_dirty = true
Expand All @@ -289,13 +293,17 @@ function buffer.watch(self)
self.queue[i] = true
end
self.debounce_timer:stop()
self.debounce_timer:start(self.opts.debounce, 0, vim.schedule_wrap(function()
self:safe_buf_call(function()
for linenr, _ in pairs(self.queue) do
self:index_line(linenr, vim.api.nvim_buf_get_lines(self.bufnr, linenr - 1, linenr, true)[1])
end
self.debounce_timer:start(
self.opts.debounce,
0,
vim.schedule_wrap(function()
self:safe_buf_call(function()
for linenr, _ in pairs(self.queue) do
self:index_line(linenr, vim.api.nvim_buf_get_lines(self.bufnr, linenr - 1, linenr, true)[1])
end
end)
end)
end))
)
else
self:index_range(first_line, new_last_line)
end
Expand Down
1 change: 0 additions & 1 deletion lua/cmp_buffer/cases.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ function get_word_slices(name)

last_character_uppercase = false
elseif string.upper(character) == character then

if last_character_uppercase or current_word == "" then
current_word = current_word .. string.lower(character)
else
Expand Down
2 changes: 1 addition & 1 deletion lua/cmp_buffer/init.lua
Original file line number Diff line number Diff line change
@@ -1 +1 @@
return require('cmp_buffer.source').new()
return require("cmp_buffer.source").new()

0 comments on commit 1115937

Please sign in to comment.