diff --git a/README.md b/README.md index cd20646..aaa2db8 100644 --- a/README.md +++ b/README.md @@ -2,4 +2,4 @@ first install enable lanzaboote 'sudo sbctl create-keys' rebuild 'sudo nixos-rebuild switch --flake .# --no-write-lock-file -L --builders ""' - +![](assets/2026-05-01-07-57-20.png) diff --git a/home/neovim.nix b/home/neovim.nix deleted file mode 100644 index 9d37f0e..0000000 --- a/home/neovim.nix +++ /dev/null @@ -1,139 +0,0 @@ -{ pkgs, ... }: -{ - programs.neovim = { - enable = true; - viAlias = true; - vimAlias = true; - defaultEditor = true; - - # Required for render-markdown and coc - withPython3 = true; - withNodeJs = true; - - # Keep your python deps for latex rendering - extraPython3Packages = ps: [ ps.pylatexenc ]; - - extraPackages = with pkgs; [ - fzf - wl-clipboard - xclip - ripgrep # Nvim-tree (and fzf) work better with ripgrep installed - ]; - - plugins = with pkgs.vimPlugins; [ - vim-indent-guides - - # --- UI / File Explorer (Replaces Chadtree) --- - nvim-tree-lua - nvim-web-devicons - - # --- Fuzzy Finder --- - fzf-vim - - # --- Editor Utilities --- - vim-lastplace - vim-nix - vim-yaml - - # --- Coding / LSP (CoC) --- - # Keeping CoC as requested (switching to Native LSP is a bigger task) - coc-nvim - coc-vimtex - coc-rust-analyzer - - # --- Markdown / LaTeX / Typst --- - vimtex - typst-vim - typst-preview-nvim - render-markdown-nvim - markdown-preview-nvim - - # --- AI --- - aider-nvim - - # --- Treesitter --- - (nvim-treesitter.withPlugins (p: [ - p.markdown - p.markdown_inline - p.latex - p.yaml - p.bash - p.rust - p.nix - p.lua - ])) - ]; - - # We can consolidate most settings into Lua for simplicity - extraLuaConfig = '' - -- ============================ - -- 1. General Settings - -- ============================ - vim.opt.number = true - vim.opt.backspace = { "indent", "eol", "start" } - vim.opt.tabstop = 2 - vim.opt.softtabstop = 0 - vim.opt.shiftwidth = 2 - vim.opt.expandtab = true - vim.opt.smarttab = true - vim.opt.autoindent = true - - -- Clipboard setup - vim.opt.clipboard = "unnamedplus" - - -- ============================ - -- 2. File Explorer (Nvim-tree) - -- ============================ - -- This replaces Chadtree. It is much more stable. - require("nvim-tree").setup({ - sort = { sorter = "case_sensitive" }, - view = { width = 30 }, - renderer = { group_empty = true }, - filters = { dotfiles = false }, - }) - - -- Toggle file explorer with e - vim.keymap.set('n', 'e', ':NvimTreeToggle', { silent = true }) - - -- ============================ - -- 3. Render Markdown Setup - -- ============================ - require('render-markdown').setup({ - latex = { - enabled = true, - converter = 'latex2text', - highlight = 'RenderMarkdownMath', - top_pad = 0, - bottom_pad = 0, - }, - }) - ''; - - # Vimscript is still best for specific CoC and FZF tweaks - extraConfig = '' - syntax on - set mouse=a - - " --- CoC Configuration --- - " Use Tab to trigger completion and navigate - inoremap - \ coc#pum#visible() ? coc#pum#next(1) : - \ CheckBackspace() ? "\" : - \ coc#refresh() - inoremap coc#pum#visible() ? coc#pum#prev(1) : "\" - - " Make (Enter) accept the selected item - inoremap coc#pum#visible() ? coc#pum#confirm() - \: "\u\\=coc#on_enter()\" - - function! CheckBackspace() abort - let col = col('.') - 1 - return !col || getline('.')[col - 1] =~# '\s' - endfunction - - " --- Keymaps --- - " Browser Preview Hotkey - nmap m MarkdownPreviewToggle - ''; - }; -} diff --git a/home/nixvim.nix b/home/nixvim.nix index 305f5ae..fc86c15 100644 --- a/home/nixvim.nix +++ b/home/nixvim.nix @@ -14,6 +14,7 @@ xclip ripgrep tree-sitter + imagemagick ]; globals.mapleader = " "; @@ -38,7 +39,7 @@ userCommands = { E = { - command = "require('oil').open()"; + command = "Oil"; desc = "Open oil file explorer"; }; }; @@ -87,43 +88,17 @@ autoEnableSources = true; settings = { mapping = { - "" = { - __raw = '' - cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_next_item() - elseif require('minuet.virtualtext').action.is_visible() then - require('minuet.virtualtext').action.accept() - else - fallback() - end - end, { 'i', 's' }) - ''; - }; - "" = { - __raw = '' - cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_prev_item() - elseif require('minuet.virtualtext').action.is_visible() then - require('minuet.virtualtext').action.dismiss() - else - fallback() - end - end, { 'i', 's' }) - ''; - }; + "" = "cmp.mapping.select_next_item()"; + "" = "cmp.mapping.select_prev_item()"; "" = "cmp.mapping.confirm({ select = true })"; "" = "cmp.mapping.complete()"; "" = "cmp.mapping.abort()"; }; sources = [ { name = "nvim_lsp"; } - { name = "minuet"; } { name = "path"; } { name = "buffer"; } ]; - performance.fetching_timeout = 3000; }; }; @@ -173,48 +148,40 @@ indent-blankline.enable = true; nix.enable = true; - minuet = { + clipboard-image = { enable = true; + clipboardPackage = pkgs.wl-clipboard; settings = { - provider = "openai_fim_compatible"; - n_completions = 1; - context_window = 1024; - throttle = 1500; - debounce = 600; - virtualtext = { - auto_trigger_ft = [ "*" ]; - show_on_completion_menu = false; - }; - provider_options = { - openai_fim_compatible = { - name = "Galadriel"; - end_point = "http://galadriel:11112/v1/completions"; - model = "qwen3.5"; - api_key = "supersecret"; - stream = true; - optional = { - max_tokens = 32; - }; - template = { - prompt = { - __raw = '' - function(context_before_cursor, context_after_cursor, _) - return '<|fim_prefix|>' - .. context_before_cursor - .. '<|fim_suffix|>' - .. context_after_cursor - .. '<|fim_middle|>' - end - ''; - }; - suffix = false; - }; - }; + default = { + img_dir = "assets"; + img_dir_txt = "assets"; + affix = "![]({img_path})"; }; }; }; + + image.enable = true; }; + extraConfigLua = '' + require("image").setup({ + backend = "sixel", + processor = "magick_cli", + integrations = { + markdown = { + enabled = true, + only_render_image_at_cursor = true, + only_render_image_at_cursor_mode = "popup", + }, + typst = { + enabled = true, + }, + }, + max_height_window_percentage = 50, + hijack_file_patterns = { "*.png", "*.jpg", "*.jpeg", "*.gif", "*.webp", "*.avif" }, + }) + ''; + keymaps = [ { mode = "n"; diff --git a/packages/android-cli/default.nix b/packages/android-cli/default.nix index 620062a..1545471 100644 --- a/packages/android-cli/default.nix +++ b/packages/android-cli/default.nix @@ -17,7 +17,7 @@ let src = fetchurl { url = "https://dl.google.com/android/cli/latest/linux_x86_64/android"; - hash = "sha256-louoe5M/sj0OXsiMFqjv1PJcTyJ0xuRM9j2lOv3hZzA="; + hash = "sha256-JtvdSQKKluLE/D/Asow2afsQCmOZ62xIMyIMElNl1l8="; }; nativeBuildInputs = [ autoPatchelfHook ];