2022-08-10 08:21:43 +00:00
|
|
|
{pkgs, ...}: {
|
2022-08-09 15:30:56 +00:00
|
|
|
vim.opt = {
|
|
|
|
# Use 4 spaces and expand tabs
|
|
|
|
expandtab = true;
|
2022-08-09 19:19:52 +00:00
|
|
|
tabstop = 2;
|
|
|
|
softtabstop = 2;
|
|
|
|
shiftwidth = 2;
|
2022-08-09 15:30:56 +00:00
|
|
|
|
|
|
|
cursorline = true; # Highlight line of cursor
|
|
|
|
number = true; # Line numbering
|
2022-08-09 19:19:52 +00:00
|
|
|
relativenumber = true;
|
2022-08-09 15:30:56 +00:00
|
|
|
numberwidth = 3;
|
|
|
|
|
2022-08-10 08:32:24 +00:00
|
|
|
undodir = "$HOME/.cache/nvim/undo-files";
|
2022-08-09 15:30:56 +00:00
|
|
|
undofile = true;
|
|
|
|
|
2022-08-09 19:30:22 +00:00
|
|
|
mouse = "a";
|
|
|
|
clipboard = "unnamedplus";
|
|
|
|
|
2022-08-09 15:30:56 +00:00
|
|
|
# Searching
|
|
|
|
ignorecase = true;
|
|
|
|
smartcase = true;
|
|
|
|
|
|
|
|
# Wildmode
|
|
|
|
wildmenu = true;
|
|
|
|
wildignorecase = true;
|
2022-08-10 08:20:23 +00:00
|
|
|
wildignore = ["*.o" "*~" "*.out"];
|
|
|
|
wildmode = ["longest" "list" "full"];
|
|
|
|
};
|
|
|
|
|
|
|
|
# Clipboard command
|
|
|
|
vim.g.clipboard = {
|
|
|
|
name = "kitty";
|
|
|
|
copy = {
|
2022-08-10 08:32:24 +00:00
|
|
|
"+" = ["${pkgs.kitty}/bin/kitty" "+kitten" "clipboard"];
|
|
|
|
"*" = ["${pkgs.kitty}/bin/kitty" "+kitten" "clipboard" "--use-primary"];
|
2022-08-10 08:20:23 +00:00
|
|
|
};
|
|
|
|
paste = {
|
2022-08-10 08:32:24 +00:00
|
|
|
"+" = ["${pkgs.kitty}/bin/kitty" "+kitten" "clipboard" "--get-clipboard"];
|
|
|
|
"*" = ["${pkgs.kitty}/bin/kitty" "+kitten" "clipboard" "--get-clipboard" "--use-primary"];
|
2022-08-10 08:15:12 +00:00
|
|
|
};
|
2022-08-09 15:30:56 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
vim.keybindings.keybindings-shortened = {
|
2022-08-10 08:20:23 +00:00
|
|
|
j = {command = "gj";};
|
|
|
|
k = {command = "gk";};
|
|
|
|
"0" = {command = "g0";};
|
|
|
|
"$" = {command = "g$";};
|
2022-08-09 15:30:56 +00:00
|
|
|
"Y" = {
|
|
|
|
command = "yy";
|
|
|
|
mode = "n";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
output.config_file = ''
|
|
|
|
" Enable 24-bit colours if available
|
|
|
|
if has('termguicolors')
|
|
|
|
set termguicolors
|
|
|
|
endif
|
|
|
|
'';
|
|
|
|
}
|