mirror of
https://github.com/EdenQwQ/nixos.git
synced 2026-05-11 17:35:56 +08:00
init
This commit is contained in:
commit
96895ec3aa
100 changed files with 6349 additions and 0 deletions
136
home/programs/coding/nixvim/default.nix
Normal file
136
home/programs/coding/nixvim/default.nix
Normal file
|
|
@ -0,0 +1,136 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
./lsp.nix
|
||||
./cmp.nix
|
||||
./ai.nix
|
||||
./lualine.nix
|
||||
./treesitter.nix
|
||||
./hop.nix
|
||||
./ui.nix
|
||||
./mini.nix
|
||||
];
|
||||
stylix.targets.nixvim.enable = true;
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
performance.combinePlugins = {
|
||||
enable = true;
|
||||
standalonePlugins = [
|
||||
"nvim-treesitter"
|
||||
"copilot.lua"
|
||||
];
|
||||
};
|
||||
globals = {
|
||||
mapleader = " ";
|
||||
maplocalleader = " ";
|
||||
have_nerd_font = true;
|
||||
};
|
||||
highlightOverride = {
|
||||
CursorLineNr = {
|
||||
bg = "#${config.lib.stylix.colors.base01}";
|
||||
fg = "#${config.lib.stylix.colors.base06}";
|
||||
};
|
||||
# LineNrAbove = {
|
||||
# bg = "#${config.lib.stylix.colors.base00}";
|
||||
# fg = "#${config.lib.stylix.colors.base06}";
|
||||
# };
|
||||
# LineNrBelow = {
|
||||
# bg = "#${config.lib.stylix.colors.base00}";
|
||||
# fg = "#${config.lib.stylix.colors.base07}";
|
||||
# };
|
||||
};
|
||||
opts = {
|
||||
number = true;
|
||||
relativenumber = true;
|
||||
mouse = "a";
|
||||
showmode = false;
|
||||
clipboard.providers.wl-copy.enable = true;
|
||||
breakindent = true;
|
||||
tabstop = 2;
|
||||
shiftwidth = 2;
|
||||
undofile = true;
|
||||
ignorecase = true;
|
||||
smartcase = true;
|
||||
updatetime = 250;
|
||||
timeoutlen = 300;
|
||||
splitright = true;
|
||||
splitbelow = true;
|
||||
list = true;
|
||||
listchars.__raw = "{ tab = '» ', trail = '·', nbsp = '␣' }";
|
||||
inccommand = "split";
|
||||
cursorline = true;
|
||||
hlsearch = true;
|
||||
scrolloff = 10;
|
||||
spell = true;
|
||||
spelllang = [
|
||||
"en_us"
|
||||
"cjk"
|
||||
];
|
||||
spellsuggest = "best,4";
|
||||
};
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "S";
|
||||
action = ":w<cr>";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "Q";
|
||||
action = ":bd<cr>";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<Leader>1";
|
||||
action = ":BufferLineGoToBuffer 1<cr>";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<Leader>2";
|
||||
action = ":BufferLineGoToBuffer 2<cr>";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<Leader>2";
|
||||
action = ":BufferLineGoToBuffer 2<cr>";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<Leader>3";
|
||||
action = ":BufferLineGoToBuffer 3<cr>";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<Leader>4";
|
||||
action = ":BufferLineGoToBuffer 4<cr>";
|
||||
}
|
||||
{
|
||||
mode = "t";
|
||||
key = "<Esc><Esc>";
|
||||
action = "<C-\\><C-n>";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<Leader>o";
|
||||
action = ":lua MiniFiles.open()<cr>";
|
||||
}
|
||||
];
|
||||
plugins = {
|
||||
sleuth.enable = true; # automatically set shiftwidth and expandtab based on the file
|
||||
nvim-surround.enable = true;
|
||||
repeat.enable = true;
|
||||
lastplace.enable = true;
|
||||
nvim-autopairs.enable = true;
|
||||
endwise.enable = true;
|
||||
markdown-preview.enable = true;
|
||||
};
|
||||
extraPlugins = with pkgs.vimPlugins; [
|
||||
fcitx-vim
|
||||
];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue