mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-14 06:12:34 +00:00
feat: Adds find-latest function to zsh, 'fl' alias for it, lazyvim config changes.
This commit is contained in:
@@ -15,15 +15,15 @@ createCmd("BufEnter", {
|
||||
})
|
||||
|
||||
-- Markdown
|
||||
createCmd("BufWritePost", {
|
||||
pattern = { "*.md", "*.markdown" },
|
||||
group = markdownGroup,
|
||||
callback = function(_)
|
||||
local cursor = vim.fn.getpos(".")
|
||||
vim.cmd("FormatWrite")
|
||||
vim.fn.setpos(".", cursor)
|
||||
end,
|
||||
})
|
||||
-- createCmd("BufWritePost", {
|
||||
-- pattern = { "*.md", "*.markdown" },
|
||||
-- group = markdownGroup,
|
||||
-- callback = function(_)
|
||||
-- -- local cursor = vim.fn.getpos(".")
|
||||
-- vim.cmd("FormatWrite")
|
||||
-- -- vim.fn.setpos(".", cursor)
|
||||
-- end,
|
||||
-- })
|
||||
|
||||
-- Go
|
||||
createCmd("BufWritePre", {
|
||||
|
||||
@@ -1,18 +1,30 @@
|
||||
return {
|
||||
"stevearc/conform.nvim",
|
||||
opts = {
|
||||
formatters_by_ft = {
|
||||
lua = { "stulua" },
|
||||
markdown = {
|
||||
"prettier",
|
||||
prepend_args = {
|
||||
"--config", "~/.prettierrc.yaml"
|
||||
},
|
||||
formatters = {
|
||||
["markdown-toc"] = {
|
||||
condition = function(_, ctx)
|
||||
for _, line in ipairs(vim.api.nvim_buf_get_lines(ctx.buf, 0, -1, false)) do
|
||||
if line:find("<!%-%- toc %-%->") then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end,
|
||||
},
|
||||
["markdownlint-cli2"] = {
|
||||
condition = function(_, ctx)
|
||||
local diag = vim.tbl_filter(function(d)
|
||||
return d.source == "markdownlint"
|
||||
end, vim.diagnostic.get(ctx.buf))
|
||||
return #diag > 0
|
||||
end,
|
||||
},
|
||||
},
|
||||
formatters_by_ft = {
|
||||
["markdown"] = { "prettier", "markdownlint-cli2", "markdown-toc" },
|
||||
["markdown.mdx"] = { "prettier", "markdownlint-cli2", "markdown-toc" },
|
||||
lua = { "stulua" },
|
||||
swift = { "swiftformat" },
|
||||
-- ["*"] = {
|
||||
-- require("formatter.filetypes.any").remove_trailing_whitespace,
|
||||
-- },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -14,3 +14,7 @@ wc
|
||||
HVAC
|
||||
dehumidification
|
||||
ansible
|
||||
orchestrator
|
||||
ethernet
|
||||
unifi
|
||||
wildcard
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user