fix(yazi): data column

This commit is contained in:
js0ny 2025-11-13 07:30:00 +00:00
parent d2b57af9ce
commit 9889fc8b7d
11 changed files with 66 additions and 29 deletions

View file

@ -0,0 +1,26 @@
---@type vim.lsp.Config
return {
cmd = { 'tinymist' },
filetypes = { 'typst' },
root_markers = { '.git' },
on_attach = function(client, bufnr)
for _, command in ipairs {
'tinymist.exportSvg',
'tinymist.exportPng',
'tinymist.exportPdf',
-- 'tinymist.exportHtml', -- Use typst 0.13
'tinymist.exportMarkdown',
'tinymist.exportText',
'tinymist.exportQuery',
'tinymist.exportAnsiHighlight',
'tinymist.getServerInfo',
'tinymist.getDocumentTrace',
'tinymist.getWorkspaceLabels',
'tinymist.getDocumentMetrics',
'tinymist.pinMain',
} do
local cmd_func, cmd_name, cmd_desc = create_tinymist_command(command, client, bufnr)
vim.api.nvim_buf_create_user_command(bufnr, 'Lsp' .. cmd_name, cmd_func, { nargs = 0, desc = cmd_desc })
end
end,
}

View file

@ -40,3 +40,6 @@ else
vim.o.background = 'light'
vim.cmd.colorscheme("rose-pine")
end
vim.cmd.colorscheme("rose-pine-moon")

View file

@ -73,3 +73,8 @@ vim.o.sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,
vim.o.mousemoveevent = true
vim.fn.matchadd("Conceal", [[\%u200b]], 10, -1, { conceal = "" })
-- Grep
opt.grepformat = "%f:%l:%c:%m"
opt.grepprg = "rg --vimgrep"

View file

@ -39,7 +39,7 @@ local bufmap = {
{ mode = "n", keys = "<leader>mx", cmd = "<cmd>!chmod u+x %<CR>", opt = { desc = "Mark the file as executable" } },
},
json = {
{ mode = "n", keys ="<leader>mp", cmd = "<cmd>%!jq", opt = { desc = "Prettify json"} }
{ mode = "n", keys = "<leader>mp", cmd = "<cmd>%!jq", opt = { desc = "Prettify json" } },
},
}

View file

@ -1,3 +1,18 @@
-- ~/.config/yazi/init.lua
function Linemode:size_and_mtime()
local time = math.floor(self._file.cha.mtime or 0)
if time == 0 then
time = ""
elseif os.date("%Y", time) == os.date("%Y") then
time = os.date("%m-%d %H:%M", time)
else
time = os.date("%Y-%m-%d", time)
end
local size = self._file:size()
return string.format("%s %s", size and ya.readable_size(size) or "/", time)
end
require("starship"):setup()
require("git"):setup()

View file

@ -1,6 +1,7 @@
[mgr]
show_hidden = true
linemode = "size_and_mtime"
linemode = "size_and_mtime" # See ./init.lua Linemode:size_and_mtime
[preview]
wrap = "yes"