added a lot of nvim settings

This commit is contained in:
willifan 2024-10-27 19:15:05 +01:00
parent bde74761f1
commit 95710759c9
2 changed files with 102 additions and 0 deletions

View file

@ -13,6 +13,7 @@
./lsp.nix
./navic.nix
./neotree.nix
./settings.nix
./toggleterm.nix
./treesitter.nix
./whichkey.nix

View file

@ -0,0 +1,101 @@
{ ... }:
{
programs.nixvim = {
config = {
extraConfigLuaPre =
# lua
''
vim.fn.sign_define("diagnosticsignerror", { text = " ", texthl = "diagnosticerror", linehl = "", numhl = "" })
vim.fn.sign_define("diagnosticsignwarn", { text = " ", texthl = "diagnosticwarn", linehl = "", numhl = "" })
vim.fn.sign_define("diagnosticsignhint", { text = "󰌵", texthl = "diagnostichint", linehl = "", numhl = "" })
vim.fn.sign_define("diagnosticsigninfo", { text = " ", texthl = "diagnosticinfo", linehl = "", numhl = "" })
'';
clipboard = {
providers.wl-copy.enable = true;
};
opts = {
# Show line numbers
number = true;
# Show relative line numbers
relativenumber = true;
# Use the system clipboard
clipboard = "unnamedplus";
# Number of spaces that represent a <TAB>
tabstop = 2;
softtabstop = 2;
# Show tabline always
showtabline = 2;
# Use spaces instead of tabs
expandtab = true;
# Enable smart indentation
smartindent = true;
# Number of spaces to use for each step of (auto)indent
shiftwidth = 2;
# Enable break indent
breakindent = true;
# Highlight the screen line of the cursor
cursorline = true;
# Minimum number of screen lines to keep above and below the cursor
scrolloff = 8;
# Enable mouse support
mouse = "a";
# Set folding method to manual
foldmethod = "manual";
# Disable folding by default
foldenable = false;
# Wrap long lines at a character in 'breakat'
linebreak = true;
# Disable spell checking
spell = false;
# Disable swap file creation
swapfile = false;
# Time in milliseconds to wait for a mapped sequence to complete
timeoutlen = 300;
# Enable 24-bit RGB color in the TUI
termguicolors = true;
# Don't show mode in the command line
showmode = false;
# Open new split below the current window
splitbelow = true;
# Keep the screen when splitting
splitkeep = "screen";
# Open new split to the right of the current window
splitright = true;
# Hide command line unless needed
cmdheight = 0;
# Remove EOB
fillchars = {
eob = " ";
};
};
};
};
}