This commit is contained in:
Ray Andrew 2024-11-20 00:36:49 -06:00
parent 106459cd00
commit c60f15823b
10 changed files with 123 additions and 57 deletions

View file

@ -24,12 +24,14 @@ in
# This second one is chosen by auto_view due to the copiousoutput tag
text/html; ${w3m} -I %{charset} -T text/html -cols 140 -o tmp_dir=~/.cache/w3m -o display_link_number=1 -dump; copiousoutput
text/plain; vim %s
text/plain; nvim %s
#PDFs
application/x-pdf; ${zathura} '%s'; test=test -n "$DISPLAY"
application/pdf; ${zathura} '%s'; test=test -n "$DISPLAY"
message/rfc822; nvim %s
#Images
# image/png; /usr/bin/feh %s
# image/jpeg; /usr/bin/feh %s

View file

@ -31,6 +31,7 @@
jq
sd
ugrep
unzip
]
++ (lib.attrValues config.custom.shell.packages);

View file

@ -4,11 +4,33 @@
config,
...
}:
let
home = config.home.homeDirectory;
in
{
home.packages = with pkgs; [
git
programs.git = {
enable = true;
lfs = {
enable = true;
};
userEmail = "rs@rs.ht";
userName = "Ray Andrew";
signing.key = "${home}/.ssh/id_ed25519.pub";
};
programs.gh = {
enable = true;
settings = {
git_protocol = "ssh";
};
extensions = with pkgs; [
gh-copilot
];
# programs.git = {
# enable = true;
# };
};
custom.persist = {
home.files = [
".config/gh/hosts.yml"
];
};
}

View file

@ -322,7 +322,7 @@ require("lazy").setup({
-- Fuzzy find all the symbols in your current workspace.
-- Similar to document symbols, except searches over your entire project.
map("<leader>ws", require("telescope.builtin").lsp_dynamic_workspace_symbols, "[W]orkspace [S]ymbols")
map("<leader>ps", require("telescope.builtin").lsp_dynamic_workspace_symbols, "[P]roject [S]ymbols")
-- Rename the variable under your cursor.
-- Most Language Servers support renaming across files, etc.
@ -388,6 +388,7 @@ require("lazy").setup({
-- gopls = {},
-- pyright = {},
-- rust_analyzer = {},
taplo = {},
lua_ls = {
settings = {
Lua = {
@ -400,6 +401,13 @@ require("lazy").setup({
},
}
if vim.fn.executable('pip') == 1 then
vim.list_extend(servers, {
pylsp = {},
})
end
require("mason").setup()
local ensure_installed = vim.tbl_keys(servers or {})
vim.list_extend(ensure_installed, {
@ -415,6 +423,7 @@ require("lazy").setup({
require("lspconfig")[server_name].setup(server)
end,
},
-- ensure_installed = ensure_installed,
})
end,
},
@ -425,29 +434,30 @@ require("lazy").setup({
cmd = { "ConformInfo" },
keys = {
{
"<leader>f",
"<leader>ff",
function()
require("conform").format({ async = true, lsp_format = "fallback" })
end,
mode = "",
desc = "[F]ormat buffer",
desc = "[F]ile [F]ormat",
},
},
opts = {
notify_on_error = false,
format_on_save = function(bufnr)
local disable_filetypes = { c = true, cpp = true, python = true }
local lsp_format_opt
if disable_filetypes[vim.bo[bufnr].filetype] then
lsp_format_opt = "never"
else
lsp_format_opt = "fallback"
end
return {
timeout_ms = 500,
lsp_format = lsp_format_opt,
}
end,
format_on_save = nil,
-- format_on_save = function(bufnr)
-- local disable_filetypes = { c = true, cpp = true, python = true }
-- local lsp_format_opt
-- if disable_filetypes[vim.bo[bufnr].filetype] then
-- lsp_format_opt = "never"
-- else
-- lsp_format_opt = "fallback"
-- end
-- return {
-- timeout_ms = 500,
-- lsp_format = lsp_format_opt,
-- }
-- end,
formatters_by_ft = {
lua = { "stylua" },
python = { "isort", "black" },
@ -568,29 +578,28 @@ require("lazy").setup({
-- end,
-- },
-- {
-- "ellisonleao/gruvbox.nvim",
-- priority = 1000,
-- opts = {},
-- config = function(_, opts)
-- require("gruvbox").setup(opts)
-- vim.o.background = "dark"
-- vim.cmd.colorscheme("gruvbox")
-- end,
-- },
{
"blazkowolf/gruber-darker.nvim",
priority = 1000,
"sainnhe/gruvbox-material",
lazy = false,
opts = {},
config = function(_, opts)
require("gruber-darker").setup(opts)
vim.cmd.colorscheme("gruber-darker")
vim.o.background = "dark"
priority = 1000,
config = function()
vim.g.gruvbox_material_enable_italic = true
vim.cmd.colorscheme("gruvbox-material")
end,
},
-- {
-- "blazkowolf/gruber-darker.nvim",
-- priority = 1000,
-- lazy = false,
-- opts = {},
-- config = function(_, opts)
-- require("gruber-darker").setup(opts)
-- vim.cmd.colorscheme("gruber-darker")
-- vim.o.background = "dark"
-- end,
-- },
{ -- Highlight todo, notes, etc in comments
"folke/todo-comments.nvim",
cmd = { "TodoTrouble", "TodoTelescope" },
@ -1154,13 +1163,13 @@ local yank_relative_path = function()
local path = MiniFiles.get_fs_entry().path
path = vim.fn.fnamemodify(path, ":.")
vim.fn.setreg("+", path)
vim.notify(path)
vim.notify("Copied: " .. path)
end
local yank_absolute_path = function()
local path = MiniFiles.get_fs_entry().path
vim.fn.setreg("+", path)
vim.notify(path)
vim.notify("Copied: " .. path)
end
local set_mark = function(id, path, desc)
@ -1187,5 +1196,9 @@ vim.api.nvim_create_autocmd("User", {
end,
})
vim.api.nvim_create_autocmd({ "BufReadPost", "BufNewFile", "BufWritePre" }, {
callback = require("mason-tool-installer").run_on_start,
})
-- The line beneath this is called `modeline`. See `:help modeline`
-- vim: ts=2 sts=2 sw=2 et

View file

@ -7,7 +7,7 @@
"fidget.nvim": { "branch": "main", "commit": "e2a175c2abe2d4f65357da1c98c59a5cfb2b543f" },
"friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" },
"gitsigns.nvim": { "branch": "main", "commit": "ac5aba6dce8c06ea22bea2c9016f51a2dbf90dc7" },
"gruber-darker.nvim": { "branch": "main", "commit": "a2dda61d9c1225e16951a51d6b89795b0ac35cd6" },
"gruvbox-material": { "branch": "master", "commit": "170148af9350f578f3623f810e54698fa1e5bdbf" },
"harpoon": { "branch": "harpoon2", "commit": "a84ab829eaf3678b586609888ef52f7779102263" },
"lazy.nvim": { "branch": "main", "commit": "7967abe55752aa90532e6bb4bd4663fe27a264cb" },
"lazydev.nvim": { "branch": "main", "commit": "d5800897d9180cea800023f2429bce0a94ed6064" },
@ -24,6 +24,7 @@
"nvim-cmp": { "branch": "main", "commit": "f17d9b4394027ff4442b298398dfcaab97e40c4f" },
"nvim-lspconfig": { "branch": "master", "commit": "f012c1b176f0e3c71f40eb309bdec0316689462e" },
"nvim-treesitter": { "branch": "master", "commit": "37427012d1c77c544356bfff0c9acc88fd3256bc" },
"oil.nvim": { "branch": "master", "commit": "8ea40b5506115b6d355e304dd9ee5089f7d78601" },
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
"snacks.nvim": { "branch": "main", "commit": "be8feef4ab584f50aaa96b69d50b3f86a35aacff" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" },

View file

@ -57,6 +57,39 @@ Host polaris
ControlPersist yes
LogLevel FATAL
# LLNL
Host lassen
ForwardX11Trusted yes
User sinurat1
HostName lassen.llnl.gov
ControlMaster auto
ControlPersist yes
LogLevel FATAL
Host corona
ForwardX11Trusted yes
User sinurat1
HostName corona.llnl.gov
ControlMaster auto
ControlPersist yes
LogLevel FATAL
Host czgitlab
HostName czgitlab.llnl.gov
ProxyCommand ssh oslic -W %h:7999
ControlMaster no
User sinurat1
Host oslic
ForwardX11Trusted yes
Hostname oslic.llnl.gov
PreferredAuthentications password
User sinurat1
ControlMaster auto
ControlPersist yes
LogLevel FATAL
# Box
Host box
@ -148,7 +181,7 @@ Host cs-uc-07
# ControlPersist yes
LogLevel FATAL
ForwardAgent yes
ForwardX11 yes
# ForwardX11 yes
Host ucare-gpu-1.cs.uchicago.edu
ForwardAgent yes

View file

@ -150,8 +150,8 @@ in
"${modifier}+s" = "layout stacking";
"${modifier}+t" = "layout tabbed";
"${modifier}+e" = "layout toggle split";
"${modifier}+Shift+p" = "floating toggle";
"${modifier}+p" = "focus mode_toggle";
"${modifier}+p" = "floating toggle";
"${modifier}+Shift+p" = "focus mode_toggle";
"${modifier}+f" = "fullscreen toggle";
"${modifier}+Shift+v" = "split v";
"${modifier}+v" = "split h";

View file

@ -50,7 +50,7 @@
sway.enable = false;
};
gnome = {
enable = true;
enable = false;
stylix = true;
};
kde = {

View file

@ -9,8 +9,8 @@
autoEnable = false;
image = pkgs.nixos-artwork.wallpapers.nineish-dark-gray.src;
# base16Scheme = "${pkgs.base16-schemes}/share/themes/atelier-forest.yaml";
# base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-material-dark-hard.yaml";
base16Scheme = "${pkgs.base16-schemes}/share/themes/gruber.yaml";
base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-material-dark-hard.yaml";
# base16Scheme = "${pkgs.base16-schemes}/share/themes/gruber.yaml";
polarity = "dark";
fonts = {
serif = config.stylix.fonts.sansSerif;

View file

@ -4,15 +4,9 @@
enable = true;
# xdgOpenUsePortal = true;
wlr.enable = true;
extraPortals = with pkgs; [
# xdg-desktop-portal-kde
# xdg-desktop-portal-gnome
configPackages = with pkgs; [
xdg-desktop-portal-gtk
];
# config = {
# common = { default = [ "gtk" ]; };
# gnome = { default = [ "gnome" "gtk" ]; };
# };
};
systemd.tmpfiles.rules = [