diff options
Diffstat (limited to 'modules/programs')
| -rw-r--r-- | modules/programs/anki.nix | 14 | ||||
| -rw-r--r-- | modules/programs/bash.nix | 30 | ||||
| -rw-r--r-- | modules/programs/firefox.nix | 140 | ||||
| -rw-r--r-- | modules/programs/git.nix | 48 | ||||
| -rw-r--r-- | modules/programs/jellyfin-mpv-shim.nix | 37 | ||||
| -rw-r--r-- | modules/programs/latex.nix | 33 | ||||
| -rw-r--r-- | modules/programs/mpv.nix | 48 | ||||
| -rw-r--r-- | modules/programs/neovim/default.nix | 48 | ||||
| -rw-r--r-- | modules/programs/neovim/init.lua | 238 | ||||
| -rw-r--r-- | modules/programs/nixcord.nix | 28 | ||||
| -rw-r--r-- | modules/programs/obsidian.nix | 9 | ||||
| -rw-r--r-- | modules/programs/opencode.nix | 14 | ||||
| -rw-r--r-- | modules/programs/spicetify.nix | 34 | ||||
| -rw-r--r-- | modules/programs/steam.nix | 15 | ||||
| -rw-r--r-- | modules/programs/vscode.nix | 63 | ||||
| -rw-r--r-- | modules/programs/zed.nix | 40 | ||||
| -rw-r--r-- | modules/programs/zsh.nix | 62 |
17 files changed, 901 insertions, 0 deletions
diff --git a/modules/programs/anki.nix b/modules/programs/anki.nix new file mode 100644 index 0000000..ca0cd0f --- /dev/null +++ b/modules/programs/anki.nix @@ -0,0 +1,14 @@ +{ + flake.modules.homeManager.anki = + { ... }: + { + programs.anki = { + enable = true; + #style = "native"; + #addons = with pkgs.ankiAddons; [ + # anki-connect + # review-heatmap + #]; + }; + }; +} diff --git a/modules/programs/bash.nix b/modules/programs/bash.nix new file mode 100644 index 0000000..6fd488d --- /dev/null +++ b/modules/programs/bash.nix @@ -0,0 +1,30 @@ +{ + flake.modules.homeManager.bash = + { + pkgs, + ... + }: + { + home.packages = with pkgs; [ + zoxide + ]; + + programs.bash = { + enable = true; + enableCompletion = true; + initExtra = '' + # view man pages with nvim + export MANPAGER="nvim +Man!" + + # vim keybindings + set -o vi + + # zoxide smarter cd command + eval "$(zoxide init bash)" + ''; + shellAliases = { + ls = "ls --color=auto"; + }; + }; + }; +} diff --git a/modules/programs/firefox.nix b/modules/programs/firefox.nix new file mode 100644 index 0000000..bf89c29 --- /dev/null +++ b/modules/programs/firefox.nix @@ -0,0 +1,140 @@ +{ + flake.modules.nixos.firefox = + { pkgs, ... }: + { + programs.firefox = { + enable = true; + package = pkgs.firefox; + }; + }; + + flake.modules.homeManager.firefox = + { + pkgs, + inputs, + ... + }: + { + programs.firefox = { + enable = true; + profiles.default = { + extensions = { + packages = with inputs.firefox-addons.packages.${pkgs.stdenv.hostPlatform.system}; [ + ublock-origin + istilldontcareaboutcookies + ]; + + force = true; + settings."uBlock0@raymondhill.net".settings = { + UserMessaging = { + cloudStorageEnabled = false; + contextMenuEnabled = false; + }; + # Block annoying login with google banner + userFilters = '' + ||accounts.google.com/gsi/* + ''; + }; + }; + + search = { + default = "DuckDuckGo"; + engines = { + nix-packages = { + name = "Nix Packages"; + urls = [ + { + template = "https://search.nixos.org/packages"; + params = [ + { + name = "type"; + value = "packages"; + } + { + name = "query"; + value = "{searchTerms}"; + } + ]; + } + ]; + + icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; + definedAliases = [ "@np" ]; + }; + + nixos-wiki = { + name = "NixOS Wiki"; + urls = [ { template = "https://wiki.nixos.org/w/index.php?search={searchTerms}"; } ]; + iconMapObj."16" = "https://wiki.nixos.org/favicon.ico"; + definedAliases = [ "@nw" ]; + }; + + bing.metaData.hidden = true; + google.metaData.alias = "@g"; + }; + force = true; + }; + + policies = { + DisableTelemetry = true; + DisableFirefoxStudies = true; + PasswordManagerEnabled = false; + OfferToSaveLogins = false; + DisplayBookmarksToolbar = "never"; + NoDefaultBookmarks = true; + + Homepage = { + URL = "about:blank"; + Locked = true; + StartPage = "homepage"; + }; + + NewTabPage = false; + + EnableTrackingProtection = { + Value = true; + Locked = true; + Cryptomining = true; + Fingerprinting = true; + }; + + EncryptedMediaExtensions = { + Enabled = true; + Locked = true; + }; + + FirefoxHome = { + Search = true; + TopSites = true; + SponsoredTopSites = false; + Highlights = true; + Locked = true; + }; + + UserMessaging = { + ExtensionRecommendations = false; + FeatureRecommendations = false; + Locked = true; + MoreFromMozilla = false; + SkipOnboarding = true; + UrlbarInterventions = false; + }; + + Preferences = { + # Disable fullscreen notification + "full-screen-api.warning.timeout" = "0"; + + # Disable annoying translation popup + "browser.translations.automaticallyPopup" = false; + + # Enable all extensions automatically + "extensions.autoDisableScopes" = 0; + + # Hide ctr-tab tab preview menu + "browser.ctrlTab.sortByRecentlyUsed" = false; + }; + }; + }; + }; + }; +} diff --git a/modules/programs/git.nix b/modules/programs/git.nix new file mode 100644 index 0000000..a8a2e88 --- /dev/null +++ b/modules/programs/git.nix @@ -0,0 +1,48 @@ +{ + flake.modules.nixos.git = + { pkgs, ... }: + { + programs.git = { + enable = true; + package = pkgs.git; + }; + }; + + flake.modules.homeManager.git = + { ... }: + { + programs.git = { + enable = true; + + signing = { + key = "A3502B180BC1D41A"; + signByDefault = true; + }; + + ignores = [ + "*~" + ".DS_Store" + ".direnv" + ".envrc" + ]; + + settings = { + user.name = "Leander Scherer"; + user.email = "leander@schererleander.de"; + help.autocorrect = 20; + alias = { + st = "status"; + co = "checkout"; + br = "branch"; + }; + pull.rebase = true; + gpg.format = "openpgp"; + url."git@github.com:".insteadOf = "https://github.com"; + }; + }; + programs.diff-highlight = { + enable = true; + enableGitIntegration = true; + }; + }; +} diff --git a/modules/programs/jellyfin-mpv-shim.nix b/modules/programs/jellyfin-mpv-shim.nix new file mode 100644 index 0000000..1844296 --- /dev/null +++ b/modules/programs/jellyfin-mpv-shim.nix @@ -0,0 +1,37 @@ +{ + flake.modules.homeManager.jellyfin-mpv-shim = + { + lib, + ... + }: + let + inherit (lib) optionalAttrs; + in + { + systemd.user.services.jellyfin-mpv-shim.Service.Environment = [ + "ENABLE_HDR_WSI=1" + ]; + + services.jellyfin-mpv-shim = { + enable = true; + settings = { + player_name = "mpv-shim"; + allow_transcode_to_h256 = true; + }; + mpvConfig = { + vo = "gpu-next"; + gpu-api = "vulkan"; + target-colorspace-hint = "yes"; + target-peak = 500; + } + // (optionalAttrs false { + target-trc = "pq"; + target-prim = "bt.2020"; + #target-peak = 406; + #tone-mapping = "spline"; + #tone-mapping-mode = "rgb"; + inverse-tone-mapping = "yes"; + }); + }; + }; +} diff --git a/modules/programs/latex.nix b/modules/programs/latex.nix new file mode 100644 index 0000000..24654c3 --- /dev/null +++ b/modules/programs/latex.nix @@ -0,0 +1,33 @@ +{ + flake.modules.homeManager.latex = + { + pkgs, + ... + }: + { + programs.texlive = { + enable = true; + # See https://mynixos.com/search?q=texlivepackages.collection for more collections + # and https://mynixos.com/search?q=texlivepackages for more individual packages. + extraPackages = tpkgs: { + inherit (tpkgs) + collection-basic + collection-latex + collection-latexrecommended + biblatex + ; + }; + }; + + home.packages = with pkgs; [ + biber + ]; + + programs.pandoc = { + enable = true; + defaults = { + pdf-engine = "pdfetex"; + }; + }; + }; +} diff --git a/modules/programs/mpv.nix b/modules/programs/mpv.nix new file mode 100644 index 0000000..8787bbd --- /dev/null +++ b/modules/programs/mpv.nix @@ -0,0 +1,48 @@ +{ + flake.modules.homeManager.mpv = + { ... }: + { + programs.mpv = { + enable = true; + config = { + vo = "gpu-next"; + gpu-api = "vulkan"; + target-peak = 500; + target-colorspace-hint = "yes"; + }; + profiles = { + # Dolby Vision profile + "DOVI" = { + profile-restore = "copy"; + profile-cond = "p[\"video-dec-params/gamma\"] == \"auto\""; + target-trc = "pq"; + target-prim = "bt.2020"; + target-peak = 500; + tone-mapping-mode = "auto"; + }; + + # SDR look while in HDR + "SDR" = { + profile-restore = "copy"; + target-trc = "pq"; + target-prim = "bt.2020"; + target-peak = 207; + tone-mapping = "bt.2390"; + tone-mapping-mode = "rgb"; + inverse-tone-mapping = "yes"; + }; + + # SDR to HDR inverse tone mapping + "SDR_HDR_EFFECT" = { + profile-restore = "copy"; + target-trc = "pq"; + target-prim = "bt.2020"; + target-peak = 406; + tone-mapping = "spline"; + tone-mapping-mode = "rgb"; + inverse-tone-mapping = "yes"; + }; + }; + }; + }; +} diff --git a/modules/programs/neovim/default.nix b/modules/programs/neovim/default.nix new file mode 100644 index 0000000..e61f01b --- /dev/null +++ b/modules/programs/neovim/default.nix @@ -0,0 +1,48 @@ +{ + flake.modules.homeManager.neovim = + { pkgs, ... }: + { + programs.neovim = { + defaultEditor = true; + enable = true; + package = pkgs.neovim-unwrapped; + extraPackages = with pkgs; [ + tree-sitter + git + ripgrep + fd + gcc + gopls + nil + nixfmt + lua-language-server + texlab + tinymist + ]; + + plugins = with pkgs.vimPlugins; [ + gruvbox-nvim + mini-starter + gitsigns-nvim + nvim-autopairs + telescope-nvim + fidget-nvim + plenary-nvim + nvim-treesitter.withAllGrammars + nvim-lspconfig + nvim-cmp + cmp-nvim-lsp + cmp-buffer + cmp-path + cmp-cmdline + luasnip + cmp_luasnip + lspkind-nvim + ]; + + extraConfig = '' + luafile ${./init.lua} + ''; + }; + }; +} diff --git a/modules/programs/neovim/init.lua b/modules/programs/neovim/init.lua new file mode 100644 index 0000000..2927d23 --- /dev/null +++ b/modules/programs/neovim/init.lua @@ -0,0 +1,238 @@ +-- General settings +vim.g.mapleader = " " +vim.o.number = true +vim.o.relativenumber = true +vim.o.signcolumn = "yes" +vim.o.termguicolors = true +vim.o.wrap = false +vim.o.tabstop = 2 +vim.o.shiftwidth = 2 +vim.o.updatetime = 250 +vim.o.timeoutlen = 300 +vim.o.swapfile = false +vim.o.ignorecase = true +vim.o.smartcase = true +vim.o.winborder = "rounded" +vim.o.clipboard = "unnamedplus" + +local map = vim.keymap.set +map('n', '<leader>o', '<CMD>update<BAR>source %<CR>', { desc = 'Save & reload init.lua' }) +map('n', '<leader>w', '<CMD>write<CR>') +map('n', '<leader>q', '<CMD>quit<CR>') + +require("mini.starter").setup({ + header = table.concat({ + " /l、 ", + "(゚、 。 7 ", + " l ~ ヽ ", + " じしf_,)ノ ", + }, "\n"), + footer = "", + content_hooks = { + require("mini.starter").gen_hook.adding_bullet("» "), + require("mini.starter").gen_hook.aligning("center", "center"), + }, +}) + +require("gitsigns").setup() +require("nvim-autopairs").setup() +require("fidget").setup() + +vim.cmd("colorscheme gruvbox") + +local hl = vim.api.nvim_set_hl +hl(0, 'Normal', { bg = 'none' }) +hl(0, 'NormalFloat', { bg = 'none' }) +hl(0, 'NormalNC', { bg = 'none' }) +hl(0, 'StatusLine', { bg = 'none' }) +hl(0, 'SignColumn', { bg = 'none' }) +hl(0, "DiagnosticError", { bg = "none" }) +hl(0, "DiagnosticSignError", { bg = "none" }) +hl(0, "DiagnosticSignHint", { bg = "none" }) +hl(0, "DiagnosticSignInfo", { bg = "none" }) +hl(0, "DiagnosticSignWarn", { bg = "none" }) + +hl(0, "Pmenu", { bg = "none" }) +hl(0, "PmenuSel", { bg = "none" }) +hl(0, "FloatBorder", { bg = "none" }) + +local status_ok, configs = pcall(require, "nvim-treesitter.configs") +if status_ok then + configs.setup({ + highlight = { enable = true }, + indent = { enable = true }, + }) +end + +local builtin = require('telescope.builtin') +local map = vim.keymap.set +map('n', '<leader>ff', builtin.find_files, { desc = 'Telescope find files' }) +map('n', '<leader>fg', builtin.live_grep, { desc = 'Telescope live grep' }) +map('n', '<leader>fb', builtin.buffers, { desc = 'Telescope buffers' }) +map('n', '<leader>fh', builtin.help_tags, { desc = 'Telescope help tags' }) + + +local cmp = require("cmp") +cmp.setup({ + snippet = { + expand = function(args) + require('luasnip').lsp_expand(args.body) + end, + }, + mapping = cmp.mapping.preset.insert({ + ['<C-b>'] = cmp.mapping.scroll_docs(-4), + ['<C-f>'] = cmp.mapping.scroll_docs(4), + ['<C-Space>'] = cmp.mapping.complete(), + ['<C-e>'] = cmp.mapping.abort(), + ['<CR>'] = cmp.mapping.confirm({ select = true }), + ['<Tab>'] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_next_item() + else + fallback() + end + end, { 'i', 's' }), + ['<S-Tab>'] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_prev_item() + else + fallback() + end + end, { 'i', 's' }), + }), + sources = cmp.config.sources({ + { name = 'nvim_lsp' }, + { name = 'luasnip' }, + }, { + { name = 'buffer' }, + }) +}) + +-- Add parentheses after selecting function or method +local cmp_autopairs = require('nvim-autopairs.completion.cmp') +cmp.event:on( + 'confirm_done', + cmp_autopairs.on_confirm_done() +) + +local capabilities = require('cmp_nvim_lsp').default_capabilities() + +vim.api.nvim_create_autocmd('LspAttach', { + group = vim.api.nvim_create_augroup('UserLspConfig', {}), + callback = function(ev) + local opts = { buffer = ev.buf, noremap = true, silent = true } + vim.keymap.set('n', '<leader>lf', function() vim.lsp.buf.format { async = true } end, opts) + end, +}) + +-- Format on save for all languages with LSP support +vim.api.nvim_create_autocmd('BufWritePre', { + group = vim.api.nvim_create_augroup('FormatOnSave', {}), + callback = function() + local clients = vim.lsp.get_clients({ bufnr = 0 }) + for _, client in ipairs(clients) do + if client.supports_method('textDocument/formatting') then + vim.lsp.buf.format({ async = false }) + return + end + end + end, +}) + +-- Native LSP setup (Neovim v0.11+) +vim.lsp.config('nixd', { + cmd = { 'nixd' }, + capabilities = capabilities, + settings = { + nixd = { + formatting = { + command = { "nixfmt" }, + }, + }, + }, +}) + +vim.lsp.config('nil_ls', { + cmd = { 'nil' }, + capabilities = capabilities, + settings = { + ['nil'] = { + nix = { + flake = { + autoArchive = true, + }, + }, + }, + }, +}) + +vim.lsp.config('lua_ls', { + cmd = { 'lua-language-server' }, + capabilities = capabilities, + settings = { + Lua = { + runtime = { + version = 'LuaJIT', + }, + diagnostics = { + globals = { 'vim', 'require' }, + }, + workspace = { + library = vim.api.nvim_get_runtime_file("", true), + }, + telemetry = { + enable = false, + }, + }, + }, +}) + +vim.lsp.config('pyright', { + cmd = { 'pyright-langserver', '--stdio' }, + capabilities = capabilities, +}) + +vim.lsp.config('tailwindcss', { + cmd = { 'tailwindcss-language-server', '--stdio' }, + capabilities = capabilities, +}) + +vim.lsp.config('gopls', { + cmd = { 'gopls' }, + capabilities = capabilities, + settings = { + gopls = { + analyses = { + unusedparams = true, + unusedwrite = true, + }, + staticcheck = true, + }, + }, +}) + +vim.lsp.config('rust_analyzer', { + cmd = { 'rust-analyzer' }, + capabilities = capabilities, +}) + +vim.lsp.config('ts_ls', { + cmd = { 'typescript-language-server', '--stdio' }, + capabilities = capabilities, +}) + +-- Enable all configured servers +vim.lsp.enable('nixd') +vim.lsp.enable('nil_ls') +vim.lsp.enable('lua_ls') +vim.lsp.enable('pyright') +vim.lsp.enable('tailwindcss') +vim.lsp.enable('gopls') +vim.lsp.enable('rust_analyzer') +vim.lsp.enable('ts_ls') + +vim.diagnostic.config({ + virtual_text = { source = "if_many" }, + underline = true, + severity_sort = true, +}) diff --git a/modules/programs/nixcord.nix b/modules/programs/nixcord.nix new file mode 100644 index 0000000..9d3360b --- /dev/null +++ b/modules/programs/nixcord.nix @@ -0,0 +1,28 @@ +{ + flake.modules.homeManager.nixcord = + { + inputs, + ... + }: + { + imports = [ + inputs.nixcord.homeModules.nixcord + ]; + + programs.nixcord = { + enable = true; + config = { + themeLinks = [ + "https://refact0r.github.io/system24/theme/system24.theme.css" + ]; + frameless = true; + plugins = { + alwaysAnimate.enable = false; + imageLink.enable = true; + imageZoom.enable = true; + translate.enable = true; + }; + }; + }; + }; +} diff --git a/modules/programs/obsidian.nix b/modules/programs/obsidian.nix new file mode 100644 index 0000000..873a51a --- /dev/null +++ b/modules/programs/obsidian.nix @@ -0,0 +1,9 @@ +{ + flake.modules.homeManager.obsidian = + { ... }: + { + programs.obsidian = { + enable = true; + }; + }; +} diff --git a/modules/programs/opencode.nix b/modules/programs/opencode.nix new file mode 100644 index 0000000..266562f --- /dev/null +++ b/modules/programs/opencode.nix @@ -0,0 +1,14 @@ +{ + flake.modules.homeManager.opencode = + { ... }: + { + programs.opencode = { + enable = true; + settings = { + theme = "system"; + share = "disabled"; + autoupdate = false; + }; + }; + }; +} diff --git a/modules/programs/spicetify.nix b/modules/programs/spicetify.nix new file mode 100644 index 0000000..4a7e003 --- /dev/null +++ b/modules/programs/spicetify.nix @@ -0,0 +1,34 @@ +{ + flake.modules.homeManager.spicetify = + { + pkgs, + inputs, + ... + }: + let + spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.stdenv.hostPlatform.system}; + in + { + imports = [ + inputs.spicetify-nix.homeManagerModules.spicetify + ]; + + programs.spicetify = { + enable = true; + enabledSnippets = with spicePkgs.snippets; [ + pointer + sonicDancing + modernScrollbar + nyanCatProgressBar + declutterNowPlayingBar + ]; + + enabledExtensions = with spicePkgs.extensions; [ + keyboardShortcut + ]; + + theme = spicePkgs.themes.sleek; + colorScheme = "Coral"; + }; + }; +} diff --git a/modules/programs/steam.nix b/modules/programs/steam.nix new file mode 100644 index 0000000..311a5b3 --- /dev/null +++ b/modules/programs/steam.nix @@ -0,0 +1,15 @@ +{ + flake.modules.nixos.steam = + { + pkgs, + ... + }: + { + programs.steam = { + enable = true; + protontricks.enable = true; + gamescopeSession.enable = true; + extraCompatPackages = [ pkgs.proton-ge-bin ]; + }; + }; +} diff --git a/modules/programs/vscode.nix b/modules/programs/vscode.nix new file mode 100644 index 0000000..c10fa6b --- /dev/null +++ b/modules/programs/vscode.nix @@ -0,0 +1,63 @@ +{ + flake.modules.homeManager.vscode = + { + config, + lib, + pkgs, + ... + }: + let + inherit (lib) optionals; + in + { + programs.vscode = { + enable = true; + package = pkgs.vscode; + mutableExtensionsDir = false; + profiles.default = { + enableUpdateCheck = true; + enableExtensionUpdateCheck = true; + + userSettings = { + "update.mode" = "none"; + "workbench.colorTheme" = "Minimal"; + "editor.fontFamily" = "monospace"; + "editor.tabSize" = 2; + "editor.minimap.enabled" = false; + "terminal.integrated.cursorStyle" = "underline"; + "terminal.integrated.cursorStyleInactive" = "underline"; + "terminal.integrated.fontFamily" = "monospace"; + "terminal.integrated.fontSize" = 13; + "git.autofetch" = true; + "window.controlsStyle" = "custom"; + }; + + extensions = + with pkgs.vscode-extensions; + [ + github.copilot + adpyke.codesnap + esbenp.prettier-vscode + ] + ++ (optionals false [ ms-vscode.cmake-tools ]) + ++ (optionals false [ ms-azuretools.vscode-docker ]) + ++ (optionals false [ ms-python.python ]) + ++ (optionals false [ golang.go ]) + ++ (optionals false [ rust-lang.rust-analyzer ]) + ++ (optionals false [ vscjava.vscode-maven ]) + ++ (optionals false [ sumneko.lua ]) + ++ (optionals false [ bradlc.vscode-tailwindcss ]) + ++ (optionals true ( + pkgs.vscode-utils.extensionsFromVscodeMarketplace [ + { + name = "minimalist-dark"; + publisher = "nichabosh"; + version = "1.0.0"; + sha256 = "sha256-lw+Scfada6DycLdRT2Cz+Fd12JucglIrw3uRd2ZhabQ="; + } + ] + )); + }; + }; + }; +} diff --git a/modules/programs/zed.nix b/modules/programs/zed.nix new file mode 100644 index 0000000..0bee73e --- /dev/null +++ b/modules/programs/zed.nix @@ -0,0 +1,40 @@ +{ + flake.modules.homeManager.zed = + { ... }: + { + programs.zed-editor = { + enable = true; + extensions = [ "nix" ]; + userSettings = { + telemetry = { + metrics = false; + }; + title_bar = { + show_onboarding_banner = false; + show_project_items = false; + show_branch_name = false; + show_user_menu = false; + }; + tab_bar.show = false; + toolbar.quick_actions = false; + status_bar."experimental.show" = false; + project_panel = { + dock = "right"; + default_width = 400; + hide_root = true; + auto_fold_dirs = false; + starts_open = false; + git_status = false; + sticky_scroll = false; + scrollbar.show = "never"; + indent_guides.show = "never"; + }; + outline_panel = { + default_width = 300; + indent_guides.show = "never"; + }; + file_finder.modal_max_width = "large"; + }; + }; + }; +} diff --git a/modules/programs/zsh.nix b/modules/programs/zsh.nix new file mode 100644 index 0000000..c36c462 --- /dev/null +++ b/modules/programs/zsh.nix @@ -0,0 +1,62 @@ +{ + flake.modules.homeManager.zsh = + { + pkgs, + ... + }: + { + home.packages = with pkgs; [ + zoxide + ]; + + programs.zsh = { + enable = true; + enableCompletion = true; + autosuggestion.enable = true; + syntaxHighlighting.enable = true; + initContent = '' + # view man pages with nvim + export MANPAGER="nvim +Man!" + + # Directory completion with trailing slash + zstyle ':completion:*' list-dirs-first true + zstyle ':completion:*' special-dirs true + zstyle ':completion:*' squeeze-slashes true + zstyle ':completion:*' add-space false + + # Case-insensitive completion + zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}' + # vim keybindings + bindkey -v + + # Auto cd - type directory name to cd into it + setopt AUTO_CD + + # Complete .. to ../ for directory navigation + setopt AUTO_PARAM_SLASH + + # zoxide smarter cmd command + eval "$(zoxide init zsh)" + ''; + shellAliases = { + ls = "ls --color=auto"; + }; + + zplug = { + enable = true; + plugins = [ + { name = "mafredri/zsh-async"; } + { + name = "sindresorhus/pure"; + tags = [ + "as:theme" + "use:pure.zsh" + ]; + } + { name = "zdharma-continuum/fast-syntax-highlighting"; } + { name = "zsh-users/zsh-autosuggestions"; } + ]; + }; + }; + }; +} |
