diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-10-18 17:07:46 +0200 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-10-18 17:07:46 +0200 |
commit | c52c7f314ccadcc2fcd91e28c8fd1b88f6d5ce0c (patch) | |
tree | e8b947710b467b32740598ff574982097836f66c /modules/home.legacy/conf/nvim/options/default.nix | |
parent | chore(pkgs/yt): 1.2.1 -> 1.3.0 (diff) | |
download | nixos-config-c52c7f314ccadcc2fcd91e28c8fd1b88f6d5ce0c.tar.gz nixos-config-c52c7f314ccadcc2fcd91e28c8fd1b88f6d5ce0c.zip |
refactor(modules): Move all system modules to `by-name`
From now on all modules should be added to the new `by-name` directory. This should help remove the (superficial and utterly useless) distinction between `home-manager` and `NixOS` modules.
Diffstat (limited to 'modules/home.legacy/conf/nvim/options/default.nix')
-rw-r--r-- | modules/home.legacy/conf/nvim/options/default.nix | 105 |
1 files changed, 105 insertions, 0 deletions
diff --git a/modules/home.legacy/conf/nvim/options/default.nix b/modules/home.legacy/conf/nvim/options/default.nix new file mode 100644 index 00000000..d22bdd8f --- /dev/null +++ b/modules/home.legacy/conf/nvim/options/default.nix @@ -0,0 +1,105 @@ +{nixosConfig, ...}: { + programs.nixvim.opts = { + autoindent = true; # copy indent from previous line + cindent = true; # use c like indenting rules + breakindent = true; # continue indent visually + showbreak = "↳ "; # downwards arrow with tip rightwards(U+21B3, UTF-8: E2 86 B3) + breakindentopt = { + shift = 2; # wrapped line's beginning will be shifted by the given number of + }; + + incsearch = true; # show search results while typing + inccommand = "split"; # line preview of :s results + ignorecase = true; # ignore case when searching + smartcase = true; # if a capital letter is used in search, overwrite ignorecase + showmatch = true; # show matching words during a search. + hlsearch = true; # highlight when searching + + confirm = true; # confirm to save changes before closing modified buffer + colorcolumn = "+1"; # show a +1 before the 'textwidth' + completeopt = ["menuone" "noselect"]; # have a better completion experience + + # https://www.compart.com/en/unicode/U+XXXX (unicode character code) + # stylua: ignore + fillchars = { + fold = "·"; # MIDDLE DOT (U+00B7, UTF-8: C2 B7) + horiz = "━"; # BOX DRAWINGS HEAVY HORIZONTAL (U+2501, UTF-8: E2 94 81) + horizdown = "┳"; # BOX DRAWINGS HEAVY DOWN AND HORIZONTAL (U+2533, UTF-8: E2 94 B3) + horizup = "┻"; # BOX DRAWINGS HEAVY UP AND HORIZONTAL (U+253B, UTF-8: E2 94 BB) + vert = "┃"; # BOX DRAWINGS HEAVY VERTICAL (U+2503, UTF-8: E2 94 83) + vertleft = "┫"; # BOX DRAWINGS HEAVY VERTICAL AND LEFT (U+252B, UTF-8: E2 94 AB) + vertright = "┣"; # BOX DRAWINGS HEAVY VERTICAL AND RIGHT (U+2523, UTF-8: E2 94 A3) + verthoriz = "╋"; # BOX DRAWINGS HEAVY VERTICAL AND HORIZONTAL (U+254B, UTF-8: E2 95 8B) + }; + listchars = builtins.concatStringsSep "," [ + "nbsp:⦸" # CIRCLED REVERSE SOLIDUS (U+29B8, UTF-8: E2 A6 B8) + "tab:▷┅" # WHITE RIGHT-POINTING TRIANGLE (U+25B7, UTF-8: E2 96 B7) + "extends:»" # RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK (U+00BB, UTF-8: C2 BB) + "precedes:«" # LEFT-POINTING DOUBLE ANGLE QUOTATION MARK (U+00AB, UTF-8: C2 AB) + "trail:•" # BULLET (U+2022, UTF-8: E2 80 A2) + ]; + + # shell-like autocomplete to unambiguous portions + wildmode = builtins.concatStringsSep "," [ + "longest" + "list" + "full" + ]; + + grepformat = "%f:%l:%c:%m"; # the default format for rg in vimgrep mode + grepprg = "rg --vimgrep"; # use rg as grep implementation in `:grep` + + hidden = true; # allows you to hide buffers with unsaved changes without being prompted + + laststatus = 3; # use global statusline # TODO: + + list = true; # show whitespace + + mouse = ""; # disables the mouse + + number = true; # line numbers + relativenumber = true; # relative line numbers + + # vim.opt.shada:append {'%'}; -- store buffers in the shada file and reopen them if nvim has been started without file name argument + + shell = nixosConfig.users.users.soispha.shell.pname; # try to use default shell for the default user as a shell for ":!" + + spell = true; # activate spell checking + spelllang = "en_us,de_de"; # set spell languages + spelloptions = "camel"; # CamelCase check if both camel and case are correct words + + syntax = "ON"; # use syntax highlighting and let nvim figure out which + + shiftwidth = 0; # use tabstop setting as shiftwidth + tabstop = 4; # use 4 spaces in place of a tab + expandtab = true; # expand tabs to spaces + + showtabline = 2; # always show the tabline + + timeoutlen = 500; # wait 500 msec for the next char in an input sequence + ttyfast = true; # let vim know that I am using a fast term + + undofile = true; # use a undofile, to save the undos + undolevels = 10000; # keep nearly all undo things stored + + virtualedit = "block"; # allow the cursor to move beyond actual character in visual block mode + + textwidth = 90; # automatically hard wrap at 90 columns by default + + foldmethod = "marker"; # use markers to specify folds + + termguicolors = true; + cursorline = true; + # vim.opt.cursorcolumn = true; + + scrolloff = 999; # try to keep at least 999 lines above and below the cursor (this effectively keeps the screen centered) + + linebreak = true; # break to long lines, but do only break them at [[::space::]] + + showcmd = true; # show partial command, being typed + showmode = true; # show the mode (Visual, Insert, Command) + + wildmenu = true; # shell completion + wildignore = "*.docx,*.jpg,*.png,*.gif,*.pdf,*.pyc,*.exe,*.flv,*.img,*.xlsx"; # ignore binary files + }; +} |