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
|
||||
|
|
|
@ -1,86 +1,86 @@
|
|||
vim.cmd([[
|
||||
syntax on
|
||||
filetype plugin indent on
|
||||
syntax on
|
||||
filetype plugin indent on
|
||||
|
||||
let mapleader=","
|
||||
let mapleader=","
|
||||
|
||||
""" Options
|
||||
set number " Show line numbers.
|
||||
set modeline " Allow vim commands in text file comments.
|
||||
set undofile " Persistent undo tree.
|
||||
set incsearch " Incremental search.
|
||||
set tabstop=4 " Number of visual spaces to be displayed per HT.
|
||||
set expandtab " Expand tabs to spaces by default.
|
||||
set shiftwidth=0 " Use tabstop value for indenting.
|
||||
set scrolloff=2 " Keep 2 lines between the end of the buffer and the cursor.
|
||||
set sidescrolloff=2 " Keep 2 characters between the current column and the screen edge.
|
||||
set mouse=n " Enable the mouse in normal mode.
|
||||
set colorcolumn=120
|
||||
set wildmenu " Tab-complete command menu.
|
||||
set wildmode=longest:full,full " Most bash-like way.
|
||||
set wildignorecase " Ignore case when completing.
|
||||
set splitright " Make :vsplit put the new window on the right.
|
||||
set splitbelow " Make :split put the new window on the bottom.
|
||||
set foldlevel=5 " Don't fold almost anything by default.
|
||||
set hidden " Allow for hidden, modified but not written buffers.
|
||||
set bufhidden=hide " Hide buffers instead of deleting or unloading them.
|
||||
set ignorecase
|
||||
set smartcase
|
||||
set gdefault
|
||||
set cindent " A good basis/default for many languages, though this is usually overridden by the filetype plugin.
|
||||
set cinoptions=l1,j1 " Indent case blocks correct, and indent Java anonymous classes correctly.
|
||||
" Autowrap comments using textwidth, inserting the comment leader,
|
||||
" and remove the comment leader when joining lines when it makes sense.
|
||||
set formatoptions=cj
|
||||
" Don't display . on folds.
|
||||
set fillchars=fold:\
|
||||
set diffopt=algorithm:patience
|
||||
set fsync " Syncs the filesystem after :write.
|
||||
set nowrap
|
||||
""" Options
|
||||
set number " Show line numbers.
|
||||
set modeline " Allow vim commands in text file comments.
|
||||
set undofile " Persistent undo tree.
|
||||
set incsearch " Incremental search.
|
||||
set tabstop=4 " Number of visual spaces to be displayed per HT.
|
||||
set expandtab " Expand tabs to spaces by default.
|
||||
set shiftwidth=0 " Use tabstop value for indenting.
|
||||
set scrolloff=2 " Keep 2 lines between the end of the buffer and the cursor.
|
||||
set sidescrolloff=2 " Keep 2 characters between the current column and the screen edge.
|
||||
set mouse=n " Enable the mouse in normal mode.
|
||||
set colorcolumn=120
|
||||
set wildmenu " Tab-complete command menu.
|
||||
set wildmode=longest:full,full " Most bash-like way.
|
||||
set wildignorecase " Ignore case when completing.
|
||||
set splitright " Make :vsplit put the new window on the right.
|
||||
set splitbelow " Make :split put the new window on the bottom.
|
||||
set foldlevel=5 " Don't fold almost anything by default.
|
||||
set hidden " Allow for hidden, modified but not written buffers.
|
||||
set bufhidden=hide " Hide buffers instead of deleting or unloading them.
|
||||
set ignorecase
|
||||
set smartcase
|
||||
set gdefault
|
||||
set cindent " A good basis/default for many languages, though this is usually overridden by the filetype plugin.
|
||||
set cinoptions=l1,j1 " Indent case blocks correct, and indent Java anonymous classes correctly.
|
||||
" Autowrap comments using textwidth, inserting the comment leader,
|
||||
" and remove the comment leader when joining lines when it makes sense.
|
||||
set formatoptions=cj
|
||||
" Don't display . on folds.
|
||||
set fillchars=fold:\
|
||||
set diffopt=algorithm:patience
|
||||
set fsync " Syncs the filesystem after :write.
|
||||
set nowrap
|
||||
|
||||
set updatetime=1000 "Lets languageservers update faster, and shortens the time for CursorHold.
|
||||
set noshowmode " We're using lualine, so showing the mode in the command line is redundant.
|
||||
set updatetime=1000 "Lets languageservers update faster, and shortens the time for CursorHold.
|
||||
set noshowmode " We're using lualine, so showing the mode in the command line is redundant.
|
||||
|
||||
" Have the visual-selection indent commands re-highlight the last visual selection after indenting.
|
||||
vnoremap > >gv
|
||||
vnoremap < <gv
|
||||
" Have the visual-selection indent commands re-highlight the last visual selection after indenting.
|
||||
vnoremap > >gv
|
||||
vnoremap < <gv
|
||||
|
||||
" Don't use backtick for anything, as it's our wezterm leader key and this leads
|
||||
" to typos.
|
||||
map ` <Nop>
|
||||
" Don't use backtick for anything, as it's our wezterm leader key and this leads
|
||||
" to typos.
|
||||
map ` <Nop>
|
||||
|
||||
" Leader Q should banish the current window.
|
||||
map <leader>q :only<cr> \| :q<cr>
|
||||
" Leader Q should banish the current window.
|
||||
map <leader>q :only<cr> \| :q<cr>
|
||||
|
||||
" Leader W should save and then banish the current window.
|
||||
map <leader>q :only<cr> \| :wq<cr>
|
||||
" Leader W should save and then banish the current window.
|
||||
map <leader>q :only<cr> \| :wq<cr>
|
||||
|
||||
" Fold augroups, functions, Lua, and Python
|
||||
let g:vimsyn_folding = 'aflP'
|
||||
" Fold augroups, functions, Lua, and Python
|
||||
let g:vimsyn_folding = 'aflP'
|
||||
|
||||
" Support embedded Lua and Python.
|
||||
let g:vimsyn_embed = 'lP'
|
||||
" Support embedded Lua and Python.
|
||||
let g:vimsyn_embed = 'lP'
|
||||
|
||||
" Highlight whitespace errors.
|
||||
let g:c_space_errors = 1
|
||||
let g:python_space_error_highlight = 1
|
||||
" Highlight whitespace errors.
|
||||
let g:c_space_errors = 1
|
||||
let g:python_space_error_highlight = 1
|
||||
|
||||
let g:python_highlight_builtins = 1
|
||||
let g:python_highlight_builtin_funcs = 1
|
||||
let g:python_highlight_builtin_types = 1
|
||||
let g:python_highlight_exceptions = 1
|
||||
let g:python_highlight_string_formatting = 1
|
||||
let g:python_highlight_string_format = 1
|
||||
let g:python_highlight_indent_errors = 1
|
||||
let g:python_highlight_space_errors = 1
|
||||
let g:python_highlight_class_vars = 1
|
||||
let g:python_highlight_builtins = 1
|
||||
let g:python_highlight_builtin_funcs = 1
|
||||
let g:python_highlight_builtin_types = 1
|
||||
let g:python_highlight_exceptions = 1
|
||||
let g:python_highlight_string_formatting = 1
|
||||
let g:python_highlight_string_format = 1
|
||||
let g:python_highlight_indent_errors = 1
|
||||
let g:python_highlight_space_errors = 1
|
||||
let g:python_highlight_class_vars = 1
|
||||
|
||||
let g:xsh_highlight_all = v:true
|
||||
let g:xsh_highlight_all = v:true
|
||||
|
||||
let g:NERDCustomDelimiters = { 'dosini': { 'left': '#' }, 'xonsh': { 'left': '#' } }
|
||||
let g:NERDCustomDelimiters = { 'dosini': { 'left': '#' }, 'xonsh': { 'left': '#' } }
|
||||
|
||||
" Use truecolor.
|
||||
set termguicolors
|
||||
" Use truecolor.
|
||||
set termguicolors
|
||||
|
||||
" Disable relative numbering, if anything turns it on.
|
||||
set nornu!
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
return {
|
||||
{
|
||||
"LazyVim/LazyVim",
|
||||
opts = {
|
||||
colorscheme = function() end,
|
||||
{
|
||||
"LazyVim/LazyVim",
|
||||
opts = {
|
||||
colorscheme = function() end,
|
||||
|
||||
defaults = {
|
||||
autocmds = true,
|
||||
keymaps = true,
|
||||
},
|
||||
defaults = {
|
||||
autocmds = true,
|
||||
keymaps = true,
|
||||
},
|
||||
|
||||
news = {
|
||||
lazyvim = false,
|
||||
neovim = false,
|
||||
},
|
||||
news = {
|
||||
lazyvim = false,
|
||||
neovim = false,
|
||||
},
|
||||
|
||||
-- icons used by other plugins
|
||||
-- stylua: ignore
|
||||
icons = {
|
||||
icons = {
|
||||
misc = {
|
||||
dots = "",
|
||||
},
|
||||
|
@ -80,42 +80,42 @@ return {
|
|||
Variable = " ",
|
||||
},
|
||||
},
|
||||
---@type table<string, string[]|boolean>?
|
||||
kind_filter = {
|
||||
default = {
|
||||
"Class",
|
||||
"Constructor",
|
||||
"Enum",
|
||||
"Field",
|
||||
"Function",
|
||||
"Interface",
|
||||
"Method",
|
||||
"Module",
|
||||
"Namespace",
|
||||
"Package",
|
||||
"Property",
|
||||
"Struct",
|
||||
"Trait",
|
||||
},
|
||||
markdown = false,
|
||||
help = false,
|
||||
-- you can specify a different filter for each filetype
|
||||
lua = {
|
||||
"Class",
|
||||
"Constructor",
|
||||
"Enum",
|
||||
"Field",
|
||||
"Function",
|
||||
"Interface",
|
||||
"Method",
|
||||
"Module",
|
||||
"Namespace",
|
||||
-- "Package", -- remove package since luals uses it for control flow structures
|
||||
"Property",
|
||||
"Struct",
|
||||
"Trait",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
---@type table<string, string[]|boolean>?
|
||||
kind_filter = {
|
||||
default = {
|
||||
"Class",
|
||||
"Constructor",
|
||||
"Enum",
|
||||
"Field",
|
||||
"Function",
|
||||
"Interface",
|
||||
"Method",
|
||||
"Module",
|
||||
"Namespace",
|
||||
"Package",
|
||||
"Property",
|
||||
"Struct",
|
||||
"Trait",
|
||||
},
|
||||
markdown = false,
|
||||
help = false,
|
||||
-- you can specify a different filter for each filetype
|
||||
lua = {
|
||||
"Class",
|
||||
"Constructor",
|
||||
"Enum",
|
||||
"Field",
|
||||
"Function",
|
||||
"Interface",
|
||||
"Method",
|
||||
"Module",
|
||||
"Namespace",
|
||||
-- "Package", -- remove package since luals uses it for control flow structures
|
||||
"Property",
|
||||
"Struct",
|
||||
"Trait",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
return {
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"nil",
|
||||
"pyright",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"nil",
|
||||
"basedpyright",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
return {
|
||||
-- disable the weird UI provided by noice.nvim
|
||||
{ "folke/noice.nvim", enabled = false },
|
||||
-- disable the weird UI provided by noice.nvim
|
||||
{ "folke/noice.nvim", enabled = false },
|
||||
}
|
||||
|
|
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