This commit is contained in:
gwg313 2024-11-25 11:57:38 -05:00
parent 63bbeaca3b
commit ce01469113
Signed by: gwg313
GPG key ID: 60FF63B4826B7400
37 changed files with 1621 additions and 384 deletions

View file

@ -3,10 +3,10 @@
plugins.bufferline = let
mouse = {
right =
# lua
# Lua
"'vertical sbuffer %d'";
close =
# lua
# Lua
''
function(bufnum)
require("mini.bufremove").delete(bufnum)
@ -25,7 +25,7 @@
close_icon = "";
diagnostics = "nvim_lsp";
diagnostics_indicator =
# lua
# Lua
''
function(count, level, diagnostics_dict, context)
local s = ""
@ -57,13 +57,11 @@
};
priority = 2;
# icon = "";
matcher.__raw =
# lua
''
function(buf)
return buf.name:match('%test') or buf.name:match('%.spec')
end
'';
matcher.__raw = ''
function(buf)
return buf.name:match('%test') or buf.name:match('%.spec')
end
'';
}
{
name = "Docs";
@ -73,13 +71,11 @@
sp = "#494d64";
};
auto_close = false;
matcher.__raw =
# lua
''
function(buf)
return buf.name:match('%.md') or buf.name:match('%.txt')
end
'';
matcher.__raw = ''
function(buf)
return buf.name:match('%.md') or buf.name:match('%.txt')
end
'';
}
];
};
@ -94,13 +90,11 @@
max_prefix_length = 15;
modified_icon = "";
numbers.__raw =
# lua
''
function(opts)
return string.format('%s·%s', opts.raise(opts.id), opts.lower(opts.ordinal))
end
'';
numbers.__raw = ''
function(opts)
return string.format('%s·%s', opts.raise(opts.id), opts.lower(opts.ordinal))
end
'';
persist_buffer_sort = true;
right_mouse_command.__raw = mouse.right;
@ -122,61 +116,6 @@
}
];
};
# NOTE: fixes colorscheme with transparent_background
# and better contrast selected tabs
highlights = let
commonBgColor = "#363a4f";
commonFgColor = "#1e2030";
commonSelectedAttrs = {
bg = commonBgColor;
};
# Define a set with common selected attributes
selectedAttrsSet = builtins.listToAttrs (
map
(name: {
inherit name;
value = commonSelectedAttrs;
})
[
# "separator_selected" # Handled uniquely
"buffer_selected"
"tab_selected"
"numbers_selected"
"close_button_selected"
"duplicate_selected"
"modified_selected"
"info_selected"
"warning_selected"
"error_selected"
"hint_selected"
"diagnostic_selected"
"info_diagnostic_selected"
"warning_diagnostic_selected"
"error_diagnostic_selected"
"hint_diagnostic_selected"
]
);
in
# Merge the common selected attributes with the unique attributes
selectedAttrsSet
// {
fill = {
bg = commonFgColor;
};
separator = {
fg = commonFgColor;
};
separator_visible = {
fg = commonFgColor;
};
separator_selected = {
bg = commonBgColor;
fg = commonFgColor;
};
};
};
};
@ -184,46 +123,41 @@
{
mode = "n";
key = "<leader>bP";
action = ":BufferLineTogglePin<cr>";
action = "<cmd>BufferLineTogglePin<cr>";
options = {
desc = "Pin buffer toggle";
silent = true;
};
}
{
mode = "n";
key = "<leader>bp";
action = ":BufferLinePick<cr>";
action = "<cmd>BufferLinePick<cr>";
options = {
desc = "Pick Buffer";
silent = true;
};
}
{
mode = "n";
key = "<leader>bsd";
action = ":BufferLineSortByDirectory<cr>";
action = "<cmd>BufferLineSortByDirectory<cr>";
options = {
desc = "Sort By Directory";
silent = true;
};
}
{
mode = "n";
key = "<leader>bse";
action = ":BufferLineSortByExtension<cr>";
action = "<cmd>BufferLineSortByExtension<cr>";
options = {
desc = "Sort By Extension";
silent = true;
};
}
{
mode = "n";
key = "<leader>bsr";
action = ":BufferLineSortByRelativeDirectory<cr>";
action = "<cmd>BufferLineSortByRelativeDirectory<cr>";
options = {
desc = "Sort By Relative Directory";
silent = true;
};
}
];

View file

@ -8,7 +8,8 @@ _: {
percentage = 0.25;
};
flavour = "macchiato";
# flavour = "macchiato";
flavour = "latte";
integrations = {
aerial = true;

View file

@ -43,44 +43,45 @@
plugins = {
conform-nvim = {
enable = true;
formatOnSave =
# lua
''
function(bufnr)
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
return
end
if slow_format_filetypes[vim.bo[bufnr].filetype] then
return
end
local function on_format(err)
if err and err:match("timeout$") then
slow_format_filetypes[vim.bo[bufnr].filetype] = true
settings = {
format_on_save =
# lua
''
function(bufnr)
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
return
end
if slow_format_filetypes[vim.bo[bufnr].filetype] then
return
end
local function on_format(err)
if err and err:match("timeout$") then
slow_format_filetypes[vim.bo[bufnr].filetype] = true
end
end
return { timeout_ms = 200, lsp_fallback = true }, on_format
end
'';
format_after_save =
# lua
''
function(bufnr)
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
return
end
if not slow_format_filetypes[vim.bo[bufnr].filetype] then
return
end
return { lsp_fallback = true }
end
return { timeout_ms = 200, lsp_fallback = true }, on_format
end
'';
formatAfterSave =
# lua
''
function(bufnr)
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
return
end
if not slow_format_filetypes[vim.bo[bufnr].filetype] then
return
end
return { lsp_fallback = true }
end
'';
'';
};
# NOTE:
# Conform will run multiple formatters sequentially

View file

@ -14,16 +14,22 @@ _: {
./git-conflict.nix
./gitsigns.nix
./harpoon.nix
# ./haskell-scope-highlighting.nix
./illuminate.nix
# ./obsidian.nix
./indent-blankline.nix
./lightbulb.nix
./lualine.nix
./luasnip.nix
./lean.nix
./lsp.nix
./marks.nix
./mark-radar.nix
./mini.nix
./mini-bufremove.nix
./mini-surround.nix
./mini-indentscope.nix
./glow.nix
./navic.nix
./nix.nix
./noice.nix
@ -31,6 +37,7 @@ _: {
./precognition.nix
./spectre.nix
./refactoring.nix
./render-markdown.nix
./telescope.nix
./todo-comments.nix
./toggleterm.nix

View file

@ -0,0 +1,41 @@
{pkgs, ...}: let
stylePkg = pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "glamour";
rev = "f410083af1e9b2418bcd73dbbbc987461d4aa292";
hash = "sha256-a7yR19KcxIS4UPhuhB+X0B+s8D5eytw0/EB0X4z46kA=";
};
in {
programs.nixvim = {
plugins = {
glow = {
enable = true;
settings = {
border = "single";
style = "${stylePkg.outPath}/themes/catppuccin-latte.json";
};
};
which-key.settings.spec = [
{
__unkeyed = "<leader>p";
mode = "n";
group = "Preview";
icon = " ";
}
];
};
keymaps = [
{
mode = "n";
key = "<leader>pg";
action = "<cmd>Glow<CR>";
options = {
desc = "Glow (Markdown)";
};
}
];
};
}

View file

@ -0,0 +1,7 @@
{...}: {
programs.nixvim = {
plugins.haskell-scope-highlighting = {
enable = true;
};
};
}

View file

@ -15,7 +15,7 @@
fromLua = [{paths = [../snippets];}];
};
extraFiles = {
"personal/luasnip-helper-funcs.lua".text = ''
"lua/personal/luasnip-helper-funcs.lua".text = ''
local M = {}
local ls = require("luasnip")

View file

@ -0,0 +1,7 @@
{...}: {
programs.nixvim = {
plugins.mark-radar = {
enable = true;
};
};
}

View file

@ -0,0 +1,7 @@
{...}: {
programs.nixvim = {
plugins.marks = {
enable = true;
};
};
}

View file

@ -0,0 +1,18 @@
{...}: {
programs.nixvim = {
plugins.mini = {
enable = true;
mockDevIcons = true;
modules = {
ai = {};
align = {};
basics = {};
bracketed = {};
git = {};
icons = {};
pairs = {};
};
};
};
}

View file

@ -0,0 +1,7 @@
{...}: {
programs.nixvim = {
plugins.obsidian = {
enable = true;
};
};
}

View file

@ -5,7 +5,7 @@
keymaps = [
{
mode = "n";
key = "<leader>uP";
key = "<leader>vp";
action.__raw = ''
function()
if require("precognition").toggle() then

View file

@ -0,0 +1,9 @@
{pkgs, ...}: {
programs.nixvim = {
plugins.render-markdown = {
enable = true;
};
};
home.packages = with pkgs; [python312Packages.pylatexenc];
}

View file

@ -7,7 +7,12 @@
settings = {
indent.enable = true;
highlight.enable = true;
highlight = {
enable = true;
disable = [
"latex"
];
};
incremental_selection.enable = true;
};
};

View file

@ -3,7 +3,7 @@
plugins.vimtex = {
enable = true;
settings = {
compiler_method = "latexrun";
compiler_method = "pdflatex";
toc_config = {
split_pos = "vert topleft";
split_width = 40;