(nvim) format all lua files

This commit is contained in:
juancwu 2025-09-05 09:39:31 -04:00
commit 9844c832ba
32 changed files with 1221 additions and 1207 deletions

View file

@ -1,58 +1,58 @@
local Utils = require("juancwu.utils")
if Utils.os.is_linux() then
local wayland_display = os.getenv("WAYLAND_DISPLAY")
if Utils.os.is_wsl() then
vim.g.clipboard = {
name = "win32yank",
copy = {
["+"] = "win32yank.exe -i --crlf",
["*"] = "win32yank.exe -i --crlf",
},
paste = {
["+"] = "win32yank.exe -o --lf",
["*"] = "win32yank.exe -o --lf",
},
cache_enabled = 0,
}
elseif wayland_display then
vim.g.clipboard = {
name = "wl-clipboard",
copy = {
["+"] = "wl-copy",
["*"] = "wl-copy",
},
paste = {
["+"] = "wl-paste",
["*"] = "wl-paste",
},
cache_enabled = 1,
}
else
vim.g.clipboard = {
name = "xclip",
copy = {
["+"] = "xclip -sel clip -i -quiet",
["*"] = "xclip -sel primary -i -quiet",
},
paste = {
["+"] = "xclip -sel clip -o -quiet",
["*"] = "xclip -sel primary -o -quiet",
},
cache_enabled = 1,
}
end
local wayland_display = os.getenv("WAYLAND_DISPLAY")
if Utils.os.is_wsl() then
vim.g.clipboard = {
name = "win32yank",
copy = {
["+"] = "win32yank.exe -i --crlf",
["*"] = "win32yank.exe -i --crlf",
},
paste = {
["+"] = "win32yank.exe -o --lf",
["*"] = "win32yank.exe -o --lf",
},
cache_enabled = 0,
}
elseif wayland_display then
vim.g.clipboard = {
name = "wl-clipboard",
copy = {
["+"] = "wl-copy",
["*"] = "wl-copy",
},
paste = {
["+"] = "wl-paste",
["*"] = "wl-paste",
},
cache_enabled = 1,
}
else
vim.g.clipboard = {
name = "xclip",
copy = {
["+"] = "xclip -sel clip -i -quiet",
["*"] = "xclip -sel primary -i -quiet",
},
paste = {
["+"] = "xclip -sel clip -o -quiet",
["*"] = "xclip -sel primary -o -quiet",
},
cache_enabled = 1,
}
end
elseif Utils.os.is_mac() then
vim.g.clipboard = {
name = "mac-clipboard",
copy = {
["+"] = "pbcopy",
["*"] = "pbcopy",
},
paste = {
["+"] = "pbpaste",
["*"] = "pbpaste",
},
cache_enabled = 1,
}
vim.g.clipboard = {
name = "mac-clipboard",
copy = {
["+"] = "pbcopy",
["*"] = "pbcopy",
},
paste = {
["+"] = "pbpaste",
["*"] = "pbpaste",
},
cache_enabled = 1,
}
end