Skip to content

Commit

Permalink
Fix lua formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
NonlinearFruit committed Sep 20, 2024
1 parent 0602715 commit 0986821
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 26 deletions.
10 changes: 5 additions & 5 deletions nvim/lua/plugins/overlength.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
local api = vim.api
local overlength_active = false
local config = {
column_length = 120, -- Default column length
terminal_background = "darkgrey", -- Default background color for terminal
gui_background = "#592929", -- Default background color for GUI
column_length = 120, -- Default column length
terminal_background = "darkgrey", -- Default background color for terminal
gui_background = "#592929", -- Default background color for GUI
}

local function enable_overlength_mode()
Expand All @@ -21,8 +21,8 @@ local function disable_overlength_mode()
end

local function configure()
api.nvim_create_user_command("OverlengthEnable", enable_overlength_mode, {})
api.nvim_create_user_command("OverlengthDisable", disable_overlength_mode, {})
api.nvim_create_user_command("OverlengthEnable", enable_overlength_mode, {})
api.nvim_create_user_command("OverlengthDisable", disable_overlength_mode, {})
end

return {
Expand Down
26 changes: 13 additions & 13 deletions nvim/lua/plugins/typewriter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,33 @@ local api = vim.api
local typewriter_active = false

local function center_cursor()
if not typewriter_active then
return
end
api.nvim_command("normal! zzzszH")
if not typewriter_active then
return
end
api.nvim_command("normal! zzzszH")
end

local function enable_typewriter_mode()
if not typewriter_active then
typewriter_active = true
if not typewriter_active then
typewriter_active = true
local group = vim.api.nvim_create_augroup("typewriter", { clear = true })
vim.api.nvim_create_autocmd({ "CursorMoved", "CursorMovedI" }, {
group = group,
callback = center_cursor,
})
end
end
end

local function disable_typewriter_mode()
if typewriter_active then
typewriter_active = false
api.nvim_command("autocmd! typewriter")
end
if typewriter_active then
typewriter_active = false
api.nvim_command("autocmd! typewriter")
end
end

local function configure()
api.nvim_create_user_command("TypewriterEnable", enable_typewriter_mode, {})
api.nvim_create_user_command("TyperwriterDisable", disable_typewriter_mode, {})
api.nvim_create_user_command("TypewriterEnable", enable_typewriter_mode, {})
api.nvim_create_user_command("TyperwriterDisable", disable_typewriter_mode, {})
end

return {
Expand Down
2 changes: 1 addition & 1 deletion nvim/lua/plugins/xml.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ end
return {
"local/xml",
config = configure,
event = {"BufEnter *.xaml,*.props,*.csproj"},
event = { "BufEnter *.xaml,*.props,*.csproj" },
dev = true,
}
14 changes: 7 additions & 7 deletions nvim/lua/prototypes/misery.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ local M = {}
local hidden_cursor = {
name = "hidden cursor",
start = function()
vim.cmd [[set guicursor=n-v:hor01-Normal]]
vim.cmd([[set guicursor=n-v:hor01-Normal]])
vim.opt.cursorline = false
vim.opt.relativenumber = false
vim.opt.number = false
Expand All @@ -19,12 +19,12 @@ local invisiline = {
start = function()
vim.opt.cursorline = true
vim.opt.list = false
vim.cmd [[set guicursor=n-v:ver10-Error]]
vim.cmd [[highlight CursorLine guibg=#111111 guifg=#111111]]
vim.cmd([[set guicursor=n-v:ver10-Error]])
vim.cmd([[highlight CursorLine guibg=#111111 guifg=#111111]])
end,
stop = function()
vim.opt.list = true
vim.cmd.hi "CursorLine guifg=none guibg=#2b2b2b"
vim.cmd.hi("CursorLine guifg=none guibg=#2b2b2b")
vim.opt.guicursor = { "n-v-c-sm:block", "i-ci-ve:ver25", "r-cr-o:hor20" }
end,
}
Expand All @@ -38,14 +38,14 @@ local random_theme = {
end, colorschemes)

local random_colorscheme = colorschemes[math.random(#colorschemes)]
vim.cmd.hi "clear"
vim.cmd.hi("clear")
vim.cmd.colorscheme(random_colorscheme)

self.state.colorscheme = random_colorscheme
end,
done = function()
vim.cmd.hi "clear"
vim.cmd.colorscheme "gruvbuddy"
vim.cmd.hi("clear")
vim.cmd.colorscheme("gruvbuddy")
end,
}

Expand Down

0 comments on commit 0986821

Please sign in to comment.