This commit is contained in:
2026-07-04 05:01:54 +02:00
parent 524ee6e1ce
commit 12f0b1e422
116 changed files with 1355 additions and 231 deletions
+28
View File
@@ -0,0 +1,28 @@
{
pkgs,
...
}: {
vim = {
autocomplete = {
nvim-cmp = {
enable = true;
sources = {
nvim_lsp = "[LSP]";
path = "[PATH]";
nvim_lua = "[LUA]";
};
sourcePlugins = [
"cmp-nvim-lsp"
"cmp-path"
];
};
};
extraLuaFiles = [
(builtins.path {
path = ./raw/cmp.lua;
name = "my-lua-file";
})
];
};
}
+9
View File
@@ -0,0 +1,9 @@
_:
{
vim.languages.clang = {
dap = {
enable = true;
debugger = "lldb-vscode";
};
};
}
+10
View File
@@ -0,0 +1,10 @@
_:
{
imports = [
./rust.nix
./clang.nix
./python.nix
];
}
+9
View File
@@ -0,0 +1,9 @@
_:
{
vim.languages.python = {
dap = {
enable = true;
debugger = "debugpy";
};
};
}
+8
View File
@@ -0,0 +1,8 @@
_:
{
vim.languages.rust = {
dap = {
enable = true;
};
};
}
+31
View File
@@ -0,0 +1,31 @@
{ ... }:
{
imports = [
./terminal.nix
./neotree.nix
./cmp.nix
./lualine.nix
./ui.nix
./lsp/default.nix
./dbg/default.nix
];
vim = {
extraLuaFiles = [
(builtins.path {
path = ./raw/opts.lua;
name = "opts.lua";
})
];
autopairs.nvim-autopairs.enable = true;
telescope.enable = true;
autocomplete = { enableSharedCmpSources = true; };
binds = {
whichKey = {
enable = true;
#setupOpts.preset = "helix";
};
};
};
}
+24
View File
@@ -0,0 +1,24 @@
{
description = "My autistic nvf config";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nvf.url = "github:notashelf/nvf";
};
outputs = { nixpkgs, nvf, ... }: let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
nvimWrapped = nvf.lib.neovimConfiguration {
inherit pkgs;
modules = [ ./default.nix ];
};
in {
packages.${system}.default = nvimWrapped.neovim;
nixosModules.default = { ... }: {
imports = [ nvf.nixosModules.default ];
programs.nvf = { enable = true; settings = import ./default.nix; };
};
};
}
+9
View File
@@ -0,0 +1,9 @@
_:
{
vim.languages.assembly = {
enable = true;
lsp = {
enable = true;
};
};
}
+7
View File
@@ -0,0 +1,7 @@
_:
{
vim.languages.bash = {
enable = true;
lsp.enable = true;
};
}
+10
View File
@@ -0,0 +1,10 @@
_:
{
vim.languages.clang = {
enable = true;
lsp = {
enable = true;
server = [ "ccls" ];
};
};
}
+14
View File
@@ -0,0 +1,14 @@
_:
{
imports = [
./asm.nix
./bash.nix
./clang.nix
./go.nix
./lua.nix
./nix-lang.nix
./python.nix
./rust.nix
./lspkind.nix
];
}
+7
View File
@@ -0,0 +1,7 @@
_:
{
vim.languages.go = {
enable = true;
lsp.enable = true;
};
}
+14
View File
@@ -0,0 +1,14 @@
_:
{
vim = {
lsp = {
lspkind = {
enable = true;
setupOpts = {
mode = "symbol_text";
preset = "codicons";
};
};
};
};
}
+6
View File
@@ -0,0 +1,6 @@
_:
{
vim.languages.lua = {
enable = true;
};
}
+18
View File
@@ -0,0 +1,18 @@
_:
{
vim.languages.nix = {
enable = true;
extraDiagnostics = {
enable = true;
};
format = {
enable = true;
type = "alejandra";
};
lsp = {
enable = true;
server = [ "nixd" ];
};
};
}
+7
View File
@@ -0,0 +1,7 @@
_:
{
vim.languages.python = {
enable = true;
lsp.enable = true;
};
}
+9
View File
@@ -0,0 +1,9 @@
_:
{
vim.languages.rust = {
enable = true;
dap.enable = true;
format.enable = true;
lsp.enable = true;
};
}
+26
View File
@@ -0,0 +1,26 @@
_:
{
vim = {
statusline = {
lualine = {
enable = true;
theme = "base16";
globalStatus = true;
icons.enable = true;
ignoreFocus = [
"neo-tree"
"filename"
"location"
];
componentSeparator = {
left = "";
right = "";
};
sectionSeparator = {
left = "";
right = "";
};
};
};
};
}
+17
View File
@@ -0,0 +1,17 @@
{ pkgs, ... }: {
vim = {
filetree = {
neo-tree = {
enable = true;
setupOpts = {
enable = true;
enable_git_status = true;
enable_diagnostics = true;
enable_refresh_on_write = true;
auto_clean_after_session_restore = true;
git_status_async = true;
};
};
};
};
}
+75
View File
@@ -0,0 +1,75 @@
local cmp = require("cmp")
local lspkind = require("lspkind")
vim.opt.completeopt = { "menu", "menuone", "noinsert", "noselect" }
cmp.setup({
formatting = {
format = function(entry, vim_item)
vim_item.kind = lspkind.symbolic(vim_item.kind, { mode = "symbol_text" })[entry.source.name]
vim_item.dup = ({
vsnip = 0,
nvim_lsp = 0,
nvim_lua = 0,
buffer = 0,
})[entry.source.name] or 0
return vim_item
end,
},
sorting = {
comparators = {
cmp.config.compare.offset,
cmp.config.compare.exact,
cmp.config.compare.score,
cmp.config.compare.kind,
cmp.config.compare.sort_text,
cmp.config.compare.length,
cmp.config.compare.order,
},
},
window = {
completion = {
autocomplete = true,
col_offset = -3,
side_padding = 0,
},
completion = cmp.config.window.bordered({
winhighlight = "Normal:Pmenu,FloatBorder:Pmenu,CursorLine:PmenuSel,Search:None",
}),
documentation = cmp.config.window.bordered({
winhighlight = "Normal:Pmenu,FloatBorder:Pmenu,CursorLine:PmenuSel,Search:None",
}),
},
mapping = cmp.mapping.preset.insert({
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
else
fallback()
end
end, { "i", "s" }),
["<S-Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
else
fallback()
end
end, { "i", "s" }),
["<C-b>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-Space>"] = cmp.mapping.complete(),
["<C-e>"] = cmp.mapping.abort(),
["<CR>"] = cmp.mapping.confirm({ select = false }),
}),
--sources = cmp.config.sources({
-- { name = 'nvim_lsp' },
-- { name = 'path' },
-- { name = 'nvim_lua' },
--}),
})
+40
View File
@@ -0,0 +1,40 @@
vim.opt.shiftwidth = 2
vim.opt.tabstop = 2
vim.opt.cursorline = true
vim.opt.cursorcolumn = true
vim.opt.expandtab = true
vim.opt.autoindent = true
vim.opt.smartindent = true
vim.opt.softtabstop = 2
vim.opt.relativenumber = true
vim.diagnostic.config({
virtual_text = true,
virtual_lines = false,
})
local map = vim.api.nvim_set_keymap
local opts = { noremap = true, silent = true }
vim.g.mapleader = "\\"
map('n', '<c-t>', ":ToggleTerm size=15<CR>", opts)
map('n', '<leader>n', ":Neotree filesystem reveal toggle<CR>", opts)
map('v', '<Tab>', '>gv', opts)
map('v', '<S-Tab>', '<gv', opts)
map('n', '<leader>ff', 'Telescope find_files<CR>', opts)
map('n', '<leader>gs', 'Telescope grep_string<CR>', opts)
vim.cmd [[
set nobackup
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
]]
+13
View File
@@ -0,0 +1,13 @@
{
pkgs,
...
}: {
vim = {
terminal = {
toggleterm = {
enable = true;
lazygit.enable = true;
};
};
};
}
+32
View File
@@ -0,0 +1,32 @@
_:
{
vim = {
tabline = {
nvimBufferline = {
enable = false;
};
};
ui = {
borders = {
enable = true;
globalStyle = "rounded";
};
colorful-menu-nvim.enable = true;
colorizer.enable = true;
};
theme = {
enable = true;
name = "oxocarbon";
style = "dark";
};
visuals = {
indent-blankline.enable = true;
fidget-nvim.enable = true;
nvim-web-devicons.enable = true;
};
dashboard.alpha = {
enable = true;
theme = "startify";
};
};
}