{ pkgs, lib, config, inputs, outputs, ... }: { programs.nixvim = { enable = true; globals.mapleader = " "; extraConfigLua = builtins.readFile ../config-files/nvim/init.lua; extraPlugins = with pkgs.vimPlugins; [headlines-nvim]; clipboard.providers.wl-copy.enable = true; options = { number = true; # Show line numbers relativenumber = true; # Show relative line numbers shiftwidth = 2; # Tab width should be 2 }; colorschemes.catppuccin.enable = true; plugins = { obsidian = { enable = true; dir = "~/Documents/Obsidian Vault/"; }; indent-blankline.enable = true; lualine.enable = true; lsp-format = {enable = true;}; lsp = { enable = true; servers = { bashls.enable = true; lua-ls.enable = true; nushell.enable = true; clangd.enable = true; svelte.enable = true; tsserver.enable = true; eslint.enable = true; rust-analyzer = { enable = true; installCargo = false; installRustc = false; }; nil_ls.enable = true; }; }; gitsigns.enable = true; fugitive.enable = true; treesitter = { enable = true; folding = true; indent = true; nixvimInjections = true; }; treesitter-refactor = { enable = true; smartRename.enable = true; highlightCurrentScope.enable = true; navigation.enable = true; }; cursorline.enable = true; cmp = { enable = true; autoEnableSources = true; settings = { snippet = { expand = "function(args) require('luasnip').lsp_expand(args.body) end"; }; sources = [ {name = "nvim_lsp";} {name = "path";} {name = "buffer";} {name = "luasnip";} ]; #mapping = { # __raw = '' # cmp.mapping.preset.insert({ # [''] = # }) # ''; #}; mapping = { "" = '' cmp.mapping.confirm({ select = true }) ''; "" = '' function(fallback) local luasnip = require('luasnip') if cmp.visible() then cmp.select_next_item() elseif luasnip.expandable() then luasnip.expand() elseif luasnip.expand_or_jumpable() then luasnip.expand_or_jump() else fallback() end end ''; }; }; }; telescope.enable = true; telescope.extensions = {file_browser.enable = true;}; which-key.enable = true; cmp-nvim-lsp.enable = true; cmp-nvim-lua.enable = true; noice.enable = true; notify.enable = true; luasnip.enable = true; cmp_luasnip.enable = true; neo-tree.enable = true; presence-nvim.enable = true; crates-nvim.enable = true; fidget.enable = true; alpha = { enable = true; theme = null; iconsEnabled = true; layout = [ { type = "padding"; val = 4; } { type = "text"; #val = [ # " config by: " # " ▒██ ██▒ █████ ▄▄▄█████▓ ▄████▄ " # " ▒▒ █ █ ▒░▒██▓ ██▒▓ ██▒ ▓▒▒██▀ ▀█ " # " ░░ █ ░▒██▒ ██░▒ ▓██░ ▒░▒▓█ ▄ " # " ░ █ █ ▒ ░██ █▀ ░░ ▓██▓ ░ ▒▓▓▄ ▄██▒ " # " ▒██▒ ▒██▒░▒███▒█▄ ▒██▒ ░ ▒ ▓███▀ ░ " # " ▒▒ ░ ░▓ ░░░ ▒▒░ ▒ ▒ ░░ ░ ░▒ ▒ ░ " # " ░░ ░▒ ░ ░ ▒░ ░ ░ ░ ▒ " # " ░ ░ ░ ░ ░ ░ " # " ░ ░ ░ ░ ░ " # " ░ " # " git@git.sr.ht:xqtc " #]; val = [ " ███████████████ ██████████████████" " ███████████████ ██ " " ███████████████ ██████████████████" " ███████████████ ██ ██" " ███████████████ ██████████████████" " ███████████████ █ ██ █ " " ███████████████ █ ██ █ " " ███████████████ █ ██ █ " " ███████████████ " " ███████████████ ██████████████████" " ███████████████ ██ ██ " " ██████████████████████████ ██████████████████" " ██████████████████████████ ██ ██" " ██████████████████████████ ██████████████████" " ██████████████████████████ ██ ██ " " ██████████████████████████ ██████████████████" " ██████████████████████████ " " ██████████████████████████ ▀▀▀▀▀▀▀▀██▀▀▀▀▀▀▀▀" " ██████████████████████████ ▀▀▀▀▀▀▀▀██▀▀▀▀▀▀▀▀" " ██████████████████████████ ██████████████████" " ███████████████▀▀▀▀▀▀▀▀▀▀▀ ██ ██" " ███████████████ ██████████████████" " ███████████████ ▄▄▄▄▄▄▄▄██▄▄▄▄▄▄▄▄" " ████████████████ ▄▄▄▄▄▄▄▄██▄▄▄▄▄▄▄▄" " █████████████████ " " ██████████████████ ██████████████████" " ███████████████████ ██ " " ████████████████████ ██ " " █████████████████████ ██ " " ██████████████████████ ██ " " ███████████████████████ ██ " " ████████████████████████ ██████████████████" ]; opts = { position = "center"; hl = "Type"; }; } { type = "padding"; val = 3; } { type = "text"; # val = [ # " ███▄ █ ██▓▒██ ██▒ ██▒ █▓ ██▓ ███▄ ▄███▓" # " ██ ▀█ █ ▓██▒▒▒ █ █ ▒░▓██░ █▒▓██▒▓██▒▀█▀ ██▒" # "▓██ ▀█ ██▒▒██▒░░ █ ░ ▓██ █▒░▒██▒▓██ ▓██░" # "▓██▒ ▐▌██▒░██░ ░ █ █ ▒ ▒██ █░░░██░▒██ ▒██ " # "▒██░ ▓██░░██░▒██▒ ▒██▒ ▒▀█░ ░██░▒██▒ ░██▒" # "░ ▒░ ▒ ▒ ░▓ ▒▒ ░ ░▓ ░ ░ ▐░ ░▓ ░ ▒░ ░ ░" # "░ ░░ ░ ▒░ ▒ ░░░ ░▒ ░ ░ ░░ ▒ ░░ ░ ░" # " ░ ░ ░ ▒ ░ ░ ░ ░░ ▒ ░░ ░ " # " ░ ░ ░ ░ ░ ░ ░ " # " ░ " # ]; val = [ "TOHA HEAVY INDUSTRIES" ]; opts = { position = "center"; hl = "Keyword"; }; } { type = "padding"; val = 2; } { type = "group"; val = [ { type = "text"; val = " To browse files press 'ff'"; opts = { position = "center"; }; } ]; opts = { position = "center"; }; } { type = "padding"; val = 2; } { type = "text"; val = "uwu"; opts = { position = "center"; hl = "Keyword"; }; } { type = "padding"; val = 4; } #{ # type = "text"; # val = [ # "      /^>》, -―‐‐<^}" # "     ./:::/,≠´::::::ヽ." # "    /::::〃::::/}::丿ハ" # "   ./:::::i{l|/ ノ/ }::}" # "   /:::::::瓜イ> ´< ,:ノ" # "  ./::::::|ノヘ.{、 (_フ_ノノイ_" # "  |:::::::|/}`ス / /" # ". |::::::|(_:::つ/ ThinkPad / neovim!" # ". ̄ ̄ ̄ ̄ ̄ ̄ ̄\/_____/ ̄ ̄ ̄ ̄ ̄" # ]; # opts = { # position = "center"; # hl = "Type"; # }; #} ]; opts = { #noautocmd = true; keymap = { press = ""; press_queue = ""; }; }; }; bufferline.enable = true; }; keymaps = [ { mode = "n"; key = "ff"; options.silent = true; action = "Telescope file_browser"; } { mode = "n"; key = "hh"; options.silent = true; action = "Alpha"; } { mode = "n"; key = "bb"; options.silent = true; action = "Telescope buffers"; } { mode = "n"; key = "Gp"; action = "Git pull"; } { mode = "n"; key = "GP"; action = "Git push"; } { mode = "n"; key = "Gc"; action = "Git commit"; } { mode = "n"; key = "Ga"; action = "Git add ."; } { mode = "n"; key = "Gd"; action = "Git diff"; } { mode = "n"; key = "nt"; action = "Neotree toggle left"; } { mode = "n"; key = "P"; action = ''"+p''; } { mode = ["n" "v"]; key = "y"; action = ''[["+y]]''; } { mode = ["n"]; key = "Y"; action = ''[["+Y]]''; } ]; }; }