diff --git a/home/common/nixvim.nix b/home/common/nixvim.nix index d56c9dd..b8b845c 100644 --- a/home/common/nixvim.nix +++ b/home/common/nixvim.nix @@ -4,6 +4,40 @@ ripgrep.enable = true; nixvim = { globals.mapleader = " "; + opts = { + number = true; + relativenumber = false; + termguicolors = true; + completeopt = [ + "menuone" + "noselect" + "noinsert" + ]; + # Always show the signcolumn, otherwise text would be shifted when displaying error icons + signcolumn = "yes"; + mouse = "a"; + ignorecase = true; + smartcase = true; + splitright = true; + splitbelow = true; + list = true; + # NOTE: .__raw here means that this field is raw lua code + listchars.__raw = "{ tab = '» ', trail = '·', nbsp = '␣' }"; + expandtab = true; + tabstop = 4; + shiftwidth = 2; + softtabstop = 0; + smarttab = true; + clipboard = { + providers.wl-copy.enable = true; # Use wl-copy for wayland and xsel for Xorg + register = "unnamedplus"; + }; + encoding = "utf-8"; + fileencoding = "utf-8"; + cursorline = true; + ruler = true; + scrolloff = 5; + }; keymaps = [ { key = ""; @@ -38,7 +72,15 @@ defaultEditor = true; # colorschemes.dracula.enable = true; colorschemes.catppuccin.enable = true; - extraConfigLuaPost = "vim.opt.conceallevel = 2"; + extraConfigLuaPost = '' + vim.opt.conceallevel = 2 + vim.api.nvim_create_autocmd("FileType", { + pattern = "markdown", + callback = function() + vim.opt_local.spell = true + end, + }) + ''; plugins = { airline.enable = true; alpha = {