nixvim-config/options.nix

98 lines
3.9 KiB
Nix
Raw Normal View History

{ config, ... }:
{
programs.nixvim = {
enable = config.nixvim-config.enable;
defaultEditor = true;
globals = {
mapleader = " "; # global
maplocalleader = " "; # per buffer, e.g. can change behavior per filetype
## To appropriately highlight codefences returned from denols
markdown_fenced_languages.__raw = ''
{
"ts=typescript"
}
'';
};
clipboard = {
register = "unnamedplus";
};
opts = {
undodir.__raw = "vim.fs.normalize('~/.local/share/nvim/undo/')";
undofile = true;
undolevels = 1000; # Increase undo levels
backup = false; # No file backup
number = true; # Show line numbers
relativenumber = true; # Show relative line numbers
ruler = true; # displays line, column, and cursor position at bottom
wrap = false; # don't wrap lines
signcolumn = "yes"; # always show two column sign column on left
cursorline = true; # Highlight line cursor sits on
## @TODO Review these
completeopt = ""; # Completion options
hidden = true; # Enable modified buffers in background
inccommand = "nosplit"; # Show effects of a command incrementally
joinspaces = false; # No double spaces with join after a dot
scrolloff = 4; # Lines of context
fileencoding = "utf-8"; # Encode files using UTF-8
termguicolors = true; # True color support
background = "dark"; # Always dark background
wildmenu = true; # Command-line completion mode
wildmode = "longest,list,full"; # Command-line completion mode
cmdheight = 2; # Command-line height
timeoutlen = 500; # to to wait for mapped sequence to complete
errorbells = false; # No sound on errors
visualbell = false;
mouse = "";
splitright = true;
winaltkeys = "no"; # Disable ALT keys for menu
autoindent = true;
smartindent = true;
colorcolumn = "121";
laststatus = 3;
# -----------------------------------------------------
# Backspace settings
# indent allow backspacing over autoindent
# eol allow backspacing over line breaks (join lines)
# start allow backspacing over the start of insert; CTRL-W and CTRL-U
# 0 same as ":set backspace=" (Vi compatible)
# 1 same as ":set backspace=indent,eol"
# 2 same as ":set backspace=indent,eol,start"
# -----------------------------------------------------
bs = "2";
# -----------------------------------------------------
# Indentation settings
# -----------------------------------------------------
tabstop = 4; # number of spaces a tab counts for
shiftwidth = 4; # control how many columns text is indented with the reindent operations (<< and >>) and automatic C-style indentation.
expandtab = true; # Insert spaces when entering <Tab>
softtabstop = 4; # Number of spaces that a <Tab> counts for while performing editing operations, like inserting a <Tab> or using <BS>. It "feels" like a tab though
ai = true; # auto indent
};
## ------------------------------------------------
## Theme
## ------------------------------------------------
colorschemes.tokyonight.enable = true;
# colorschemes.gruvbox.enable = true;
## Or:
# extraPlugins = [ pkgs.vimPlugins.gruvbox ];
# colorscheme = "gruvbox";
};
}