{ pkgs, lib, config, inputs, outputs, ... }: { programs.nixvim = { enable = true; globals.mapleader = " "; extraConfigLua = builtins.readFile ../config-files/nvim/init.lua; opts = { colorcolumn = "80"; }; extraPlugins = with pkgs.vimPlugins; [ aerial-nvim ]; clipboard.providers.wl-copy.enable = true; opts = { number = true; # Show line numbers relativenumber = true; # Show relative line numbers shiftwidth = 2; # Tab width should be 2 }; # colorschemes.catppuccin.enable = true; colorschemes.base16 = { enable = true; colorscheme = "apathy"; settings = { telescope_borders = true; }; }; plugins = { neorg = { enable = true; modules = { "core.defaults" = { __empty = null; }; "core.dirman" = { config = { workspaces = { home = "~/notes/"; }; }; }; "core.concealer" = { __empty = null; }; "core.export" = { __empty = null; }; "core.export.markdown" = { __empty = null; }; }; }; gitblame.enable = true; lspkind.enable = true; persistence = { enable = true; }; navic = { enable = true; settings = { highlight = true; lsp = { auto_attach = true; }; }; }; trouble = { enable = true; }; wakatime.enable = true; headlines.enable = true; twilight.enable = true; comment = { enable = true; }; indent-blankline.enable = true; lualine = { enable = true; settings = { disabled_filetypes.statusline = ["neo-tree"]; component_separators = { left = ""; right = ""; }; section_separators = { left = ""; right = ""; }; sections = { lualine_y = [ { __unkeyed-1 = "aerial"; colored = true; cond = { __raw = '' function() local buf_size_limit = 1024 * 1024 if vim.api.nvim_buf_get_offset(0, vim.api.nvim_buf_line_count(0)) > buf_size_limit then return false end return true end ''; }; dense = false; dense_sep = "."; depth = { __raw = "nil"; }; sep = " ∋ "; } ]; }; winbar = { lualine_c = [ { __unkeyed-1 = "aerial"; colored = true; cond = { __raw = '' function() local buf_size_limit = 1024 * 1024 if vim.api.nvim_buf_get_offset(0, vim.api.nvim_buf_line_count(0)) > buf_size_limit then return false end return true end ''; }; dense = false; dense_sep = "."; depth = { __raw = "nil"; }; sep = " ∋ "; } ]; # lualine_x = [ # { # __unkeyed-1 = "filename"; # newfile_status = true; # path = 3; # shorting_target = 150; # } # ]; }; }; }; lsp-format = {enable = true;}; copilot-lua = { enable = true; suggestion = { enabled = false; }; panel.enabled = false; }; copilot-cmp.enable = true; copilot-chat = { enable = true; settings.context = "buffers"; }; neocord.enable = false; rustaceanvim = { enable = false; settings = { # dap.autoloadConfigurations = true; # dap.adapter = let # code-lldb = pkgs.vscode-extensions.vadimcn.vscode-lldb; # in { # executable.command = "${code-lldb}/share/vscode/extensions/vadimcn.vscode-lldb/adapter/codelldb"; # executable.args = [ # "--liblldb" # "${code-lldb}/share/vscode/extensions/vadimcn.vscode-lldb/lldb/lib/liblldb.dylib" # "--port" # "31337" # ]; # type = "server"; # port = "31337"; # host = "127.0.0.1"; # }; server.settings = { inlayHints = { closureStyle = "rust_analyzer"; }; typing.autoClosingAngleBrackets.enable = true; }; }; }; # rustaceanvim.settings.server.default_settings.rust-analyzer.diagnostics.disabled = ["inactive-code"]; lsp = { enable = true; inlayHints = true; servers = { # disabled due to compile error # typst-lsp.enable = true; protols = { enable = true; package = pkgs.protols; }; typos_lsp.enable = false; docker_compose_language_service.enable = true; pylsp.enable = true; bashls.enable = true; lua_ls.enable = true; gopls.enable = true; nushell.enable = true; clangd = { enable = true; filetypes = ["c" "cpp" "objc" "objcpp" "cpp"]; }; svelte.enable = true; ts_ls.enable = true; java_language_server.enable = true; hls.enable = true; hls.installGhc = false; eslint.enable = true; rust_analyzer = { enable = true; installCargo = false; installRustc = false; settings = { inlayHints = { closureStyle = "rust_analyzer"; }; typing.autoClosingAngleBrackets.enable = true; }; }; nixd.enable = true; }; }; dap = { enable = true; extensions = { dap-virtual-text.enable = true; dap-ui.enable = true; }; }; gitsigns.enable = true; fugitive.enable = true; nix-develop.enable = true; treesitter = { enable = true; folding = true; nixvimInjections = true; settings = { ensure_installed = "all"; # highlight.enable = true; highlight.enable = true; indent.enable = 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";} {name = "copilot";} ]; #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; web-devicons.enable = true; # required by telescope 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; layout = [ { type = "padding"; val = 4; } { type = "text"; # val = [ # " ▒██ ██▒ █████ ▄▄▄█████▓ ▄████▄ " # " ▒▒ █ █ ▒░▒██▓ ██▒▓ ██▒ ▓▒▒██▀ ▀█ " # " ░░ █ ░▒██▒ ██░▒ ▓██░ ▒░▒▓█ ▄ " # " ░ █ █ ▒ ░██ █▀ ░░ ▓██▓ ░ ▒▓▓▄ ▄██▒ " # " ▒██▒ ▒██▒░▒███▒█▄ ▒██▒ ░ ▒ ▓███▀ ░ " # " ▒▒ ░ ░▓ ░░░ ▒▒░ ▒ ▒ ░░ ░ ░▒ ▒ ░ " # " ░░ ░▒ ░ ░ ▒░ ░ ░ ░ ▒ " # " ░ ░ ░ ░ ░ ░ " # " ░ ░ ░ ░ ░ " # " ░ " # ]; val = [ "⠀⠀⠀⠀⠀⠀⠀⠙⣿⣷⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ " "⠀⠀⠀⠀⠀⠀⠀⠀⢺⣿⣿⡆⠀⠀⠀⠀⠀⠀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀" "⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⡇⠀⠀⠀⠀⠀⠀⣾⢡⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢢⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀" "⠀⠀⠀⠀⠀⠀⠀⠀⠈⣿⣿⣷⡦⠀⠀⠀⠀⢰⣿⣿⣷⠀⠀⠀⠀⠀⠀⠀⠀⠃⣠⣾⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀" "⠀⠀⠀⠀⠀⠀⠀⠀⠀⢻⣿⣿⣿⣆⠀⠀⠀⣾⣿⣿⣿⣷⠄⠀⠰⠤⣀⠀⠀⣴⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀" "⠀⠀⠀⠀⠀⠀⠀⠀⠃⢺⣿⣿⣿⣿⡄⠀⠀⣿⣿⢿⣿⣿⣦⣦⣦⣶⣼⣭⣼⣿⣿⣿⠇⠀⠀⠀⠀⠀⠀⠀⠀⠀" "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢿⣿⣿⣿⣷⡆⠂⣿⣿⣞⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀" "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢙⣿⣿⣿⣿⣷⠸⣿⣿⣿⣿⣿⣿⠟⠻⣿⣿⣿⣿⡿⣿⣿⣷⠀⠀⠀⠀⠀⠀⠀⠀⠀" "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠄⢿⣿⣿⣿⣿⡄⣿⣿⣿⣿⣿⣿⡀⢀⣿⣿⣿⣿⠀⢸⣿⣿⠅⠀⠀⠀⠀⠀⠀⠀⠀" "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣿⣿⣿⣿⣇⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠁⠀⠀⠀⠀⠀⠀⠀⠀" "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠠⢐⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀" "⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣤⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠟⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀" "⠀⠀⠀⠀⠀⠀⠀⢀⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀" "⠀⠀⠀⠀⠀⡀⣠⣾⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡔⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀" "⠀⠀⠀⠀⠀⢁⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀" "⠀⠀⠀⠀⠠⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣄⠀⠀⠀⠀⠀⠀⠀⠀" "⠀⠀⠀⠀⣀⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄⠀⠀⠀⠀⠀⠀⠀" "⠀⠀⠀⠀⣻⣿⣿⣿⣿⣿⡟⠋⠙⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠙⢿⣿⣿⣿⣿⣿⣿⣄⠀⠀⠀⠀⠀⠀" "⠀⠀⠀⣿⣿⣿⣿⣿⡿⠋⠀⠀⠀⢿⣿⣿⣿⣿⣿⣿⠿⢿⡿⠛⠋⠁⠀⠀⠈⠻⣿⣿⣿⣿⣿⣿⣅⠀⠀⠀⠀⠀" "⠀⠀⠀⣿⣿⣿⣿⡟⠃⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢻⣿⣿⣿⣿⣿⣤⡀⠀⠀⠀" "⠀⠜⢠⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⢿⣿⣿⣿⣿⣿⣗⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢻⣿⣿⣿⣿⣿⣦⠄⣠⠀" "⠠⢸⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⢀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⣿⣿⣿⣿⣿⣿⣿" "⠀⠛⣿⣿⣿⡿⠏⠀⠀⠀⠀⠀⠀⢳⣾⣿⣿⣿⣿⣿⣿⡶⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿" "⠀⢨⠀⠉⠉⠀⠀⠀⠀⠀⠀⠀⠀⠙⣿⣿⡿⡿⠿⠛⠙⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⠏⠉⠻⠿⠟⠁" "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ " ]; #val = [ # " ███████████████ ██████████████████" # " ███████████████ ██ " # " ███████████████ ██████████████████" # " ███████████████ ██ ██" # " ███████████████ ██████████████████" # " ███████████████ █ ██ █ " # " ███████████████ █ ██ █ " # " ███████████████ █ ██ █ " # " ███████████████ " # " ███████████████ ██████████████████" # " ███████████████ ██ ██ " # " ██████████████████████████ ██████████████████" # " ██████████████████████████ ██ ██" # " ██████████████████████████ ██████████████████" # " ██████████████████████████ ██ ██ " # " ██████████████████████████ ██████████████████" # " ██████████████████████████ " # " ██████████████████████████ ▀▀▀▀▀▀▀▀██▀▀▀▀▀▀▀▀" # " ██████████████████████████ ▀▀▀▀▀▀▀▀██▀▀▀▀▀▀▀▀" # " ██████████████████████████ ██████████████████" # " ███████████████▀▀▀▀▀▀▀▀▀▀▀ ██ ██" # " ███████████████ ██████████████████" # " ███████████████ ▄▄▄▄▄▄▄▄██▄▄▄▄▄▄▄▄" # " ████████████████ ▄▄▄▄▄▄▄▄██▄▄▄▄▄▄▄▄" # " █████████████████ " # " ██████████████████ ██████████████████" # " ███████████████████ ██ " # " ████████████████████ ██ " # " █████████████████████ ██ " # " ██████████████████████ ██ " # " ███████████████████████ ██ " # " ████████████████████████ ██████████████████" #]; opts = { position = "center"; hl = "Type"; }; } { type = "text"; # val = [ # " ███▄ █ ██▓▒██ ██▒ ██▒ █▓ ██▓ ███▄ ▄███▓" # " ██ ▀█ █ ▓██▒▒▒ █ █ ▒░▓██░ █▒▓██▒▓██▒▀█▀ ██▒" # "▓██ ▀█ ██▒▒██▒░░ █ ░ ▓██ █▒░▒██▒▓██ ▓██░" # "▓██▒ ▐▌██▒░██░ ░ █ █ ▒ ▒██ █░░░██░▒██ ▒██ " # "▒██░ ▓██░░██░▒██▒ ▒██▒ ▒▀█░ ░██░▒██▒ ░██▒" # "░ ▒░ ▒ ▒ ░▓ ▒▒ ░ ░▓ ░ ░ ▐░ ░▓ ░ ▒░ ░ ░" # "░ ░░ ░ ▒░ ▒ ░░░ ░▒ ░ ░ ░░ ▒ ░░ ░ ░" # " ░ ░ ░ ▒ ░ ░ ░ ░░ ▒ ░░ ░ " # " ░ ░ ░ ░ ░ ░ ░ " # " ░ " # ]; #val = [ # "TOHA HEAVY INDUSTRIES" #]; val = [ "git@git.sr.ht:xqtc" ]; opts = { position = "center"; hl = "Keyword"; }; } { type = "padding"; val = 8; } { 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 find_files theme=ivy"; } { mode = "n"; key = "fe"; options.silent = true; action = "Telescope file_browser theme=ivy"; } { mode = "n"; key = "fss"; options.silent = true; action = "Telescope live_grep theme=ivy"; } { mode = "n"; key = "fsw"; options.silent = true; action = "Telescope lsp_dynamic_workspace_symbols theme=ivy"; } { mode = "n"; key = "fd"; options.silent = true; action = "Telescope diagnostics theme=ivy"; } { mode = "n"; key = "hh"; options.silent = true; action = "Alpha"; } { mode = "n"; key = "bb"; options.silent = true; action = "Telescope buffers theme=ivy"; } { 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''; } { mode = ["n"]; key = "sr"; action = '' function() vim.lsp.buf.rename() end ''; lua = true; } { mode = ["n"]; key = "qs"; action = '' function() require("persistence").load() end ''; lua = true; options.desc = "Load the session for the current directory"; } { mode = ["n"]; key = "qS"; action = '' function() require("persistence").select() end ''; lua = true; options.desc = "Select a session to load"; } { mode = ["n"]; key = "ql"; action = '' function() require("persistence").load({ last = true }) end ''; lua = true; options.desc = "Load the last session"; } { mode = ["n"]; key = "qd"; action = '' function() require("persistence").stop() end ''; lua = true; options.desc = "Stop persistence"; } ]; }; }