vim config updates

This commit is contained in:
2023-11-25 20:16:01 +01:00
parent 22ad4298cb
commit 751abf7e24
22 changed files with 361 additions and 220 deletions

BIN
Lakeside-2/Lakeside-2-1.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

BIN
Lakeside-2/Lakeside-2-2.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

BIN
Lakeside-2/Lakeside-2-3.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

BIN
Lakeside-2/Lakeside-2-4.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

BIN
Lakeside-2/Lakeside-2-5.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

BIN
Lakeside-2/Lakeside-2-6.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

BIN
Lakeside-2/Lakeside-2-7.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

BIN
Lakeside-2/Lakeside-2-8.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

BIN
Lakeside-2/Lakeside-2-9.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

View File

@@ -169,6 +169,7 @@
slurp
wl-clipboard
polkit_gnome
xdg-desktop-portal-gtk
/* TODO: (flameshot.overrideAttrs(prev: {
nativeBuildInputs = prev.nativeBuildInputs ++ [ git grim ];
cmakeFlags = [
@@ -211,10 +212,6 @@
name = "adw-gtk3-dark";
package = pkgs.adw-gtk3;
};
cursorTheme = {
name = "capitaine-cursors";
package = pkgs.capitaine-cursors;
};
iconTheme = {
name = "Tela";
package = pkgs.tela-icon-theme;
@@ -225,10 +222,17 @@
platformTheme = "gtk";
};
home.file.profile = {
home = {
pointerCursor = {
gtk.enable = true;
package = pkgs.capitaine-cursors;
name = "capitaine-cursors";
};
file.profile = {
enable = true;
target = ".zprofile"; # change to .profile if you're not using zsh
text = ''
text = /* sh */ ''
Hyprland && echo "goodbye" && exit 0 \
|| echo "$? couldn't launch Hyprland" && tty | grep tty1 \
&& echo "refusing to autologin without Hyprland on tty1" && exit 0 \
@@ -236,9 +240,10 @@
'';
};
home.file.".config/hypr/shaders" = {
file.".config/hypr/shaders" = {
source = ./hypr/shaders;
recursive = true;
};
};
}

View File

@@ -3,45 +3,20 @@
enable = true;
shellIntegration.enableFishIntegration = true;
font = {
package = pkgs.fira-code-nerdfont;
name = "FiraCode Nerdfont";
package = pkgs.fira-code;
name = "FiraCode";
size = 12;
};
extraConfig = ''
symbol_map U+23FB-U+23FE,U+2665,U+26A1,U+2B58,U+E000-U+E00A,U+E0A0-U+E0A3,U+E0B0-U+E0D4,U+E200-U+E2A9,U+E300-U+E3E3,U+E5FA-U+E6AA,U+E700-U+E7C5,U+EA60-U+EBEB,U+F000-U+F2E0,U+F300-U+F32F,U+F400-U+F4A9,U+F500-U+F8FF,U+F0001-U+F1AF0 Symbols Nerd Font Mono
include ./current-theme.conf
'';
settings = {
background_opacity = "0.8";
window_padding_width = 24;
window_padding_width = 10;
cursor = "#928374";
cursor_text_color = "background";
url_color = "#83a598";
visual_bell_color = "#8ec07c";
bell_border_color = "#8ec07c";
active_border_color = "#d3869b";
inactive_border_color = "#665c54";
foreground = "#ebdbb2";
background = "#282828";
selection_foreground = "#928374";
selection_background = "#ebdbb2";
active_tab_foreground = "#fbf1c7";
active_tab_background = "#665c54";
inactive_tab_foreground= "#a89984";
inactive_tab_background= "#3c3836";
color0 = "#665c54";
color8 = "#7c6f64";
color1 = "#cc241d";
color9 = "#fb4934";
color2 = "#98971a";
color10 = "#b8bb26";
color3 = "#d79921";
color11 = "#fabd2f";
color4 = "#458588";
color12 = "#83a598";
color5 = "#b16286";
color13 = "#d3869b";
color6 = "#689d6a";
color14 = "#8ec07c";
color7 = "#a89984";
color15 = "#bdae93";
};
}

View File

@@ -27,5 +27,5 @@ in {
};
programs = import ./programs.nix { inherit pkgs; };
services = import ./services.nix { inherit pkgs; };
services = import ./services.nix { inherit pkgs homeDirectory; };
}

View File

@@ -6,12 +6,29 @@ let
src = pkgs.fetchFromGitHub {
owner = "dlvandenberg";
repo = "nvim-treesitter-angular";
rev = "e852e68352f1eed8f098691a74fd057461379cfe";
sha256 = "sha256-zSVKDWAUYoXjxxZIovx9BqGyjKMmtvlUhnKLiYE/RIk=";
rev = "1d1b468180c2b2d40bf87a834a28297456e24825";
hash = "sha256-z7jcJsrDdHE69VLO3V0nteZEvWxEN16vIOJDGJ01SJs=";
};
});
darkman = (pkgs.vimUtils.buildVimPlugin {
name = "darkman";
src = pkgs.buildGoModule rec {
pname = "darkman.nvim";
version = "0.0.1";
vendorHash = "sha256-HpyKzvKVN9hVRxxca4sdWRo91H32Ha9gxitr7Qg5MY8=";
src = pkgs.fetchFromGitHub {
owner = "4e554c4c";
repo = "darkman.nvim";
rev = "150aa63a13837c44abd87ff20d3a806321a17b2d";
sha256 = "sha256-ssEYdM460I1rufjgh63CEkLi4K+bEWbwku/6gQbytno=";
};
postInstall = ''
cp -r lua $out
'';
};
});
in
{
{
enable = true;
defaultEditor = true;
@@ -24,6 +41,10 @@ in
shiftwidth = 2;
expandtab = true;
smartindent = true;
signcolumn = "yes";
undodir = { __raw = /* lua */ "os.getenv('HOME') .. '/.config/nvim/undodir'"; };
undofile = true;
scrolloff = 8;
@@ -34,13 +55,18 @@ in
keymaps = [
{ key = "<leader>u"; mode = "n"; action = "<cmd>:UndotreeToggle<CR>"; }
{ key = "<leader>t"; mode = "n"; action = "<cmd>:NvimTreeOpen<CR>"; }
{ key = "<leader>ft"; action = "<cmd>:Neotree toggle<CR>"; }
{ key = "<leader>s"; action = "<cmd>:SymbolsOutline<CR>"; }
];
globals = {
minimap_width = 10;
minimap_auto_start = 1;
minimap_auto_start_win_enter = 1;
minimap_close_buftypes = [ "nofile" ];
minimap_block_filetypes = [ "NvimTree" ];
catppuccin_debug = true;
mapleader = ";";
};
@@ -55,11 +81,16 @@ in
'';
extraConfigLua = /* lua */ ''
require("scrollbar").setup()
require("darkman").setup()
require("symbols-outline").setup()
local Terminal = require('toggleterm.terminal').Terminal
local lazygit = Terminal:new({
cmd = "lazygit",
dir = "git_dir",
direction = "float",
on_open = function(term)
vim.cmd("startinsert!")
vim.api.nvim_buf_set_keymap(term.bufnr, "n", "q", "<cmd>close<CR>", {noremap = true, silent = true})
@@ -77,42 +108,79 @@ in
vim.api.nvim_set_keymap("n", "<leader>g", "<cmd>lua _lazygit_toggle()<CR>", {noremap = true, silent = true})
'';
colorschemes.gruvbox = {
colorschemes.catppuccin = {
enable = true;
trueColor = true;
bold = true;
italics = true;
undercurl = true;
underline = true;
transparentBg = true;
transparentBackground = true;
background = {
dark = "frappe";
light = "latte";
};
integrations.indent_blankline.colored_indent_levels = true;
};
plugins = {
lualine.enable = true;
fidget.enable = true;
auto-save.enable = true;
lualine = {
enable = true;
globalstatus = true;
sectionSeparators = { left = ""; right = ""; };
componentSeparators = { left = ""; right = ""; };
sections = {
lualine_a = [ { name = "mode"; separator = { right = ""; left = ""; }; icon = ""; } ];
lualine_z = [ { name = "location"; separator = { right = ""; left = ""; }; } ];
};
};
noice = {
enable = true;
lsp.override = {
"vim.lsp.util.convert_input_to_markdown_lines" = true;
"vim.lsp.util.stylize_markdown" = true;
"cmp.entry.get_documentation" = true;
};
presets = {
bottom_search = true;
command_palette = true;
long_message_to_split = true;
inc_rename = false;
lsp_doc_border = false;
};
};
auto-save = {
enable = true;
triggerEvents = [ "FocusLost" "CursorHold" "BufLeave" ];
};
indent-blankline = {
enable = true;
indent.char = "";
};
illuminate.enable = true;
rainbow-delimiters.enable = true;
notify.enable = true;
nvim-autopairs.enable = true;
nvim-colorizer.enable = true;
nvim-tree = {
neo-tree = {
enable = true;
filters.dotfiles = true;
filesystem.filteredItems.visible = true;
eventHandlers = {
file_opened = /* lua */ ''
function()
require('neo-tree').close_all()
end
'';
};
};
undotree.enable = true;
toggleterm = {
enable = true;
openMapping = "<c-t>";
direction = "horizontal";
openMapping = "<leader>t";
direction = "vertical";
size = 60;
};
telescope = {
enable = true;
keymaps = {
"<leader>ff" = "find_files";
"<leader>ff" = "git_files";
"<leader>fa" = "find_files";
"<leader>fg" = "live_grep";
"<leader>fb" = "buffers";
"<leader>fh" = "help_tags";
@@ -129,8 +197,8 @@ in
src = pkgs.fetchFromGitHub {
owner = "dlvandenberg";
repo = "tree-sitter-angular";
rev = "b13cf5ccc54805622db6505904bf60b80537f22a";
sha256 = "sha256-tOEuWDarWQSNhS7A3ah3tKohbYCxw0QO/GJWEURAxpc=";
rev = "e316388ca6dcc728a5c521b4d63acecdeedab942";
hash = "sha256-t/qLxBideSGP/x4dhDu8MvMnugIEhcBvYasUdUFisFI=";
};
})
];
@@ -171,18 +239,32 @@ in
};
};
lspkind = {
enable = true;
mode = "symbol";
cmp.after = /* lua */ ''
function(entry, vim_item, kind)
kind.kind = kind.kind .. " ";
return kind
end
'';
};
nvim-cmp = {
enable = true;
mapping = {
"<F7>" = /* lua */ "cmp.mapping.select_next_item({behavior = cmp.SelectBehavior.Select})";
"<F5>" = /* lua */ "cmp.mapping.select_prev_item({behavior = cmp.SelectBehavior.Select})";
"<F6>" = /* lua */ "cmp.mapping.confirm({select = true})";
"<C-n>" = /* lua */ "cmp.mapping.select_next_item({behavior = cmp.SelectBehavior.Select})";
"<C-p>" = /* lua */ "cmp.mapping.select_prev_item({behavior = cmp.SelectBehavior.Select})";
"<C-Space>" = /* lua */ "cmp.mapping.confirm({select = true})";
"<C-Enter>" = /* lua */ "cmp.mapping.complete()";
};
sources = [
{ name = "path"; }
{ name = "nvim_lsp"; }
{ name = "npm"; }
{ name = "treesitter"; }
];
formatting.fields = [ "kind" "abbr" "menu" ];
window.completion.border = "rounded";
};
nix.enable = true;
@@ -190,7 +272,9 @@ in
extraPackages = [ angular-ls pkgs.nodePackages.typescript-language-server ];
extraPlugins = with pkgs.vimPlugins; [
minimap-vim
nvim-treesitter-angular
darkman
nvim-scrollbar
symbols-outline-nvim
];
}
}

View File

@@ -1,4 +1,4 @@
{ pkgs }:
{ pkgs, homeDirectory }:
{
gpg-agent = {
enable = true;
@@ -8,4 +8,81 @@
# fix pinentry on non-gnome with this in
# the system config: services.dbus.packages = with pkgs; [ gcr ];
gnome-keyring.enable = true;
darkman = {
enable = true;
package = pkgs.buildGoModule rec {
pname = "darkman";
version = "1.5.4";
src = pkgs.fetchFromGitLab {
owner = "WhyNotHugo";
repo = "darkman";
rev = "5332193777fb0c5dbde6cbfd015a16697d6a0c8e";
hash = "sha256-3TGDy7hiI+z0IrA+d/Q+rMFlew6gipdpXyJ5eVLCmds=";
};
vendorHash = "sha256-xEPmNnaDwFU4l2G4cMvtNeQ9KneF5g9ViQSFrDkrafY=";
nativeBuildInputs = [ pkgs.scdoc ];
postPatch = ''
substituteInPlace darkman.service \
--replace "/usr/bin/darkman" "$out/bin/darkman"
substituteInPlace contrib/dbus/nl.whynothugo.darkman.service \
--replace "/usr/bin/darkman" "$out/bin/darkman"
substituteInPlace contrib/dbus/org.freedesktop.impl.portal.desktop.darkman.service \
--replace "/usr/bin/darkman" "$out/bin/darkman"
'';
buildPhase = ''
runHook preBuild
make build
runHook postBuild
'';
installPhase = ''
runHook preInstall
make PREFIX=$out install
runHook postInstall
'';
meta = with pkgs.lib; {
description = "Framework for dark-mode and light-mode transitions on Linux desktop";
homepage = "https://gitlab.com/WhyNotHugo/darkman";
license = licenses.isc;
maintainers = [ maintainers.ajgrf ];
platforms = platforms.linux;
mainProgram = "darkman";
};
};
settings = {
lat = 52.52;
lng = 13.405;
};
darkModeScripts = {
gtk-theme = /* bash */ ''
${pkgs.dconf}/bin/dconf write \
/org/gnome/desktop/interface/color-scheme "'prefer-dark'"
'';
kitty-theme = /* bash */ ''
${pkgs.kitty}/bin/kitty +kitten themes --reload-in=all --config-file-name ${homeDirectory}/.config/kitty/current-colors.conf Catppuccin-Frappe
'';
wallpaper = ''
${pkgs.swww}/bin/swww img ${./Lakeside-2/Lakeside-2-1.jpg}
'';
};
lightModeScripts = {
gtk-theme = /* bash */ ''
${pkgs.dconf}/bin/dconf write \
/org/gnome/desktop/interface/color-scheme "'prefer-light'"
'';
kitty-theme = /* bash */ ''
${pkgs.kitty}/bin/kitty +kitten themes --reload-in=all --config-file-name ${homeDirectory}/.config/kitty/current-colors.conf Catppuccin-Latte
'';
wallpaper = ''
${pkgs.swww}/bin/swww img ${./Lakeside-2/Lakeside-2-10.jpg}
'';
};
};
}