-
Notifications
You must be signed in to change notification settings - Fork 0
/
sets.nix
154 lines (125 loc) · 4.72 KB
/
sets.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
{
pkgs,
lib,
config,
...
}: {
config = {
opts = {
clipboard = {
wl-copy.enable = true;
register = "unnamedplus";
};
# Enable relative line numbers
number = true;
relativenumber = true;
#lazyredraw = true;
ttimeoutlen = 1;
# Set tabs to 2 spaces
tabstop = 4;
softtabstop = 4;
showtabline = 0;
expandtab = true;
# Enable auto indenting and set it to spaces
smartindent = true;
shiftwidth = 2;
# Enable smart indenting (see https://stackoverflow.com/questions/1204149/smart-wrap-in-vim)
breakindent = true;
# Enable incremental searching
hlsearch = true;
incsearch = true;
# Enable text wrap
wrap = true;
# Better splitting
splitbelow = true;
splitright = true;
# Enable mouse mode
mouse = "a"; # Mouse
# Enable ignorecase + smartcase for better searching
ignorecase = true;
smartcase = true; # Don't ignore case with capitals
grepprg = "rg --vimgrep";
grepformat = "%f:%l:%c:%m";
# Decrease updatetime
updatetime = 50; # faster completion (4000ms default)
# Set completeopt to have a better completion experience
completeopt = ["menuone" "noselect" "noinsert"]; # mostly just for cmp
# Enable persistent undo history
swapfile = false;
backup = false;
undofile = true;
# Enable 24-bit colors
termguicolors = true;
# Enable the sign column to prevent the screen from jumping
signcolumn = "yes";
# Enable cursor line highlight
cursorline = true; # Highlight the line where the cursor is located
# Set fold settings
# These options were recommended by nvim-ufo
# See: https://github.com/kevinhwang91/nvim-ufo#minimal-configuration
foldcolumn = "0";
foldlevel = 99;
foldlevelstart = 99;
foldenable = true;
# Always keep 8 lines above/below cursor unless at start/end of file
scrolloff = 8;
# Place a column line
#colorcolumn = "80";
# Reduce which-key timeout to 10ms
timeoutlen = 10;
# Set encoding type
encoding = "utf-8";
fileencoding = "utf-8";
# Change cursor options
guicursor = [
"n-v-c:block" # Normal, visual, command-line: block cursor
"i-ci-ve:ver100" # Insert, command-line insert, visual-exclude: vertical bar cursor with block cursor, use "ver25" for 25% width
"r-cr:hor20" # Replace, command-line replace: horizontal bar cursor with 20% height
"o:hor50" # Operator-pending: horizontal bar cursor with 50% height
"a:blinkwait700-blinkoff400-blinkon250-Cursor/lCursor" # All modes: blinking settings
"sm:block-blinkwait175-blinkoff150-blinkon175" # Showmatch: block cursor with specific blinking settings
];
# Enable chars list
list = true; # Show invisible characters (tabs, eol, ...)
listchars = "eol:↲,space: ,tab: ,trail:•,extends:→,precedes:←,nbsp:␣";
# More space in the neovim command line for displaying messages
cmdheight = 2;
# We don't need to see things like INSERT anymore
showmode = false;
# Maximum number of items to show in the popup menu (0 means "use available screen space")
pumheight = 0;
# Use conform-nvim for gq formatting. ('formatexpr' is set to vim.lsp.formatexpr(), so you can format lines via gq if the language server supports it)
formatexpr = "v:lua.require'conform'.formatexpr()";
laststatus = 3; # (https://neovim.io/doc/user/options.html#'laststatus')
};
extraConfigLua = ''
local opt = vim.opt
local g = vim.g
local o = vim.o
-- Neovide
if g.neovide then
-- Neovide options
g.neovide_cursor_animation_length = 0.02
g.neovide_fullscreen = false
g.neovide_hide_mouse_when_typing = false
g.neovide_refresh_rate = 144
g.neovide_cursor_vfx_mode = "ripple"
g.neovide_cursor_animate_command_line = true
g.neovide_cursor_animate_in_insert_mode = true
g.neovide_cursor_vfx_particle_lifetime = 5.0
g.neovide_cursor_vfx_particle_density = 14.0
g.neovide_cursor_vfx_particle_speed = 12.0
g.neovide_transparency = 0.8
g.neovide_theme = 'auto'
-- Neovide Fonts
o.guifont = "Comic Code Ligatures:h13"
-- o.guifont = "CommitMono:Medium:h15"
-- o.guifont = "JetBrainsMono Nerd Font:h14:Medium:i"
-- o.guifont = "FiraMono Nerd Font:Medium:h14"
-- o.guifont = "CaskaydiaCove Nerd Font:h14:b:i"
-- o.guifont = "BlexMono Nerd Font Mono:h14:Medium:i"
-- o.guifont = "Liga SFMono Nerd Font:b:h15"
end
'';
};
}