fix: reduce size of config
Some checks failed
/ check (nvimDev) (push) Successful in 10s
/ check (nvimHeadless) (push) Failing after 6s
/ check (nvimNoBundledBins) (push) Successful in 8s
/ check (nvimNoLsp) (push) Successful in 8s
/ check (nvimNoTSGrammars) (push) Successful in 9s
/ check (treefmt) (push) Successful in 3s
/ build (audiomenu) (push) Has been skipped
/ build (docs) (push) Has been skipped
/ build (jpassmenu) (push) Has been skipped
/ build (nixosConfigurations.vm.config.system.build.toplevel) (push) Has been skipped
/ build (nvim) (push) Has been skipped
/ report-size (push) Has been skipped
Some checks failed
/ check (nvimDev) (push) Successful in 10s
/ check (nvimHeadless) (push) Failing after 6s
/ check (nvimNoBundledBins) (push) Successful in 8s
/ check (nvimNoLsp) (push) Successful in 8s
/ check (nvimNoTSGrammars) (push) Successful in 9s
/ check (treefmt) (push) Successful in 3s
/ build (audiomenu) (push) Has been skipped
/ build (docs) (push) Has been skipped
/ build (jpassmenu) (push) Has been skipped
/ build (nixosConfigurations.vm.config.system.build.toplevel) (push) Has been skipped
/ build (nvim) (push) Has been skipped
/ report-size (push) Has been skipped
And add more knobs to further reduce the config size.
This commit is contained in:
parent
b6ca45f7fc
commit
5a7f12d997
5 changed files with 99 additions and 88 deletions
|
@ -17,7 +17,10 @@
|
|||
};
|
||||
};
|
||||
moduleDev = nvimModule { };
|
||||
moduleHeadless = nvimModule { jhome.nvim.dev.enable = false; };
|
||||
moduleHeadless = nvimModule {
|
||||
jhome.nvim.dev.enable = false;
|
||||
jhome.nvim.reduceSize = true;
|
||||
};
|
||||
moduleNoLsp = nvimModule { jhome.nvim.dev.bundleLSPs = false; };
|
||||
moduleNoTSGrammars = nvimModule { jhome.nvim.dev.bundleGrammars = false; };
|
||||
moduleNoBundledBins = nvimModule {
|
||||
|
|
|
@ -69,12 +69,10 @@ in
|
|||
homedir = "${config.xdg.dataHome}/gnupg";
|
||||
};
|
||||
# Mail client
|
||||
himalaya.enable = true;
|
||||
# Another shell
|
||||
nushell.enable = true;
|
||||
himalaya.enable = lib.mkDefault true;
|
||||
# Password manager
|
||||
password-store = {
|
||||
enable = true;
|
||||
enable = lib.mkDefault true;
|
||||
package = pkgs.pass-nodmenu;
|
||||
settings.PASSWORD_STORE_DIR = "${config.xdg.dataHome}/pass";
|
||||
};
|
||||
|
|
|
@ -71,6 +71,8 @@ in
|
|||
enable = true;
|
||||
scripts = builtins.attrValues { inherit (pkgs.mpvScripts) uosc thumbfast; };
|
||||
};
|
||||
# Text editor
|
||||
nvim.clipboard.providers.wl-copy.enable = lib.mkDefault true;
|
||||
# Status bar
|
||||
waybar = {
|
||||
enable = true;
|
||||
|
|
|
@ -12,6 +12,7 @@ in
|
|||
{
|
||||
options.jhome.nvim = {
|
||||
enable = mkDisableOption "jalil's Neovim configuration";
|
||||
reduceSize = mkEnableOption "reduce size by disabling big modules";
|
||||
dev = mkOption {
|
||||
type = types.submodule {
|
||||
options = {
|
||||
|
|
|
@ -1,4 +1,14 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.jhome.nvim;
|
||||
plugins = pkgs.vimPlugins;
|
||||
extraPlugins = import ./extraPlugins { inherit pkgs; };
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./options.nix
|
||||
|
@ -8,91 +18,88 @@
|
|||
./augroups.nix
|
||||
];
|
||||
|
||||
config = {
|
||||
withRuby = false;
|
||||
globals.mapleader = " ";
|
||||
# Appearance
|
||||
colorschemes.gruvbox = {
|
||||
enable = true;
|
||||
settings = {
|
||||
bold = true;
|
||||
transparent_mode = true;
|
||||
terminal_colors = true;
|
||||
config = lib.mkMerge [
|
||||
{
|
||||
withRuby = false;
|
||||
globals.mapleader = " ";
|
||||
# Appearance
|
||||
colorschemes.gruvbox = {
|
||||
enable = true;
|
||||
settings = {
|
||||
bold = true;
|
||||
transparent_mode = true;
|
||||
terminal_colors = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
clipboard.providers.wl-copy.enable = true;
|
||||
opts = {
|
||||
number = true;
|
||||
relativenumber = true;
|
||||
colorcolumn = "+1";
|
||||
cursorline = true;
|
||||
wrap = false;
|
||||
splitright = true;
|
||||
# Tabs & indentation
|
||||
smarttab = true;
|
||||
autoindent = true;
|
||||
smartindent = true;
|
||||
# Search path
|
||||
path = ".,/usr/include,**";
|
||||
wildmenu = true;
|
||||
hlsearch = true;
|
||||
incsearch = true;
|
||||
ignorecase = true; # Search ignores cases
|
||||
smartcase = true; # Unless it has a capital letter
|
||||
# Enable local configuration :h 'exrc'
|
||||
exrc = true; # safe since nvim 0.9
|
||||
};
|
||||
extraPlugins =
|
||||
let
|
||||
plugins = pkgs.vimPlugins;
|
||||
extraPlugins = import ./extraPlugins { inherit pkgs; };
|
||||
in
|
||||
[
|
||||
opts = {
|
||||
number = true;
|
||||
relativenumber = true;
|
||||
colorcolumn = "+1";
|
||||
cursorline = true;
|
||||
wrap = false;
|
||||
splitright = true;
|
||||
# Tabs & indentation
|
||||
smarttab = true;
|
||||
autoindent = true;
|
||||
smartindent = true;
|
||||
# Search path
|
||||
path = ".,/usr/include,**";
|
||||
wildmenu = true;
|
||||
hlsearch = true;
|
||||
incsearch = true;
|
||||
ignorecase = true; # Search ignores cases
|
||||
smartcase = true; # Unless it has a capital letter
|
||||
# Enable local configuration :h 'exrc'
|
||||
exrc = true; # safe since nvim 0.9
|
||||
};
|
||||
extraPlugins = [
|
||||
plugins.nui-nvim
|
||||
plugins.nvim-web-devicons
|
||||
plugins.vim-jjdescription
|
||||
extraPlugins.nvim-silicon
|
||||
plugins.vim-jjdescription # FIXME: included since neovim nightly
|
||||
];
|
||||
# Formatting & linters
|
||||
extraPackages = [
|
||||
pkgs.luajitPackages.jsregexp
|
||||
pkgs.silicon
|
||||
];
|
||||
extraConfigLuaPre =
|
||||
# lua
|
||||
''
|
||||
-- Lua Pre Config
|
||||
if vim.fn.has 'termguicolors' then
|
||||
-- Enable RGB colors
|
||||
vim.g.termguicolors = true
|
||||
end
|
||||
extraPackages = [ pkgs.luajitPackages.jsregexp ];
|
||||
extraConfigLuaPre =
|
||||
# lua
|
||||
''
|
||||
-- Lua Pre Config
|
||||
if vim.fn.has 'termguicolors' then
|
||||
-- Enable RGB colors
|
||||
vim.g.termguicolors = true
|
||||
end
|
||||
|
||||
-- Useful function
|
||||
local has_words_before = function()
|
||||
-- unpack = unpack or table.unpack
|
||||
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||
return col ~= 0
|
||||
and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match '%s' == nil
|
||||
end
|
||||
-- END: Lua Pre Config
|
||||
'';
|
||||
extraConfigLua =
|
||||
# lua
|
||||
''
|
||||
-- Lua Config
|
||||
require("nvim-silicon").setup {
|
||||
theme = "gruvbox-dark",
|
||||
pad_horiz = 16,
|
||||
pad_vert = 16,
|
||||
-- Current buffer name
|
||||
window_title = function()
|
||||
return vim.fn.fnamemodify(
|
||||
vim.api.nvim_buf_get_name(vim.api.nvim_get_current_buf()),
|
||||
":t"
|
||||
)
|
||||
end,
|
||||
}
|
||||
-- END: Lua Config
|
||||
'';
|
||||
};
|
||||
-- Useful function
|
||||
local has_words_before = function()
|
||||
-- unpack = unpack or table.unpack
|
||||
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||
return col ~= 0
|
||||
and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match '%s' == nil
|
||||
end
|
||||
-- END: Lua Pre Config
|
||||
'';
|
||||
}
|
||||
# Big packages that are kinda unnecessary
|
||||
(lib.mkIf (!cfg.reduceSize) {
|
||||
extraPlugins = [ extraPlugins.nvim-silicon ];
|
||||
extraPackages = [ pkgs.silicon ];
|
||||
|
||||
extraConfigLua =
|
||||
# lua
|
||||
''
|
||||
-- Lua Config
|
||||
require("nvim-silicon").setup {
|
||||
theme = "gruvbox-dark",
|
||||
pad_horiz = 16,
|
||||
pad_vert = 16,
|
||||
-- Current buffer name
|
||||
window_title = function()
|
||||
return vim.fn.fnamemodify(
|
||||
vim.api.nvim_buf_get_name(vim.api.nvim_get_current_buf()),
|
||||
":t"
|
||||
)
|
||||
end,
|
||||
}
|
||||
-- END: Lua Config
|
||||
'';
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue