save
This commit is contained in:
@@ -9,7 +9,7 @@ return {
|
||||
{
|
||||
"<leader>f",
|
||||
function()
|
||||
require("conform").format({ async = true, lsp_fallback = true })
|
||||
require("conform").format { async = true, lsp_fallback = true }
|
||||
end,
|
||||
mode = "",
|
||||
},
|
||||
@@ -26,5 +26,17 @@ return {
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
},
|
||||
hooks = {
|
||||
pre_format = function(lines, _)
|
||||
-- Strip comments
|
||||
local no_comments = {}
|
||||
for _, line in ipairs(lines) do
|
||||
if not line:match "%s*//" and not line:match "%s*/%*.*%*/" then
|
||||
table.insert(no_comments, line)
|
||||
end
|
||||
end
|
||||
return no_comments
|
||||
end,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -49,5 +49,4 @@ function clip() {
|
||||
cat $1 | clip.exe
|
||||
}
|
||||
|
||||
# Motd logic
|
||||
clear; cal; cat ~/.motd
|
||||
fastfetch
|
||||
|
||||
Reference in New Issue
Block a user