big refactor

This commit is contained in:
Asaki Yuki 2026-04-09 10:36:32 +07:00
commit 76d68230f6
81 changed files with 3065 additions and 0 deletions

View file

@ -0,0 +1,15 @@
{ pkgs, ... }:
let
EXTRA_PLUGINS = [
./extras/neocord.nix
./extras/mini-icons.nix
];
LUA = [
./lua/neocord.lua
];
in
{
extraPlugins = map (path: import path { plugins = pkgs.vimPlugins; }) EXTRA_PLUGINS;
extraConfigLua = builtins.concatStringsSep "\n" (map builtins.readFile LUA);
}

View file

@ -0,0 +1,33 @@
{ ... }@inputs:
{
plugins = {
nvim-tree = import ./nvimtree.nix inputs;
lsp = import ./lsp.nix inputs;
lspkind = import ./lspkind.nix inputs;
conform-nvim = import ./conform-nvim.nix inputs;
which-key = import ./which-key.nix inputs;
lint = import ./lint.nix inputs;
cmp = import ./cmp.nix inputs;
cmp-nvim-lsp.enable = true;
cmp-buffer.enable = true;
cmp-path.enable = true;
cmp_luasnip.enable = true;
web-devicons.enable = true;
lz-n.enable = true;
treesitter.enable = true;
lualine.enable = true;
neoscroll.enable = true;
image.enable = true;
nvim-autopairs.enable = true;
bufferline.enable = true;
luasnip.enable = true;
friendly-snippets.enable = true;
indent-blankline.enable = true;
barbar.enable = true;
toggleterm.enable = true;
auto-save.enable = true;
visual-multi.enable = true;
};
}

View file

@ -0,0 +1,25 @@
{ ... }: {
enable = true;
autoEnableSources = true;
settings = {
sources = [
{ name = "nvim_lsp"; }
{ name = "path"; }
{ name = "luasnip"; }
{ name = "buffer"; }
];
mapping = {
"<C-Space>" = "cmp.mapping.complete()";
"<C-d>" = "cmp.mapping.scroll_docs(-4)";
"<C-f>" = "cmp.mapping.scroll_docs(4)";
"<C-e>" = "cmp.mapping.abort()";
"<CR>" = "cmp.mapping.confirm({ select = true })";
"<Tab>" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})";
"<S-Tab>" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})";
};
formatting.fields = [ "kind" "abbr" "menu" ];
};
}

View file

@ -0,0 +1,20 @@
{ ... }:
{
enable = true;
settings = {
formatters_by_ft = {
javascript = [ "prettier" ];
typescript = [ "prettier" ];
json = [ "prettier" ];
css = [ "prettier" ];
html = [ "prettier" ];
nix = [ "nixfmt" ];
php = [ "php_cs_fixer" ];
};
format_on_save = {
timeout_ms = 500;
lsp_fallback = true;
};
};
}

View file

@ -0,0 +1,4 @@
{ plugins, ... }:
{
plugin = plugins.mini-icons;
}

View file

@ -0,0 +1,4 @@
{ plugins, ... }:
{
plugin = plugins.neocord;
}

View file

@ -0,0 +1,6 @@
{ ... }:
{
enable = true;
lintersByFt = {
};
}

View file

@ -0,0 +1,12 @@
{ ... }:
{
enable = true;
servers = {
phpactor.enable = true;
nil_ls.enable = true;
pyright.enable = true;
ts_ls.enable = true;
html.enable = true;
cssls.enable = true;
};
}

View file

@ -0,0 +1,4 @@
{ ... }: {
enable = true;
cmp.enable = true;
}

View file

@ -0,0 +1,24 @@
require("neocord").setup({
-- General options
logo= "auto", -- "auto" or url
logo_tooltip= nil,-- nil or string
main_image= "language", -- "language" or "logo"
client_id = "1157438221865717891",-- Use your own Discord application client id (not recommended)
log_level = nil,-- Log messages at or above this level (one of the following: "debug", "info", "warn", "error")
debounce_timeout= 10, -- Number of seconds to debounce events (or calls to `:lua package.loaded.presence:update(<filename>, true)`)
blacklist = {}, -- A list of strings or Lua patterns that disable Rich Presence if the current file name, path, or workspace matches
file_assets = {}, -- Custom file asset definitions keyed by file names and extensions (see default config at `lua/presence/file_assets.lua` for reference)
show_time = true, -- Show the timer
global_timer= false,-- if set true, timer won't update when any event are triggered
buttons = nil,-- A list of buttons (objects with label and url attributes) or a function returning such list.
-- Rich Presence text options
editing_text= "Editing %s", -- Format string rendered when an editable file is loaded in the buffer (either string or function(filename: string): string)
file_explorer_text= "Browsing %s",-- Format string rendered when browsing a file explorer (either string or function(file_explorer_name: string): string)
git_commit_text = "Committing changes", -- Format string rendered when committing changes in git (either string or function(filename: string): string)
plugin_manager_text = "Managing plugins", -- Format string rendered when managing plugins (either string or function(plugin_manager_name: string): string)
reading_text= "Reading %s", -- Format string rendered when a read-only or unmodifiable file is loaded in the buffer (either string or function(filename: string): string)
workspace_text= "Working on %s",-- Format string rendered when in a git repository (either string or function(project_name: string|nil, filename: string): string)
line_number_text= "Line %s out of %s",-- Format string rendered when `enable_line_number` is set to true (either string or function(line_number: number, line_count: number): string)
terminal_text = "Using Terminal", -- Format string rendered when in terminal mode.
})

View file

@ -0,0 +1,5 @@
{ ... }: {
enable = true;
openOnSetupFile = true;
settings.auto_reload_on_write = true;
}

View file

@ -0,0 +1,7 @@
{ ... }:
{
enable = true;
settings = {
preset = "modern";
};
}