rename common module to nixos

This commit is contained in:
willifan 2025-02-09 16:49:24 +01:00
parent 68cc9cbc1d
commit f22fddbd3e
60 changed files with 1 additions and 1 deletions

View file

@ -0,0 +1,12 @@
# Plugins
add cmp
try out nvimtree
add lualine
add autopairs
indent blankline??
todo comments
undo tree
bufferline?
startup?
KEYBINDS

View file

@ -0,0 +1,9 @@
{ ... }:
{
programs.nixvim.plugins.nvim-autopairs = {
enable = true;
settings = {
disable_filetype = [ "TelescopePrompt" "vim" ];
};
};
}

View file

@ -0,0 +1,49 @@
{ ... }:
{
programs.nixvim.plugins = {
cmp = {
enable = true;
settings = {
autoEnableSources = true;
experimental = { ghost_text = false; };
performance = {
debounce = 60;
fetchingTimeout = 200;
maxViewEntries = 30;
};
snippet = { expand = "luasnip"; };
formatting = { fields = [ "kind" "abbr" "menu" ]; };
sources = [
{ name = "git"; }
{ name = "nvim_lsp"; }
{ name = "emoji"; }
{
name = "buffer"; # text within current buffer
option.get_bufnrs.__raw = "vim.api.nvim_list_bufs";
keywordLength = 3;
}
{
name = "path"; # file system paths
keywordLength = 3;
}
{
name = "luasnip"; # snippets
keywordLength = 3;
}
];
window = {
completion = { border = "solid"; };
documentation = { border = "solid"; };
};
};
};
cmp-nvim-lsp = { enable = true; }; # lsp
cmp-buffer = { enable = true; };
cmp-path = { enable = true; }; # file system paths
cmp_luasnip = { enable = true; }; # snippets
cmp-cmdline = { enable = false; }; # autocomplete for cmdline
};
}

View file

@ -0,0 +1,24 @@
{ ... }:
{
programs.nixvim = {
enable = true;
defaultEditor = true;
};
imports = [
./autopairs.nix
./cmp.nix
./filetype.nix
./gitsigns.nix
./illuminate.nix
./lsp.nix
./navic.nix
./neotree.nix
./settings.nix
#./treesitter.nix
./whichkey.nix
./yazi.nix
];
}

View file

@ -0,0 +1,14 @@
{ ... }:
{
programs.nixvim.files = {
"ftplugin/nix.lua" = {
opts = {
expandtab = true;
shiftwidth = 2;
tabstop = 2;
};
};
};
}

View file

@ -0,0 +1,28 @@
{ ... }:
{
programs.nixvim.plugins.gitsigns = {
enable = true;
settings = {
signs = {
add = {
text = " ";
};
change = {
text = " ";
};
delete = {
text = " ";
};
untracked = {
text = "";
};
topdelete = {
text = "󱂥 ";
};
changedelete = {
text = "󱂧 ";
};
};
};
};
}

View file

@ -0,0 +1,18 @@
{ ... }:
{
programs.nixvim.plugins = {
illuminate = {
enable = true;
underCursor = false;
filetypesDenylist = [
"Outline"
"TelescopePrompt"
"alpha"
"harpoon"
"reason"
];
};
};
}

View file

@ -0,0 +1,90 @@
{ ... }:
{
programs.nixvim = {
plugins = {
hmts.enable = true;
lsp-lines = { enable = true; };
lsp-format = { enable = true; };
lsp = {
enable = true;
inlayHints = true;
servers = {
clangd = { enable = true; };
html = { enable = true; };
lua_ls = { enable = true; };
nixd = {
enable = true;
settings = {
formatting.command = [ "nixpkgs-fmt" ];
nixpkgs.expr = "import <nixpkgs> {}";
};
};
pyright = { enable = true; };
gopls = { enable = true; };
jsonls = { enable = true; };
rust_analyzer = {
enable = true;
installCargo = true;
installRustc = true;
};
yamlls = { enable = true; };
};
keymaps = {
silent = true;
lspBuf = {
gd = {
action = "definition";
desc = "Goto Definition";
};
gr = {
action = "references";
desc = "Goto References";
};
gD = {
action = "declaration";
desc = "Goto Declaration";
};
gI = {
action = "implementation";
desc = "Goto Implementation";
};
gT = {
action = "type_definition";
desc = "Type Definition";
};
K = {
action = "hover";
desc = "Hover";
};
"<leader>cw" = {
action = "workspace_symbol";
desc = "Workspace Symbol";
};
"<leader>cr" = {
action = "rename";
desc = "Rename";
};
};
diagnostic = {
"<leader>cd" = {
action = "open_float";
desc = "Line Diagnostics";
};
"[d" = {
action = "goto_next";
desc = "Next Diagnostic";
};
"]d" = {
action = "goto_prev";
desc = "Previous Diagnostic";
};
};
};
};
};
};
}

View file

@ -0,0 +1,42 @@
{ ... }:
{
programs.nixvim.plugins = {
navic = {
enable = true;
settings = {
separator = " ";
highlight = true;
lsp = {
autoAttach = true;
};
icons = {
Array = "󱃵 ";
Boolean = " ";
Class = " ";
Constant = " ";
Constructor = " ";
Enum = " ";
EnumMember = " ";
Event = " ";
Field = "󰽏 ";
File = " ";
Function = "󰡱 ";
Interface = " ";
Key = " ";
Method = " ";
Module = "󰕳 ";
Namespace = " ";
Null = "󰟢 ";
Number = " ";
Object = " ";
Operator = " ";
Package = "󰏖 ";
String = " ";
Struct = " ";
TypeParameter = " ";
Variable = " ";
};
};
};
};
}

View file

@ -0,0 +1,42 @@
{ ... }:
{
programs.nixvim = {
plugins = {
neo-tree = {
enable = true;
sources = [ "filesystem" "buffers" "git_status" "document_symbols" ];
addBlankLineAtTop = false;
filesystem = {
bindToCwd = false;
followCurrentFile = {
enabled = true;
};
};
defaultComponentConfigs = {
indent = {
withExpanders = true;
expanderCollapsed = "󰅂";
expanderExpanded = "󰅀";
expanderHighlight = "NeoTreeExpander";
};
gitStatus = {
symbols = {
added = " ";
conflict = "󰩌 ";
deleted = "󱂥";
ignored = " ";
modified = " ";
renamed = "󰑕";
staged = "󰩍";
unstaged = "";
untracked = " ";
};
};
};
};
};
};
}

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 = " ";
};
};
};
};
}

View file

@ -0,0 +1,13 @@
{ ... }:
{
programs.nixvim.plugins = {
treesitter = {
enable = true;
settings = {
indent.enable = true;
highlight.enable = true;
};
};
};
}

View file

@ -0,0 +1,10 @@
{ ... }:
{
programs.nixvim.plugins = {
which-key = {
enable = true;
};
};
}

View file

@ -0,0 +1,10 @@
{ ... }:
{
programs.nixvim.plugins = {
yazi = {
enable = true;
};
};
}