From 15d50528cf86e93bad19f65f1e4b47af49e94d71 Mon Sep 17 00:00:00 2001 From: Natasha Moongrave Date: Fri, 12 Jun 2026 13:37:13 +0200 Subject: Nuked everything --- home/mun/programs/nvim.nix | 329 --------------------------------------------- 1 file changed, 329 deletions(-) delete mode 100644 home/mun/programs/nvim.nix (limited to 'home/mun/programs/nvim.nix') diff --git a/home/mun/programs/nvim.nix b/home/mun/programs/nvim.nix deleted file mode 100644 index 7cda2e1..0000000 --- a/home/mun/programs/nvim.nix +++ /dev/null @@ -1,329 +0,0 @@ -{pkgs, ...}: { - home.packages = with pkgs; [ - zathura - ripgrep - fd - lazygit - stylua - alejandra - black - shfmt - typst - jdk21 # QwQ - gradle - - # Language servers - lua-language-server - nil - rust-analyzer - pyright - bash-language-server - texlab - tinymist - jdt-language-server - ]; - - programs.neovim = { - enable = true; - defaultEditor = true; - viAlias = true; - vimAlias = true; - - plugins = with pkgs.vimPlugins; [ - # UI - catppuccin-nvim - nvim-web-devicons - which-key-nvim - gitsigns-nvim - - # Syntax - (nvim-treesitter.withPlugins (p: [ - p.lua - p.nix - p.rust - p.python - p.bash - p.latex - p.c - p.typst - p.java - ])) - - # LSP - nvim-lspconfig - - # Completion / snippets - nvim-cmp - cmp-nvim-lsp - cmp_luasnip - luasnip - friendly-snippets - nvim-autopairs - - # Formatting - conform-nvim - comment-nvim - - # Navigation - telescope-nvim - plenary-nvim - nvim-tree-lua - - # Terminal - toggleterm-nvim - - # Writing - vimtex - orgmode - - # Start screen - { - plugin = vim-startify; - config = "let g:startify_change_to_vcs_root = 0"; - } - ]; - - extraLuaConfig = '' - ------------------------------------------------- - -- LEADER - ------------------------------------------------- - vim.g.mapleader = " " - - ------------------------------------------------- - -- BASIC OPTIONS - ------------------------------------------------- - vim.opt.number = true - vim.opt.relativenumber = true - vim.opt.clipboard = "unnamedplus" - vim.opt.showtabline = 2 - vim.o.timeout = true - vim.o.timeoutlen = 300 - - ------------------------------------------------- - -- THEME - ------------------------------------------------- - require("catppuccin").setup({ - flavour = "mocha", - }) - vim.cmd.colorscheme("catppuccin") - - ------------------------------------------------- - -- GITSIGNS - ------------------------------------------------- - require("gitsigns").setup() - - ------------------------------------------------- - -- TREESITTER - ------------------------------------------------- - require("nvim-treesitter.configs").setup({ - highlight = { enable = true }, - indent = { enable = true }, - }) - - vim.opt.foldmethod = "expr" - vim.opt.foldexpr = "nvim_treesitter#foldexpr()" - vim.opt.foldenable = false - - ------------------------------------------------- - -- SNIPPETS - ------------------------------------------------- - require("luasnip.loaders.from_vscode").lazy_load() - - ------------------------------------------------- - -- COMPLETION - ------------------------------------------------- - local cmp = require("cmp") - local luasnip = require("luasnip") - - cmp.setup({ - snippet = { - expand = function(args) - luasnip.lsp_expand(args.body) - end, - }, - mapping = cmp.mapping.preset.insert({ - [""] = cmp.mapping.complete(), - [""] = cmp.mapping.confirm({ select = true }), - }), - sources = { - { name = "nvim_lsp" }, - { name = "luasnip" }, - }, - }) - - require("nvim-autopairs").setup({}) - - ------------------------------------------------- - -- LSP - ------------------------------------------------- - local capabilities = require("cmp_nvim_lsp").default_capabilities() - - local servers = { - "lua_ls", - "nil_ls", - "rust_analyzer", - "pyright", - "bashls", - "texlab", - "tinymist" - } - - for _, server in ipairs(servers) do - vim.lsp.config(server, { - capabilities = capabilities - }) - vim.lsp.enable(server) - end - - ------------------------------------------------- - -- LSP KEYMAPS - ------------------------------------------------- - vim.keymap.set("n", "ld", vim.lsp.buf.definition) - vim.keymap.set("n", "lD", vim.lsp.buf.declaration) - vim.keymap.set("n", "li", vim.lsp.buf.implementation) - vim.keymap.set("n", "lr", vim.lsp.buf.references) - vim.keymap.set("n", "lh", vim.lsp.buf.hover) - vim.keymap.set("n", "ln", vim.lsp.buf.rename) - vim.keymap.set("n", "la", vim.lsp.buf.code_action) - vim.keymap.set("n", "lf", function() vim.lsp.buf.format() end) - - ------------------------------------------------- - -- DIAGNOSTICS - ------------------------------------------------- - vim.keymap.set("n", "lj", vim.diagnostic.goto_next) - vim.keymap.set("n", "lk", vim.diagnostic.goto_prev) - vim.keymap.set("n", "le", vim.diagnostic.open_float) - - ------------------------------------------------- - -- FORMATTER - ------------------------------------------------- - require("conform").setup({ - format_on_save = { - timeout_ms = 500, - lsp_format = "fallback", - }, - formatters_by_ft = { - lua = { "stylua" }, - nix = { "alejandra" }, - rust = { "rustfmt" }, - python = { "black" }, - bash = { "shfmt" }, - }, - }) - - require("Comment").setup() - - ------------------------------------------------- - -- TELESCOPE - ------------------------------------------------- - local builtin = require("telescope.builtin") - - require("telescope").setup({ - defaults = { - layout_strategy = "horizontal", - sorting_strategy = "ascending", - file_ignore_patterns = { "node_modules", ".git/" }, - }, - }) - - vim.keymap.set("n", "", builtin.find_files) - vim.keymap.set("n", "fg", builtin.live_grep) - vim.keymap.set("n", "fb", builtin.buffers) - - ------------------------------------------------- - -- WHICH KEY - ------------------------------------------------- - local wk = require("which-key") - wk.add({ - { "l", desc = "LSP" }, - { "o", desc = "Org" } - }) - - ------------------------------------------------- - -- NVIM TREE - ------------------------------------------------- - require("nvim-tree").setup({}) - vim.keymap.set("n", "e", "NvimTreeToggle") - - ------------------------------------------------- - -- TERMINAL - ------------------------------------------------- - require("toggleterm").setup({ - direction = "float", - }) - - local Terminal = require("toggleterm.terminal").Terminal - - local lazygit = Terminal:new({ - cmd = "lazygit", - hidden = true, - direction = "float", - }) - - vim.keymap.set("n", "gg", function() - lazygit:toggle() - end) - - - ------------------------------------------------- - -- ORGMODE - ------------------------------------------------- - local projects = { - "~/Documents/2_Writing/0_SOC/**/*.org", - "~/Documents/2_Writing/2_Notes/**/*.org", - "~/Documents/1_Projects/6_CRC-Altura/**/*.org", - "~/ORG/**/*.org" - } - - require("orgmode").setup({ - org_agenda_files = projects, - org_default_notes_file = "~/ORG/inbox.org", -- move inbox inside ~/ORG - - org_capture_templates = { - t = { - description = "Todo", - template = "* TODO %?\n SCHEDULED: %t", - target = "~/ORG/todos.org", - }, - i = { - description = "Idea", - template = "* %? :idea:\n %U", - target = "~/ORG/ideas.org", - }, - n = { - description = "Note", - template = "* %?\n %U", - target = "~/ORG/inbox.org", - }, - j = { - description = "Journal", - template = "* %<%Y-%m-%d>\n %?", - target = "~/ORG/journal.org", - }, - }, - }) - - vim.keymap.set("n", "oc", function() require("orgmode").action("capture.prompt") end, { desc = "Org Capture" }) - vim.keymap.set("n", "oa", function() require("orgmode").action("agenda.prompt") end, { desc = "Org Agenda" }) - ------------------------------------------------- - -- VIMTEX - ------------------------------------------------- - vim.g.vimtex_view_method = "zathura" - - ------------------------------------------------- - -- TYPST - ------------------------------------------------- - vim.api.nvim_create_autocmd("FileType", { - pattern = "typst", - callback = function() - -- Watch + preview - vim.keymap.set("n", "lw", function() - local file = vim.fn.expand("%") - vim.fn.jobstart({ "typst", "watch", file }) - vim.fn.jobstart({ "zathura", vim.fn.expand("%:r") .. ".pdf" }) - end, { buffer = true, desc = "Typst watch + Zathura" }) - end, - }) - ''; - }; -} -- cgit v1.2.3