mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 08:43:00 +00:00
fix(yazi): data column
This commit is contained in:
parent
d2b57af9ce
commit
9889fc8b7d
11 changed files with 66 additions and 29 deletions
26
home/dot_config/nvim/lsp/tinymist.lua
Normal file
26
home/dot_config/nvim/lsp/tinymist.lua
Normal 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,
|
||||||
|
}
|
||||||
|
|
@ -40,3 +40,6 @@ else
|
||||||
vim.o.background = 'light'
|
vim.o.background = 'light'
|
||||||
vim.cmd.colorscheme("rose-pine")
|
vim.cmd.colorscheme("rose-pine")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
vim.cmd.colorscheme("rose-pine-moon")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -73,3 +73,8 @@ vim.o.sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,
|
||||||
vim.o.mousemoveevent = true
|
vim.o.mousemoveevent = true
|
||||||
|
|
||||||
vim.fn.matchadd("Conceal", [[\%u200b]], 10, -1, { conceal = "" })
|
vim.fn.matchadd("Conceal", [[\%u200b]], 10, -1, { conceal = "" })
|
||||||
|
|
||||||
|
-- Grep
|
||||||
|
|
||||||
|
opt.grepformat = "%f:%l:%c:%m"
|
||||||
|
opt.grepprg = "rg --vimgrep"
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ local bufmap = {
|
||||||
{ mode = "n", keys = "<leader>mx", cmd = "<cmd>!chmod u+x %<CR>", opt = { desc = "Mark the file as executable" } },
|
{ mode = "n", keys = "<leader>mx", cmd = "<cmd>!chmod u+x %<CR>", opt = { desc = "Mark the file as executable" } },
|
||||||
},
|
},
|
||||||
json = {
|
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" } },
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,18 @@
|
||||||
-- ~/.config/yazi/init.lua
|
-- ~/.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("starship"):setup()
|
||||||
require("git"):setup()
|
require("git"):setup()
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
[mgr]
|
[mgr]
|
||||||
show_hidden = true
|
show_hidden = true
|
||||||
linemode = "size_and_mtime"
|
linemode = "size_and_mtime" # See ./init.lua Linemode:size_and_mtime
|
||||||
|
|
||||||
[preview]
|
[preview]
|
||||||
wrap = "yes"
|
wrap = "yes"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
{pkgs, ...}: {
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
keyd
|
|
||||||
];
|
|
||||||
|
|
||||||
services.keyd = {
|
|
||||||
enable = true;
|
|
||||||
keyboards = {
|
|
||||||
ids = ["*"];
|
|
||||||
settings = {
|
|
||||||
main = {
|
|
||||||
capslock = "overload(control, esc)";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -46,14 +46,14 @@
|
||||||
ghostscript
|
ghostscript
|
||||||
# Misc ta-lib ddgr protonvpn-cli
|
# Misc ta-lib ddgr protonvpn-cli
|
||||||
markdown-oxide
|
markdown-oxide
|
||||||
nushell
|
|
||||||
powershell
|
powershell
|
||||||
powershell-editor-services
|
|
||||||
package-version-server
|
|
||||||
gemini-cli
|
gemini-cli
|
||||||
codex
|
codex
|
||||||
imagemagick
|
imagemagick
|
||||||
miniserve
|
miniserve
|
||||||
jq
|
jq
|
||||||
|
srm
|
||||||
|
mediainfo
|
||||||
|
exiftool
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,15 @@
|
||||||
mpv
|
mpv
|
||||||
haruna
|
haruna
|
||||||
|
|
||||||
|
# Email
|
||||||
|
protonmail-bridge
|
||||||
|
thunderbird
|
||||||
|
birdtray
|
||||||
|
|
||||||
|
# Theming
|
||||||
papirus-icon-theme
|
papirus-icon-theme
|
||||||
|
rose-pine-cursor
|
||||||
|
|
||||||
pcloud
|
pcloud
|
||||||
telegram-desktop
|
telegram-desktop
|
||||||
steam
|
steam
|
||||||
|
|
@ -52,12 +60,6 @@
|
||||||
zotero
|
zotero
|
||||||
anki-bin
|
anki-bin
|
||||||
feishin
|
feishin
|
||||||
rose-pine-cursor
|
|
||||||
|
|
||||||
# Email
|
|
||||||
protonmail-bridge
|
|
||||||
thunderbird
|
|
||||||
birdtray
|
|
||||||
];
|
];
|
||||||
|
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@
|
||||||
# kdePackages.yakuake
|
# kdePackages.yakuake
|
||||||
krunner-vscodeprojects
|
krunner-vscodeprojects
|
||||||
jetbrains-runner
|
jetbrains-runner
|
||||||
|
plasmusic-toolbar
|
||||||
];
|
];
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
QT_STYLE_OVERRIDE = "Breeze";
|
QT_STYLE_OVERRIDE = "Breeze";
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@
|
||||||
in {
|
in {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
zsh-fzf-tab
|
zsh-fzf-tab
|
||||||
|
zsh-nix-shell
|
||||||
];
|
];
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -46,7 +47,7 @@ in {
|
||||||
|
|
||||||
# Globbing
|
# Globbing
|
||||||
setopt EXTENDED_GLOB # Extended globbing
|
setopt EXTENDED_GLOB # Extended globbing
|
||||||
setopt GLOB_DOTS # Include dotfiles in globbing
|
# setopt GLOB_DOTS # Include dotfiles in globbing
|
||||||
|
|
||||||
# Error correction
|
# Error correction
|
||||||
setopt CORRECT # Suggest corrections for commands
|
setopt CORRECT # Suggest corrections for commands
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue