updates
This commit is contained in:
parent
b1b8726545
commit
5a42e61598
8 changed files with 237 additions and 133 deletions
|
@ -121,6 +121,7 @@
|
|||
./nixos/dotfiles
|
||||
|
||||
./nixos/configs/stylix
|
||||
./nixos/configs/ld.nix
|
||||
./nixos/configs/lix.nix
|
||||
./nixos/configs/nix.nix
|
||||
./nixos/configs/ccache.nix
|
||||
|
|
9
nixos/configs/ld.nix
Normal file
9
nixos/configs/ld.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
#
|
||||
# Nix-ld configuration.
|
||||
#
|
||||
{pkgs, ...}: {
|
||||
programs.nix-ld.enable = true;
|
||||
programs.nix-ld.libraries = with pkgs; [
|
||||
|
||||
];
|
||||
}
|
|
@ -103,9 +103,7 @@ with pkgs;
|
|||
supersonic
|
||||
|
||||
# Development.
|
||||
jetbrains.rust-rover
|
||||
jetbrains.webstorm
|
||||
jetbrains.clion
|
||||
jetbrains-toolbox
|
||||
|
||||
# Xwayland support.
|
||||
xwayland
|
||||
|
|
|
@ -4,7 +4,7 @@ return {
|
|||
opts = {
|
||||
ensure_installed = {
|
||||
"nil",
|
||||
"pyright",
|
||||
"basedpyright",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
96
nvim/lua/plugins/snacks.lua
Normal file
96
nvim/lua/plugins/snacks.lua
Normal file
|
@ -0,0 +1,96 @@
|
|||
-- lazy.nvim
|
||||
return {
|
||||
"folke/snacks.nvim",
|
||||
---@type snacks.Config
|
||||
opts = {
|
||||
image = {},
|
||||
dashboard = {
|
||||
---@class snacks.dashboard.Config
|
||||
---@field enabled? boolean
|
||||
---@field sections snacks.dashboard.Section
|
||||
---@field formats table<string, snacks.dashboard.Text|fun(item:snacks.dashboard.Item, ctx:snacks.dashboard.Format.ctx):snacks.dashboard.Text>
|
||||
width = 70,
|
||||
row = nil, -- dashboard position. nil for center
|
||||
col = nil, -- dashboard position. nil for center
|
||||
pane_gap = 4, -- empty columns between vertical panes
|
||||
autokeys = "1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", -- autokey sequence
|
||||
preset = {
|
||||
pick = nil,
|
||||
keys = {
|
||||
{
|
||||
icon = " ",
|
||||
key = "f",
|
||||
desc = "Find File",
|
||||
action = ":lua Snacks.dashboard.pick('files')",
|
||||
},
|
||||
{ icon = " ", key = "n", desc = "New File", action = ":ene | startinsert" },
|
||||
{
|
||||
icon = " ",
|
||||
key = "g",
|
||||
desc = "Find Text",
|
||||
action = ":lua Snacks.dashboard.pick('live_grep')",
|
||||
},
|
||||
{
|
||||
icon = " ",
|
||||
key = "r",
|
||||
desc = "Recent Files",
|
||||
action = ":lua Snacks.dashboard.pick('oldfiles')",
|
||||
},
|
||||
{
|
||||
icon = " ",
|
||||
key = "c",
|
||||
desc = "Config",
|
||||
action = ":lua Snacks.dashboard.pick('files', {cwd = vim.fn.stdpath('config')})",
|
||||
},
|
||||
{ icon = " ", key = "s", desc = "Restore Session", section = "session" },
|
||||
{
|
||||
icon = " ",
|
||||
key = "L",
|
||||
desc = "Lazy",
|
||||
action = ":Lazy",
|
||||
enabled = package.loaded.lazy ~= nil,
|
||||
},
|
||||
{ icon = " ", key = "q", desc = "Quit", action = ":qa" },
|
||||
},
|
||||
-- Used by the `header` section
|
||||
header = [[
|
||||
██╗ ██╗████████╗███████╗███╗ ███╗██╗ ██╗██╗ ██╗██╗███╗ ███╗
|
||||
██║ ██╔╝╚══██╔══╝██╔════╝████╗ ████║██║ ██╔╝██║ ██║██║████╗ ████║
|
||||
█████╔╝ ██║ █████╗ ██╔████╔██║█████╔╝ ██║ ██║██║██╔████╔██║
|
||||
██╔═██╗ ██║ ██╔══╝ ██║╚██╔╝██║██╔═██╗ ╚██╗ ██╔╝██║██║╚██╔╝██║
|
||||
██║ ██╗ ██║ ███████╗██║ ╚═╝ ██║██║ ██╗ ╚████╔╝ ██║██║ ╚═╝ ██║
|
||||
╚═╝ ╚═╝ ╚═╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═══╝ ╚═╝╚═╝ ╚═╝]],
|
||||
},
|
||||
-- item field formatters
|
||||
formats = {
|
||||
icon = function(item)
|
||||
if item.file and item.icon == "file" or item.icon == "directory" then
|
||||
return M.icon(item.file, item.icon)
|
||||
end
|
||||
return { item.icon, width = 2, hl = "icon" }
|
||||
end,
|
||||
footer = { "%s", align = "center" },
|
||||
header = { "%s", align = "center" },
|
||||
file = function(item, ctx)
|
||||
local fname = vim.fn.fnamemodify(item.file, ":~")
|
||||
fname = ctx.width and #fname > ctx.width and vim.fn.pathshorten(fname) or fname
|
||||
if #fname > ctx.width then
|
||||
local dir = vim.fn.fnamemodify(fname, ":h")
|
||||
local file = vim.fn.fnamemodify(fname, ":t")
|
||||
if dir and file then
|
||||
file = file:sub(-(ctx.width - #dir - 2))
|
||||
fname = dir .. "/…" .. file
|
||||
end
|
||||
end
|
||||
local dir, file = fname:match("^(.*)/(.+)$")
|
||||
return dir and { { dir .. "/", hl = "dir" }, { file, hl = "file" } } or { { fname, hl = "file" } }
|
||||
end,
|
||||
},
|
||||
sections = {
|
||||
{ section = "header" },
|
||||
{ section = "keys", gap = 1, padding = 1 },
|
||||
{ section = "startup" },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
Loading…
Add table
Reference in a new issue