kekl
This commit is contained in:
@ -20,7 +20,7 @@
|
||||
colors = {
|
||||
primary = {
|
||||
foreground = "#FFFFFF";
|
||||
background = "#121212";
|
||||
background = "#262626";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -1,121 +0,0 @@
|
||||
_:
|
||||
let
|
||||
get_bufnrs.__raw = ''
|
||||
function()
|
||||
local buf_size_limit = 1024 * 1024 -- 1MB size limit
|
||||
local bufs = vim.api.nvim_list_bufs()
|
||||
local valid_bufs = {}
|
||||
for _, buf in ipairs(bufs) do
|
||||
if vim.api.nvim_buf_is_loaded(buf) and vim.api.nvim_buf_get_offset(buf, vim.api.nvim_buf_line_count(buf)) < buf_size_limit then
|
||||
table.insert(valid_bufs, buf)
|
||||
end
|
||||
end
|
||||
return valid_bufs
|
||||
end
|
||||
'';
|
||||
in
|
||||
{
|
||||
programs.nixvim.plugins = {
|
||||
cmp = {
|
||||
enable = true;
|
||||
autoEnableSources = true;
|
||||
settings = {
|
||||
window = {
|
||||
completion = {
|
||||
autocomplete = true;
|
||||
col_offset = -3;
|
||||
side_padding = 0;
|
||||
};
|
||||
};
|
||||
completion = {
|
||||
completeopt = "menu,menuone,noinsert,noselect";
|
||||
keyword_length = 1;
|
||||
};
|
||||
sorting = {
|
||||
};
|
||||
mapping = {
|
||||
"<Down>".__raw = ''
|
||||
cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" })
|
||||
'';
|
||||
|
||||
"<Up>".__raw = ''
|
||||
cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" })
|
||||
'';
|
||||
"<C-Down>" = "cmp.mapping.scroll_docs(-4)";
|
||||
"<c-Up>" = "cmp.mapping.scroll_docs(4)";
|
||||
"<C-Space>" = "cmp.mapping.complete()";
|
||||
"<C-e>" = "cmp.mapping.abort()";
|
||||
"<CR>" = "cmp.mapping.confirm({ select = false })";
|
||||
};
|
||||
|
||||
preselect = "cmp.PreselectMode.None";
|
||||
snippet.expand = "function(args) require('luasnip').lsp_expand(args.body) end";
|
||||
|
||||
sources = [
|
||||
{
|
||||
name = "nvim_lsp";
|
||||
priority = 1000;
|
||||
option = {
|
||||
inherit get_bufnrs;
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "nvim_lsp_document_symbol";
|
||||
priority = 1000;
|
||||
option = {
|
||||
inherit get_bufnrs;
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "treesitter";
|
||||
priority = 850;
|
||||
option = {
|
||||
inherit get_bufnrs;
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "path";
|
||||
priority = 300;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
friendly-snippets.enable = true;
|
||||
luasnip.enable = true;
|
||||
|
||||
lspkind = {
|
||||
enable = true;
|
||||
cmp = {
|
||||
enable = true;
|
||||
menu = {
|
||||
buffer = "";
|
||||
calc = "";
|
||||
cmdline = "";
|
||||
codeium = "";
|
||||
emoji = "";
|
||||
git = "";
|
||||
luasnip = "";
|
||||
neorg = "";
|
||||
nvim_lsp = "";
|
||||
nvim_lua = "";
|
||||
path = "";
|
||||
spell = "";
|
||||
treesitter = "";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -1,42 +0,0 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
nixvim,
|
||||
...
|
||||
}:
|
||||
let
|
||||
nixvim = import (
|
||||
builtins.fetchGit {
|
||||
url = "https://github.com/nix-community/nixvim";
|
||||
}
|
||||
);
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
nixvim.homeManagerModules.nixvim
|
||||
./cmp.nix
|
||||
./lsp.nix
|
||||
./neotree.nix
|
||||
./opts.nix
|
||||
./dev.nix
|
||||
./nonels.nix
|
||||
./treesitter.nix
|
||||
./lualine.nix
|
||||
];
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
colorschemes.oxocarbon.enable = true;
|
||||
plugins = {
|
||||
neocord = {
|
||||
enable = true;
|
||||
settings = {
|
||||
auto_update = true;
|
||||
global_timer = true;
|
||||
log_level = null;
|
||||
show_time = true;
|
||||
workspace_text = "WS: %s";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
nixvim,
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.nixvim = {
|
||||
plugins = {
|
||||
toggleterm.enable = true;
|
||||
autoclose.enable = true;
|
||||
web-devicons.enable = true;
|
||||
which-key.enable = true;
|
||||
trouble.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
@ -1,98 +0,0 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
nixvim,
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.nixvim.plugins = {
|
||||
clangd-extensions.enable = true;
|
||||
crates.enable = true;
|
||||
lsp-format = {
|
||||
enable = true;
|
||||
};
|
||||
lsp = {
|
||||
enable = true;
|
||||
inlayHints = true;
|
||||
servers = {
|
||||
csharp_ls = {
|
||||
enable = true;
|
||||
autostart = true;
|
||||
};
|
||||
bashls = {
|
||||
enable = true;
|
||||
autostart = true;
|
||||
};
|
||||
html = {
|
||||
enable = true;
|
||||
autostart = true;
|
||||
};
|
||||
lua_ls = {
|
||||
enable = true;
|
||||
autostart = true;
|
||||
};
|
||||
nixd = {
|
||||
enable = true;
|
||||
extraOptions = {
|
||||
nixos = {
|
||||
expr = "(builtins.getFlake \"/etc/nixos\").nixosConfigurations.aurelionite.options";
|
||||
};
|
||||
home_manager = {
|
||||
expr = "(builtins.getFlake \"/etc/nixos\").homeConfigurations.aurelionite.options";
|
||||
};
|
||||
};
|
||||
};
|
||||
asm_lsp = {
|
||||
enable = true;
|
||||
autostart = true;
|
||||
};
|
||||
pyright = {
|
||||
enable = true;
|
||||
autostart = true;
|
||||
};
|
||||
gopls = {
|
||||
enable = true;
|
||||
autostart = true;
|
||||
};
|
||||
clangd = {
|
||||
enable = true;
|
||||
autostart = true;
|
||||
};
|
||||
omnisharp = {
|
||||
enable = true;
|
||||
autostart = true;
|
||||
};
|
||||
arduino_language_server = {
|
||||
enable = true;
|
||||
autostart = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
rustaceanvim = {
|
||||
enable = true;
|
||||
settings = {
|
||||
server = {
|
||||
cmd = [
|
||||
"rustup"
|
||||
"run"
|
||||
"nightly"
|
||||
"rust-analyzer"
|
||||
];
|
||||
default_settings = {
|
||||
rust-analyzer = {
|
||||
check = {
|
||||
command = "clippy";
|
||||
};
|
||||
inlayHints = {
|
||||
lifetimeElisionHints = {
|
||||
enable = "always";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
standalone = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
programs.nixvim = {
|
||||
plugins = {
|
||||
lualine = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
nixvim,
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.nixvim = {
|
||||
plugins = {
|
||||
neo-tree = {
|
||||
enable = true;
|
||||
enableDiagnostics = true;
|
||||
enableGitStatus = true;
|
||||
closeIfLastWindow = true;
|
||||
window = {
|
||||
position = "right";
|
||||
width = 40;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -1,63 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.nixvim.plugins.none-ls = {
|
||||
enable = true;
|
||||
enableLspFormat = true;
|
||||
settings = {
|
||||
updateInInsert = false;
|
||||
};
|
||||
|
||||
sources = {
|
||||
code_actions = {
|
||||
gitsigns.enable = true;
|
||||
statix.enable = true;
|
||||
};
|
||||
diagnostics = {
|
||||
statix.enable = true;
|
||||
yamllint.enable = true;
|
||||
};
|
||||
formatting = {
|
||||
nixfmt = {
|
||||
enable = true;
|
||||
package = pkgs.nixfmt-rfc-style;
|
||||
};
|
||||
black = {
|
||||
enable = true;
|
||||
settings = ''
|
||||
{
|
||||
extra_args = { "--fast" },
|
||||
}
|
||||
'';
|
||||
};
|
||||
prettier = {
|
||||
enable = true;
|
||||
disableTsServerFormatter = true;
|
||||
settings = ''
|
||||
{
|
||||
extra_args = { "--no-semi" },
|
||||
}
|
||||
'';
|
||||
};
|
||||
stylua.enable = true;
|
||||
yamlfmt = {
|
||||
enable = true;
|
||||
};
|
||||
hclfmt.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
programs.nixvim.keymaps = [
|
||||
{
|
||||
mode = [
|
||||
"n"
|
||||
"v"
|
||||
];
|
||||
key = "<leader>cf";
|
||||
action = "<cmd>lua vim.lsp.buf.format()<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Format";
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
@ -1,46 +0,0 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
nixvim,
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.nixvim = {
|
||||
extraConfigLua = ''
|
||||
local map = vim.api.nvim_set_keymap
|
||||
local opts = { noremap = true, silent = true }
|
||||
vim.g.mapleader = " "
|
||||
map('n', '<c-t>', ":ToggleTerm size=40 direction=float<CR>", opts)
|
||||
map('n', '<c-n>', ":Neotree filesystem reveal right toggle<CR>", opts)
|
||||
|
||||
map('v', '<Tab>', '>gv', opts)
|
||||
map('v', '<S-Tab>', '<gv', opts)
|
||||
|
||||
vim.opt.shiftwidth = 2
|
||||
vim.opt.tabstop = 2
|
||||
vim.opt.softtabstop = 2
|
||||
vim.opt.cursorline = true
|
||||
vim.opt.expandtab = true
|
||||
vim.opt.autoindent = true
|
||||
vim.opt.smartindent = true
|
||||
vim.opt.relativenumber = true
|
||||
vim.diagnostic.config({
|
||||
virtual_text = true,
|
||||
virtual_lines = true,
|
||||
})
|
||||
|
||||
vim.cmd [[
|
||||
cnoreabbrev W! w!
|
||||
cnoreabbrev Q! q!
|
||||
cnoreabbrev Qall! qall!
|
||||
cnoreabbrev Wq wq
|
||||
cnoreabbrev Wa wa
|
||||
cnoreabbrev wQ wq
|
||||
cnoreabbrev WQ wq
|
||||
cnoreabbrev W w
|
||||
cnoreabbrev Q q
|
||||
cnoreabbrev Qall qall
|
||||
]]
|
||||
'';
|
||||
};
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
nixvim,
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.nixvim = {
|
||||
plugins = {
|
||||
treesitter = {
|
||||
enable = true;
|
||||
grammarPackages = with pkgs.vimPlugins.nvim-treesitter.builtGrammars; [
|
||||
c
|
||||
cpp
|
||||
rust
|
||||
bash
|
||||
json
|
||||
lua
|
||||
make
|
||||
markdown
|
||||
nix
|
||||
toml
|
||||
vim
|
||||
vimdoc
|
||||
xml
|
||||
yaml
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -7,6 +7,7 @@
|
||||
tmuxPlugins.net-speed
|
||||
tmuxPlugins.cpu
|
||||
tmuxPlugins.battery
|
||||
tmuxPlugins.gruvbox
|
||||
];
|
||||
disableConfirmationPrompt = true;
|
||||
mouse = true;
|
||||
@ -29,10 +30,8 @@
|
||||
bind -n M-Up select-pane -U
|
||||
bind -n M-Down select-pane -D
|
||||
|
||||
set-option -g default-shell fish
|
||||
|
||||
setw -g window-status-current-format "[ #W ]"
|
||||
setw -g window-status-format "#W"
|
||||
#setw -g window-status-current-format "[ #W ]"
|
||||
#setw -g window-status-format "#W"
|
||||
|
||||
set-option -s status-interval 1
|
||||
set -g status-right-length 100
|
||||
@ -48,7 +47,7 @@
|
||||
#run-shell ${pkgs.tmuxPlugins.battery}/share/tmux-plugins/battery/battery.tmux
|
||||
|
||||
set -g status-position top
|
||||
set-option -g status-style bg=default
|
||||
#set-option -g status-style bg=default
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
@ -9,5 +9,6 @@
|
||||
./firefox.nix
|
||||
./x/dwm/default.nix
|
||||
./nvim/default.nix
|
||||
./x/slstatus/default.nix
|
||||
];
|
||||
}
|
||||
|
@ -8,7 +8,17 @@
|
||||
icons.enable = true;
|
||||
ignoreFocus = [
|
||||
"neo-tree"
|
||||
"filename"
|
||||
"location"
|
||||
];
|
||||
componentSeparator = {
|
||||
left = "";
|
||||
right = "";
|
||||
};
|
||||
sectionSeparator = {
|
||||
left = "";
|
||||
right = "";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -10,17 +10,15 @@ static int smartgaps =
|
||||
0; /* 1 means no outer gap when there is only one window */
|
||||
static const int showbar = 1; /* 0 means no bar */
|
||||
static const int topbar = 1; /* 0 means bottom bar */
|
||||
static const char *fonts[] = {"Terminus:size=10"};
|
||||
static const char dmenufont[] = "Terminus:size=10";
|
||||
static const char *fonts[] = {"Fantasque Sans Mono:size=10"};
|
||||
static const char dmenufont[] = "Fantasque Sans Mono:size=10";
|
||||
|
||||
/* Farben aus Alacritty übernommen */
|
||||
static const char col_gray1[] = "#161616";
|
||||
static const char col_gray1[] = "#262626";
|
||||
static const char col_gray2[] = "#ffffff";
|
||||
static const char col_gray3[] = "#dde1e6";
|
||||
static const char col_gray4[] = "#ffffff";
|
||||
static const char col_cyan[] = "#161616";
|
||||
static const char col_cyan[] = "#262626";
|
||||
|
||||
/* Farbschema für die Fenster und die Leiste */
|
||||
static const char *colors[][3] = {
|
||||
/* fg bg border */
|
||||
[SchemeNorm] = {col_gray3, col_gray1, col_gray1}, /* Normale Fenster */
|
||||
@ -90,11 +88,13 @@ static const char *downvol[] = {"wpctl", "set-volume", "@DEFAULT_AUDIO_SINK@",
|
||||
"5%-", NULL};
|
||||
static const char *mutevol[] = {"wpctl", "set-mute", "@DEFAULT_AUDIO_SINK@",
|
||||
"toggle", NULL};
|
||||
static const char *screenshot[] = {"flameshot", "gui", NULL};
|
||||
|
||||
static const Key keys[] = {
|
||||
/* modifier key function argument */
|
||||
{MODKEY, XK_space, spawn, {.v = dmenucmd}},
|
||||
{MODKEY, XK_Return, spawn, {.v = termcmd}},
|
||||
{MODKEY|ShiftMask, XK_s, spawn, {.v = screenshot}},
|
||||
{MODKEY | ShiftMask, XK_m, quit, {0}},
|
||||
{MODKEY, XK_Right, focusstack, {.i = +1}},
|
||||
{MODKEY, XK_Left, focusstack, {.i = -1}},
|
||||
|
6
modules/system/nix/x/slstatus/default.nix
Normal file
6
modules/system/nix/x/slstatus/default.nix
Normal file
@ -0,0 +1,6 @@
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
(slstatus.overrideAttrs (_: { src = ./source/slstatus; }))
|
||||
];
|
||||
}
|
1
modules/system/nix/x/slstatus/source/slstatus
Submodule
1
modules/system/nix/x/slstatus/source/slstatus
Submodule
Submodule modules/system/nix/x/slstatus/source/slstatus added at 142f761930
Reference in New Issue
Block a user