{ pkgs, config, lib, ... }: { home.packages = with pkgs; [ zathura ripgrep fd ]; programs.neovim = { enable = true; defaultEditor = true; viAlias = true; vimAlias = true; plugins = with pkgs.vimPlugins; [ vimtex (nvim-treesitter.withPlugins (p: [ p.lua p.nix p.rust p.python p.bash p.latex ])) telescope-nvim plenary-nvim which-key-nvim catppuccin-nvim { plugin = vim-startify; # Add the plugin and its coresponding config config = "let g:startify_change_to_vcs_root = 0"; } ]; extraLuaConfig = '' vim.g.mapleader = " " vim.opt.number = true vim.opt.relativenumber = true vim.opt.clipboard = "unnamedplus" vim.o.timeout = true vim.o.timeoutlen = 300 vim.cmd.colorscheme("catppuccin") -- Catppuccin theme require("catppuccin").setup({ flavour = "mocha", -- latte, frappe, macchiato, mocha transparent_background = false, }) -- Treesitter require("nvim-treesitter.configs").setup({ highlight = { enable = true }, indent = { enable = true }, }) -- Telescope local telescope = require("telescope") local builtin = require("telescope.builtin") telescope.setup({ defaults = { layout_strategy = "horizontal", layout_config = { prompt_position = "top", }, sorting_strategy = "ascending", winblend = 0, }, }) -- Which-key keybind show require("which-key").setup({ -- Optional custom config here }) -- Register some categories (optional) require("snacks").register({ f = { name = "file" }, g = { name = "git" }, b = { name = "buffers" }, }) -- Telescope keymaps vim.keymap.set("n", "ff", builtin.find_files) vim.keymap.set("n", "fg", builtin.live_grep) vim.keymap.set("n", "fb", builtin.buffers) vim.keymap.set("n", "fh", builtin.help_tags) ------------------------------------------------------------------ -- LaTeX configuration (from old LazyVim config) ------------------------------------------------------------------ -- vimtex settings vim.g.vimtex_view_method = "zathura" vim.g.vimtex_compiler_latexmk = { build_dir = "", executable = "latexmk", options = { "-pdf", "-interaction=nonstopmode", "-synctex=1", "-file-line-error", }, } -- Auto settings for LaTeX files vim.api.nvim_create_autocmd("FileType", { pattern = "tex", callback = function() vim.opt_local.wrap = true vim.opt_local.linebreak = true vim.opt_local.breakindent = true vim.opt_local.breakindentopt = "shift:2" vim.opt_local.textwidth = 0 end, }) ''; }; }