This commit is contained in:
joy 2024-07-08 14:25:03 +02:00
parent e03d198387
commit e22962c7f2
8 changed files with 0 additions and 319 deletions

View file

@ -1,46 +0,0 @@
{ ... }:
{
home-manager.users.joy = {
imports = [
./plugins
./set.nix
];
programs.nixvim = {
enable = true;
defaultEditor = true;
vimAlias = true;
clipboard.register = "unnamedplus";
colorschemes.gruvbox.enable = true;
plugins = {
presence-nvim = {
enable = true;
mainImage = "file";
};
bufferline = {
enable = true;
separatorStyle = "slope";
};
treesitter = {
enable = true;
indent = true;
nixvimInjections = true;
};
treesitter-context.enable = true;
nvim-tree = {
enable = true;
renderer.groupEmpty = true;
};
lualine.enable = true;
};
keymaps = [
{
mode = "n";
key = "<C-n>";
action = "<cmd>NvimTreeToggle<CR>";
}
];
};
};
}

View file

@ -1,78 +0,0 @@
{ ... }:
{
programs.nixvim.plugins.alpha = {
enable = true;
layout = [
{
type = "padding";
val = 4;
}
{
opts = {
hl = "AlphaHeader";
position = "center";
};
type = "text";
val = [
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" git@github.com:TomJuri "
];
}
{
type = "padding";
val = 2;
}
{
type = "group";
val = let
mkButton = shortcut: cmd: val: hl: {
type = "button";
inherit val;
opts = {
inherit hl shortcut;
keymap = [
"n"
shortcut
cmd
{}
];
position = "center";
cursor = 0;
width = 40;
align_shortcut = "right";
hl_shortcut = "Keyword";
};
};
in [
(
mkButton
"f"
"<CMD>lua require('telescope.builtin').find_files({hidden = true})<CR>"
"🔍 Find File"
"Operator"
)
(
mkButton
"q"
"<CMD>qa<CR>"
"💣 Quit"
"String"
)
];
}
{
type = "padding";
val = 2;
}
];
};
}

View file

@ -1,81 +0,0 @@
{ ... }:
{
programs.nixvim = {
plugins = {
cmp-nvim-lsp.enable = true;
cmp_luasnip.enable = true;
cmp = {
enable = true;
settings = {
autoEnableSources = true;
experimental = { ghost_text = true; };
performance = {
debounce = 57;
fetchingTimeout = 197;
maxViewEntries = 27;
};
snippet.expand = ''
function(args)
require('luasnip').lsp_expand(args.body)
end
'';
formatting.fields = ["kind" "abbr" "menu"];
sources = [
{
name = "nvim_lsp";
}
{
name = "luasnip";
}
];
mapping = {
"<Tab>" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})";
"<CR>" = "cmp.mapping.confirm({ select = true })";
"<C-Space>" = "cmp.mapping.complete()";
"<C-j>" = "cmp.mapping.select_next_item()";
"<C-k>" = "cmp.mapping.select_prev_item()";
};
window = {
completion.border = "solid";
documentation.border = "solid";
};
};
};
};
extraConfigLua = ''
luasnip = require("luasnip")
kind_icons = {
Text = "󰊄",
Method = "",
Function = "󰡱",
Constructor = "",
Field = "",
Variable = "󱀍",
Class = "",
Interface = "",
Module = "󰕳",
Property = "",
Unit = "",
Value = "",
Enum = "",
Keyword = "",
Snippet = "",
Color = "",
File = "",
Reference = "",
Folder = "",
EnumMember = "",
Constant = "",
Struct = "",
Event = "",
Operator = "",
TypeParameter = "",
}
'';
};
}

View file

@ -1,10 +0,0 @@
{ ... }:
{
imports = [
./alpha.nix
./cmp.nix
./lsp.nix
./luasnip.nix
./telescope.nix
];
}

View file

@ -1,12 +0,0 @@
{ ... }:
{
programs.nixvim.plugins.lsp = {
enable = true;
servers = {
nil-ls = { enable = true; };
kotlin-language-server = { enable = true; };
rust-analyzer = { enable = true; installCargo = true; installRustc = true; };
pyright = { enable = true; };
};
};
}

View file

@ -1,16 +0,0 @@
{ pkgs, ... }:
{
programs.nixvim.plugins.luasnip = {
enable = true;
extraConfig = {
enable_autosnippets = true;
store_selection_keys = "<Tab>";
};
fromVscode = [
{
lazyLoad = true;
paths = "${pkgs.vimPlugins.friendly-snippets}";
}
];
};
}

View file

@ -1,48 +0,0 @@
{ pkgs, ... }:
{
home.packages = [
pkgs.ripgrep
];
programs.nixvim.plugins.telescope = {
enable = true;
extensions = {
file-browser = {
enable = true;
};
fzf-native = {
enable = true;
};
};
settings = {
defaults = {
layout_config = {
horizontal = {
prompt_position = "top";
};
};
sorting_strategy = "ascending";
};
};
keymaps = {
"<leader><space>" = {
action = "find_files, {}";
options = {
desc = "Find project files";
};
};
"<leader>/" = {
action = "live_grep";
options = {
desc = "Grep (root dir)";
};
};
"<C-p>" = {
action = "git_files, {}";
options = {
desc = "Search git files";
};
};
};
};
}

View file

@ -1,28 +0,0 @@
{ ... }:
{
programs.nixvim = {
globals.mapleader = " ";
opts = {
number = true;
relativenumber = true;
tabstop = 2;
softtabstop = 2;
showtabline = 2;
expandtab = true;
shiftwidth = 2;
smartindent = true;
breakindent = true;
cursorline = true;
scrolloff = 8;
cmdheight = 0;
wrap = true;
termguicolors = true;
colorcolumn = "150";
showmode = false;
};
};
}