2025-02-13 11:40:42 -08:00
{ 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 = ''
{
" t s = t y p e s c r i p t "
}
'' ;
} ;
clipboard = {
register = " u n n a m e d p l u s " ;
} ;
opts = {
undodir . __raw = " v i m . f s . n o r m a l i z e ( ' ~ / . l o c a l / s h a r e / n v i m / u n d o / ' ) " ;
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 = " y e s " ; # always show two column sign column on left
cursorline = true ; # Highlight line cursor sits on
## @TODO Review these
2025-02-14 16:54:21 -08:00
completeopt = " m e n u o n e , n o s e l e c t " ;
2025-02-13 11:40:42 -08:00
hidden = true ; # Enable modified buffers in background
inccommand = " n o s p l i t " ; # Show effects of a command incrementally
joinspaces = false ; # No double spaces with join after a dot
scrolloff = 4 ; # Lines of context
fileencoding = " u t f - 8 " ; # Encode files using UTF-8
termguicolors = true ; # True color support
background = " d a r k " ; # Always dark background
wildmenu = true ; # Command-line completion mode
wildmode = " l o n g e s t , l i s t , f u l l " ; # 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 = " n o " ; # Disable ALT keys for menu
autoindent = true ;
smartindent = true ;
colorcolumn = " 1 2 1 " ;
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";
} ;
}