{ lib, config, }: let inherit (lib) optionalAttrs; in (lib.generators.toLua {}) { # Width of tabs in the editor tabwidth = 4; # If tabs should be expanded to spaces expandtab = false; keys = { # NeoVIM leader key leader = " "; # Keybind to remove active hilighted content noh = "h"; menus = { # Open file browser browser = "e"; # Show active buffers buffers = "fb"; # Show LSP errors error = "t"; # Find files in working directory find = "ff"; # Grep files in working directory grep = "fg"; # Search help menu help = "fh"; # Voew undo tree undo = "u"; }; lsp = { # Open LSP hover menu on a value hover = "K"; # Perform an LSP action on a value action = "la"; # View all references of a value references = "lr"; # Rename current and all references of a value rename = "ln"; }; cmp = { # Select previous value in completion engine prev = ""; # Select next value in completion engine next = ""; # Confirm current value in completion engine confirm = ""; # Auto complete using completion engine complete = ""; }; }; # list of lsp servers to load lsps = optionalAttrs config.development.c.enable { clangd = {}; } // optionalAttrs config.development.java.enable { jdtls = {}; kotlin_language_server = {}; } // optionalAttrs config.development.lua.enable { lua_ls = { Lua = { diagnostics = { globals = ["vim"]; }; }; }; } // optionalAttrs config.development.rust.enable { rust_analyzer = {}; } // optionalAttrs config.development.web.enable { ts_ls = {}; phpactor = {}; } // optionalAttrs config.development.zig.enable { zls = {}; }; highlight = { # max file size in KiB to attempt to parse max_size = 1024; }; # colorscheme theme = { colors = { base00 = "#${config.theme.colors.base}"; base01 = "#${config.theme.colors.surface}"; base02 = "#${config.theme.colors.surface}"; base03 = "#${config.theme.colors.subtext}"; base04 = "#${config.theme.colors.subtext}"; base05 = "#${config.theme.colors.text}"; base06 = "#${config.theme.colors.text}"; base07 = "#${config.theme.colors.overlay}"; base08 = "#${config.theme.colors.bright.red}"; base09 = "#${config.theme.colors.bright.orange}"; base0A = "#${config.theme.colors.bright.yellow}"; base0B = "#${config.theme.colors.bright.green}"; base0C = "#${config.theme.colors.bright.cyan}"; base0D = "#${config.theme.colors.bright.blue}"; base0E = "#${config.theme.colors.bright.magenta}"; base0F = "#${config.theme.colors.bright.pink}"; }; transparent = true; }; # max column width col = { # show a bar at `width` characters show = true; width = 80; }; }