diff options
| author | Natasha Moongrave <natasha@256phi.eu> | 2026-02-12 13:04:18 +0100 |
|---|---|---|
| committer | Natasha Moongrave <natasha@256phi.eu> | 2026-02-12 13:04:18 +0100 |
| commit | 1fae553aba1b4fe9e2cf2a4902575df613ab9b90 (patch) | |
| tree | 3aa406d5e661d34234cc614fa152f75201a9fd0c /modules/home/i3wm/nord-blue | |
| parent | f6c748ca0927ceae4b0be630f9c5dbc17946e3fe (diff) | |
updated neovim config
Diffstat (limited to 'modules/home/i3wm/nord-blue')
| -rw-r--r-- | modules/home/i3wm/nord-blue/nvim.nix | 103 |
1 files changed, 87 insertions, 16 deletions
diff --git a/modules/home/i3wm/nord-blue/nvim.nix b/modules/home/i3wm/nord-blue/nvim.nix index 6e4f610..03b7adf 100644 --- a/modules/home/i3wm/nord-blue/nvim.nix +++ b/modules/home/i3wm/nord-blue/nvim.nix @@ -1,6 +1,12 @@ { pkgs, config, lib, ... }: { + home.packages = with pkgs; [ + zathura + ripgrep + fd + ]; + programs.neovim = { enable = true; defaultEditor = true; @@ -8,29 +14,94 @@ vimAlias = true; plugins = with pkgs.vimPlugins; [ - (nvim-treesitter.withPlugins (p: [ - p.lua - p.nix - p.rust - p.python - p.bash - ])) - - #telescope-nvim - - { - plugin = vim-startify; # Add the plugin and its coresponding config - config = "let g:startify_change_to_vcs_root = 0"; - } + vimtex + (nvim-treesitter.withPlugins (p: [ p.lua p.nix p.rust p.python p.bash p.latex ])) + telescope-nvim + plenary-nvim + snacks-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" + + -- 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, + }, + }) + + -- Snacks + require("snacks").setup({ + prefix = { "<leader>" }, -- the key to trigger Snacks popup + -- optional customizations: + window = { border = "rounded", position = "bottom" }, + spacing = { horizontal = 2, vertical = 1 }, + }) + + -- Register some categories (optional) + require("snacks").register({ + f = { name = "file" }, + g = { name = "git" }, + b = { name = "buffers" }, + }) + + -- Telescope keymaps + vim.keymap.set("n", "<leader>ff", builtin.find_files) + vim.keymap.set("n", "<leader>fg", builtin.live_grep) + vim.keymap.set("n", "<leader>fb", builtin.buffers) + vim.keymap.set("n", "<leader>fh", builtin.help_tags) - -- Plugins initiated on launch - require("nvim-treesitter.configs").setup({ highlight = { enable = true }, indent = { enable = true }, }) -- Treesitter + ------------------------------------------------------------------ + -- 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, + }) ''; }; }
\ No newline at end of file |
