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"

View file

@ -1,17 +0,0 @@
{pkgs, ...}: {
environment.systemPackages = with pkgs; [
keyd
];
services.keyd = {
enable = true;
keyboards = {
ids = ["*"];
settings = {
main = {
capslock = "overload(control, esc)";
};
};
};
};
}

View file

@ -46,14 +46,14 @@
ghostscript
# Misc ta-lib ddgr protonvpn-cli
markdown-oxide
nushell
powershell
powershell-editor-services
package-version-server
gemini-cli
codex
imagemagick
miniserve
jq
srm
mediainfo
exiftool
];
}

View file

@ -17,7 +17,15 @@
mpv
haruna
# Email
protonmail-bridge
thunderbird
birdtray
# Theming
papirus-icon-theme
rose-pine-cursor
pcloud
telegram-desktop
steam
@ -52,12 +60,6 @@
zotero
anki-bin
feishin
rose-pine-cursor
# Email
protonmail-bridge
thunderbird
birdtray
];
home.sessionVariables = {

View file

@ -11,6 +11,7 @@
# kdePackages.yakuake
krunner-vscodeprojects
jetbrains-runner
plasmusic-toolbar
];
home.sessionVariables = {
QT_STYLE_OVERRIDE = "Breeze";

View file

@ -7,6 +7,7 @@
in {
home.packages = with pkgs; [
zsh-fzf-tab
zsh-nix-shell
];
programs.zsh = {
enable = true;
@ -46,7 +47,7 @@ in {
# Globbing
setopt EXTENDED_GLOB # Extended globbing
setopt GLOB_DOTS # Include dotfiles in globbing
# setopt GLOB_DOTS # Include dotfiles in globbing
# Error correction
setopt CORRECT # Suggest corrections for commands