5G7WRBMWKG6DMCOHE6WQHTYZACUHO2UPBZRWN72CFH7P45NN5E7QC {programs.zoxide = {enable = true;enableBashIntegration = true;enableNushellIntegration = true;};}
def toggle-theme [theme?: string] {let nvim_source_file = $"($env.HOME)/nixos-config/dotfiles/nvim/lua/set_colorscheme.lua"let dark_mode_file = $"($env.HOME)/.config/dark-mode"# determine current theme from source filelet current_theme = try {let content = open $nvim_source_fileif ($content | str contains "local current_theme = dark_theme") {"dark"} else {"light"}} catch {"light"}# use provided theme or toggle currentlet new_theme = if $theme != null {if $theme in ["light", "dark"] {$theme} else {print $"Invalid theme: ($theme). Use 'light' or 'dark'"return}} else {if $current_theme == "light" { "dark" } else { "light" }}# skip if already the desired themeif $current_theme == $new_theme {print $"Already in ($current_theme) mode"return}print $"Switching from ($current_theme) to ($new_theme) theme..."# update neovim source file in dotfilestry {let content = open $nvim_source_filelet updated = $content | str replace --regex 'local current_theme = \w+_theme' $'local current_theme = ($new_theme)_theme'$updated | save $nvim_source_file --forceprint $"updated nvim source to ($new_theme)_theme"# rebuild nixos config to apply nvim themeprint "Rebuilding nixos config to apply nvim theme... (this may take a moment)"rebuild} catch { |e|print $"failed to update nvim theme: ($e.msg)"return}# update system dark mode markerif $new_theme == "dark" {touch $dark_mode_file$env.THEME_MODE = "dark"print "dark mode activated"} else {if ($dark_mode_file | path exists) {rm $dark_mode_file}$env.THEME_MODE = "light"print "light mode activated"}print "Theme switch completed!"}# check current themedef current-theme [] {let nvim_source_file = $"($env.HOME)/nixos-config/dotfiles/nvim/lua/set_colorscheme.lua"try {let content = open $nvim_source_fileif ($content | str contains "local current_theme = dark_theme") {"dark"} else {"light"}} catch {"light"}}
{programs.starship = {enable = true;enableBashIntegration = true;enableNushellIntegration = true;settings = {format = " $username$hostname$directory$git_branch$git_state$git_status$cmd_duration$line_break$character";username = {disabled = false;show_always = true;format = "[$user]($style) ";style_user = "#2d2d2d";};hostname = {ssh_symbol = "s";style = "#1f5f99";format = "[\\[$hostname\\]]($style) ";};directory = {format = "[$path]($style) ";style = "#7c3aed";use_os_path_sep = false;read_only = "RO";};character = {success_symbol = "[❯](#059669)";error_symbol = "[❯](#dc2626)";};git_branch = {format = "[@$branch]($style)";style = "#374151";};git_status = {format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](#b45309) ($ahead_behind$stashed)]($style)";style = "#1e40af";conflicted = "";untracked = "";modified = "";staged = "";renamed = "";deleted = "";stashed = "≡";};git_state = {format = "\\([$state( $progress_current/$progress_total)]($style)\\) ";style = "#6b7280";};cmd_duration = {format = "[$duration]($style) ";style = "#dc2626";};};};}
{ pkgs, config, ... }:letaliases = import ./aliases.nix;alias_string = builtins.concatStringsSep "\n" (builtins.map (name: "alias " + name + " = " + aliases.common.${name}) (builtins.attrNames aliases.common));nushell_alias_string = builtins.concatStringsSep "\n" (builtins.map (name: "alias " + name + " = " + aliases.nushellSpecific.${name}) (builtins.attrNames aliases.nushellSpecific));in{programs.nushell = {enable = true;configFile.text = alias_string + "\n" + nushell_alias_string + "\n" +(builtins.readFile ./config.nu) + "\n" +(builtins.readFile ./menus.nu) + "\n" +(builtins.readFile ./functions.nu) + "\n" +(builtins.readFile ./theme.nu);envFile.text = ''$env.CARAPACE_BRIDGES = "zsh,fish,bash,inshellisense,clap"'';};}
# menus$env.config.menus = [{name: completion_menuonly_buffer_difference: falsemarker: "| "type: {layout: columnarcolumns: 4col_width: 20col_padding: 2}style: {text: greenselected_text: green_reversedescription_text: yellow}}{name: history_menuonly_buffer_difference: truemarker: "? "type: {layout: listpage_size: 10}style: {text: greenselected_text: green_reversedescription_text: yellow}}{name: help_menuonly_buffer_difference: truemarker: "? "type: {layout: descriptioncolumns: 4col_width: 20col_padding: 2selection_rows: 4description_rows: 10}style: {text: greenselected_text: green_reversedescription_text: yellow}}{name: commands_menuonly_buffer_difference: falsemarker: "# "type: {layout: columnarcolumns: 4col_width: 20col_padding: 2}style: {text: greenselected_text: green_reversedescription_text: yellow}source: { |buffer, position|$nu.scope.commands| where name =~ $buffer| each { |it| {value: $it.name description: $it.usage} }}}{name: vars_menuonly_buffer_difference: truemarker: "# "type: {layout: listpage_size: 10}style: {text: greenselected_text: green_reversedescription_text: yellow}source: { |buffer, position|$nu.scope.vars| where name =~ $buffer| sort-by name| each { |it| {value: $it.name description: $it.type} }}}{name: commands_with_descriptiononly_buffer_difference: truemarker: "# "type: {layout: descriptioncolumns: 4col_width: 20col_padding: 2selection_rows: 4description_rows: 10}style: {text: greenselected_text: green_reversedescription_text: yellow}source: { |buffer, position|$nu.scope.commands| where name =~ $buffer| each { |it| {value: $it.name description: $it.usage} }}}]
def "cargo search" [query: string, --limit=10] {^cargo search $query --limit $limit| lines| each {|line| if ($line | str contains "#") {$line | parse --regex '(?P<name>.+) = "(?P<version>.+)" +# (?P<description>.+)'} else {$line | parse --regex '(?P<name>.+) = "(?P<version>.+)"'}}| flatten}def "cargo update-all" [--force] {cargo install --list| parse "{package} v{version}:"| get package| each {|p|if $force {cargo install --locked --force $p} else {cargo install --locked $p}}}def pwd [] {$env.PWD | str replace $nu.home-path '~'}def gitsummary [--count (-n): int = 999999] {try {git log $"--pretty=%h»¦«%aN»¦«%s»¦«%aD" $"-($count)"| lines| split column "»¦«" sha1 committer desc merged_at| histogram committer merger| sort-by merger| reverse} catch {print "Error: Make sure you're in a git repository"}}def mega-update [--force (-f), --yes (-y)] {# confirmation checkif $force and not $yes and not (input "Force update all packages? (y/n): " | str starts-with "y") {return}let results = try {print "Starting cargo updates..."if $force {do -i { cargo update-all --force }} else {do -i { cargo update-all }}print "cargo completed"[{ manager: "cargo", status: "success" }]} catch { |e|print $"cargo failed: ($e.msg)"[{ manager: "cargo", status: "failed", error: $e.msg }]}print "All updates finished"$results}
# path configuration handled by nixos$env.config.buffer_editor = "nvim"$env.config.show_banner = false$env.config.ls = {use_ls_colors: trueclickable_links: true}$env.config.rm = {always_trash: false}$env.config.table = {mode: compactindex_mode: alwaysshow_empty: truetrim: {methodology: wrappingwrapping_try_keep_words: truetruncating_suffix: "..."}}$env.config.explore = {help_banner: trueexit_esc: truecommand_bar_text: '#C4C9C6'status_bar_background: {}highlight: {bg: 'yellow' fg: 'black' }status: {}try: {}table: {split_line: '#404040'cursor: trueline_index: trueline_shift: trueline_head_top: trueline_head_bottom: trueshow_head: trueshow_index: true}config: {cursor_color: {bg: 'yellow' fg: 'black'}}}$env.config.history = {max_size: 10000sync_on_enter: true}$env.config.filesize = {}$env.config.cursor_shape = {emacs: blockvi_insert: blockvi_normal: block}$env.config.float_precision = 2$env.config.use_ansi_coloring = true$env.config.show_banner = false# hooks$env.config.hooks.display_output = {||if (term size).columns >= 100 { table -e } else { table }}$env.config.hooks.pre_prompt = [{ ||if (which direnv | is-empty) {return}direnv export json | from json | default {} | load-env$env.PATH = ($env.PATH | split row (char env_sep))}]# menus$env.config.menus = [{name: completion_menuonly_buffer_difference: falsemarker: "| "type: {layout: columnarcolumns: 4col_width: 20col_padding: 2}style: {text: greenselected_text: green_reversedescription_text: yellow}}{name: history_menuonly_buffer_difference: truemarker: "? "type: {layout: listpage_size: 10}style: {text: greenselected_text: green_reversedescription_text: yellow}}{name: help_menuonly_buffer_difference: truemarker: "? "type: {layout: descriptioncolumns: 4col_width: 20col_padding: 2selection_rows: 4description_rows: 10}style: {text: greenselected_text: green_reversedescription_text: yellow}}{name: commands_menuonly_buffer_difference: falsemarker: "# "type: {layout: columnarcolumns: 4col_width: 20col_padding: 2}style: {text: greenselected_text: green_reversedescription_text: yellow}source: { |buffer, position|$nu.scope.commands| where name =~ $buffer| each { |it| {value: $it.name description: $it.usage} }}}{name: vars_menuonly_buffer_difference: truemarker: "# "type: {layout: listpage_size: 10}style: {text: greenselected_text: green_reversedescription_text: yellow}source: { |buffer, position|$nu.scope.vars| where name =~ $buffer| sort-by name| each { |it| {value: $it.name description: $it.type} }}}{name: commands_with_descriptiononly_buffer_difference: truemarker: "# "type: {layout: descriptioncolumns: 4col_width: 20col_padding: 2selection_rows: 4description_rows: 10}style: {text: greenselected_text: green_reversedescription_text: yellow}source: { |buffer, position|$nu.scope.commands| where name =~ $buffer| each { |it| {value: $it.name description: $it.usage} }}}]# utilsdef "cargo search" [query: string, --limit=10] {^cargo search $query --limit $limit| lines| each {|line| if ($line | str contains "#") {$line | parse --regex '(?P<name>.+) = "(?P<version>.+)" +# (?P<description>.+)'} else {$line | parse --regex '(?P<name>.+) = "(?P<version>.+)"'}}| flatten}def "cargo update-all" [--force] {cargo install --list| parse "{package} v{version}:"| get package| each {|p|if $force {cargo install --locked --force $p} else {cargo install --locked $p}}}def pwd [] {$env.PWD | str replace $nu.home-path '~'}def gitsummary [--count (-n): int = 999999] {try {git log $"--pretty=%h»¦«%aN»¦«%s»¦«%aD" $"-($count)"| lines| split column "»¦«" sha1 committer desc merged_at| histogram committer merger| sort-by merger| reverse} catch {print "Error: Make sure you're in a git repository"}}def mega-update [--force (-f), --yes (-y)] {# confirmation checkif $force and not $yes and not (input "Force update all packages? (y/n): " | str starts-with "y") {return}let par_results = ["cargo", "scoop"] | par-each { |manager|try {print $"Starting ($manager)..."if $manager == "cargo" {if $force {do -i { cargo update-all --force }} else {do -i { cargo update-all }}} else if $manager == "scoop" {if $force {do -i { scoop update --all --force }} else {do -i { scoop update --all }}}print $"✓ ($manager) completed"{ manager: $manager, status: "success" }} catch { |e|print $"✗ ($manager) failed: ($e.msg)"{ manager: $manager, status: "failed", error: $e.msg }}}# winget alone for inputlet winget_result = try {print "Starting winget..."if $force {do -i { winget upgrade --all --interactive --force }} else {do -i { winget upgrade --all --interactive }}print "✓ winget completed"{ manager: "winget", status: "success" }} catch { |e|print $"✗ winget failed: ($e.msg)"{ manager: "winget", status: "failed", error: $e.msg }}let all_results = $par_results | append $winget_resultprint "All updates finished"$all_results}
{programs.direnv = {enable = true;enableBashIntegration = true;enableNushellIntegration = true;};}
{imports = [./nushell.nix./bash.nix./direnv.nix./zoxide.nix./carapace.nix./starship.nix];}
# nixos handles PATH through configuration$env.config.buffer_editor = "nvim"$env.config.show_banner = false$env.config.ls = {use_ls_colors: trueclickable_links: true}$env.config.rm = {always_trash: false}$env.config.table = {mode: compact # basic, compact, compact_double, light, thin, with_love, rounded, reinforced, heavy, none, otherindex_mode: always # "always" show indexes, "never" show indexes, "auto" = show indexes when a table has "index" columnshow_empty: true # show 'empty list' and 'empty record' placeholders for command outputtrim: {methodology: wrappingwrapping_try_keep_words: truetruncating_suffix: "..."}}$env.config.explore = {help_banner: trueexit_esc: truecommand_bar_text: '#C4C9C6'status_bar_background: {}highlight: {bg: 'yellow' fg: 'black' }status: {}try: {}table: {split_line: '#404040'cursor: trueline_index: trueline_shift: trueline_head_top: trueline_head_bottom: trueshow_head: trueshow_index: true}config: {cursor_color: {bg: 'yellow' fg: 'black'}}}$env.config.history = {max_size: 10000sync_on_enter: true}$env.config.filesize = {}$env.config.cursor_shape = {emacs: blockvi_insert: blockvi_normal: block}$env.config.float_precision = 2$env.config.use_ansi_coloring = true$env.config.show_banner = false# hooks$env.config.hooks.display_output = {||if (term size).columns >= 100 { table -e } else { table }}$env.config.hooks.pre_prompt = [{ ||if (which direnv | is-empty) {return}direnv export json | from json | default {} | load-env$env.PATH = ($env.PATH | split row (char env_sep))}]
{programs.carapace = {enable = true;enableBashIntegration = true;enableNushellIntegration = true;enableZshIntegration = true;};}
{programs.bash = {enable = true;enableCompletion = true;shellAliases = builtins.getAttr "common" (import ./aliases.nix);initExtra = ''# fzf key bindingsif command -v fzf >/dev/null 2>&1; thenbind -m emacs-standard '"\C-f": " \C-b\C-k \C-u`__fzf_cd__`\e\C-e\er\C-m\C-y\C-h\e \C-y\ey\C-x\C-x\C-d"'bind -m emacs-standard -x '"\C-g": fzf-file-widget --height ~40%'fi# bash completion directory loadingif [ -d ~/.bash_completion.d/ ]; thenfor i in ~/.bash_completion.d/*.sh; doif [ -r $i ]; then. $ifidoneunset ifi'';};}
{common = {# file operationscat = "bat";ls = "eza";ll = "eza -la";la = "eza -a";lsa = "eza -a";lsl = "eza -l -a";# navigation".." = "cd ..";"...." = "cd ../..";"......" = "cd ../../..";# editorsv = "vim";vi = "vim";nv = "nvim";# toolsm = "moon";mp = "mprocs";ko = "kondo";g = "git";# systemrebuild = "sudo nixos-rebuild switch --flake /home/james/nixos-config#nixos";# themett = "toggle-theme";};nushellSpecific = {cdr = "cd (git rev-parse --show-toplevel | str trim)";cdn = "cd ~/nixos-config/dotfiles/nvim";cdc = "cd ~/nixos-config";cdp = "cd ~/projects";cdu = "cd ~/nixos-config/home/modules/shell";};}
{ lib, ... }:letisDark = builtins.getEnv "DARK_MODE" == "1";in{programs.zellij = {enable = true;settings = {theme = if isDark then "gruvbox-dark" else "gruvbox-light";default_shell = "nu";pane_frames = false;simplified_ui = true;default_layout = "compact";session_serialization = false;attach_to_session = true;show_startup_tips = false;};};}
{programs.neovim = {enable = true;defaultEditor = true;viAlias = true;vimAlias = true;};}
{ pkgs, ... }:{programs.gpg.enable = true;services.gpg-agent = {enable = true;pinentry.package = pkgs.pinentry-curses;};}
{programs.git = {enable = true;userName = "James Plummer";userEmail = "jamesp2001@live.co.uk";signing = {key = "58805BF7676222B4";signByDefault = true;};lfs.enable = true;extraConfig = {init.defaultBranch = "master";status = {branch = true;showStash = true;showUntrackedFiles = "all";};pull.rebase = true;push.autoSetupRemote = true;rebase = {autoStash = true;missingCommitsCheck = "warn";};branch.sort = "-committerdate";tag.sort = "-taggerdate";core = {compression = 9;preloadindex = true;editor = "nvim";longpaths = true;pager = "delta";excludesfile = "~/.global_gitignore";};interactive.diffFilter = "delta --color-only";delta = {navigate = true;dark = true;};merge.conflictStyle = "zdiff3";credential = {helper = "manager";helperselector.selected = "manager";};"url \"http://github.com/\"".insteadOf = "gh:";};aliases = {diff-stat = "diff --stat --ignore-space-change -r";cm = "commit -m";aa = "add .";ap = "add -p";lg = "log --all --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit";st = "status";sw = "switch";oneln = "log --oneline";sus = "!f() { git branch --set-upstream-to $1; }; f";};};}
{imports = [./git.nix./gpg.nix./zellij.nix./neovim.nix];}
{ pkgs, ... }:{home.packages = with pkgs; [# file navigation & searchezafdripgrepfzftree# benchmarkinghyperfine# file operationsbatvimbashnushell# network toolscurlwget# system monitoringhtop];}
{ pkgs, fenix, ... }:{home.packages = [fenix.packages.${pkgs.system}.complete.toolchainpkgs.cargo-binstall];home.file."install-cargo-extras.sh" = {text = ''#!/usr/bin/env bash# script to install additional cargo packages not available in nixpkgsecho "Installing additional cargo packages with cargo-binstall..."cargo binstall -y \cargo-machete \bacon-ls \dioxus-cli \sleek \cargo-workspaces \cargo-fuzz \cargo-carefulecho "Additional cargo packages installed"'';executable = true;};}
{ pkgs, ... }:{home.packages = with pkgs; [# language serverslua-language-servernodePackages.typescript-language-serversvelte-language-servertailwindcss-language-servernodePackages."@astrojs/language-server"styluanodePackages.prettierprettierdnixfmt-rfc-stylenodejspython3gccgnumakeclaude-code# gemini-clinix-indexcommabaconcargo-nextestcargo-denyjjkondomprocssqlx-cli];}
{ config, fenix, ... }:{home.sessionVariables = {EDITOR = "nvim";BROWSER = "wslview";};}
{xdg.configFile = {"nvim" = {source = ../../dotfiles/nvim;recursive = true;};};}
{ pkgs, ... }:{home.sessionVariables = {EDITOR = "nvim";SHELL = "${pkgs.nushell}/bin/nu";BROWSER = "wslview"; # use wslview for WSLTERMINAL = "zellij";};home.sessionPath = ["$HOME/.local/bin""$HOME/.cargo/bin"];}
{pkgs,fenix,system,...}:{imports = [./modules/common.nix./modules/packages/development.nix./modules/packages/system.nix./modules/packages/rust.nix./modules/programs./modules/shell./modules/dotfiles.nix];_module.args = {inheritpkgssystemfenix;};home.stateVersion = "24.11";programs.home-manager.enable = true;}
{description = "NixOS WSL Configuration";inputs = {nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";nixos-wsl.url = "github:nix-community/NixOS-WSL/main";nixos-wsl.inputs.nixpkgs.follows = "nixpkgs";home-manager.url = "github:nix-community/home-manager/master";home-manager.inputs.nixpkgs.follows = "nixpkgs";fenix.url = "github:nix-community/fenix";fenix.inputs.nixpkgs.follows = "nixpkgs";};outputs ={self,nixpkgs,nixos-wsl,home-manager,fenix,...}:letsystem = "x86_64-linux";pkgs = import nixpkgs { inherit system; };in{nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {inherit system;modules = [nixos-wsl.nixosModules.wsl./configuration.nixhome-manager.nixosModules.home-manager({ pkgs, ... }: {home-manager.useGlobalPkgs = true;home-manager.useUserPackages = true;home-manager.users.james = import ./home/default.nix {inheritpkgssystemfenix;};})];};};}
{"nodes": {"fenix": {"inputs": {"nixpkgs": ["nixpkgs"],"rust-analyzer-src": "rust-analyzer-src"},"locked": {"lastModified": 1753771482,"narHash": "sha256-7WnYHGi5xT4PCacjM/UVp+k4ZYIIXwCf6CjVqgUnGTQ=","owner": "nix-community","repo": "fenix","rev": "8b6da138fb7baefa04a4284c63b2abefdfbd2c6d","type": "github"},"original": {"owner": "nix-community","repo": "fenix","type": "github"}},"flake-compat": {"flake": false,"locked": {"lastModified": 1747046372,"narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=","owner": "edolstra","repo": "flake-compat","rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885","type": "github"},"original": {"owner": "edolstra","repo": "flake-compat","type": "github"}},"home-manager": {"inputs": {"nixpkgs": ["nixpkgs"]},"locked": {"lastModified": 1753761827,"narHash": "sha256-mrVNT+aF4yR8P8Fx570W2vz+LzukSlf68Yr2YhUJHjo=","owner": "nix-community","repo": "home-manager","rev": "50adf8fcaa97c9d64309f2d507ed8be54ea23110","type": "github"},"original": {"owner": "nix-community","ref": "master","repo": "home-manager","type": "github"}},"nixos-wsl": {"inputs": {"flake-compat": "flake-compat","nixpkgs": ["nixpkgs"]},"locked": {"lastModified": 1753704990,"narHash": "sha256-5E14xuNWy2Un1nFR55k68hgbnD8U2x/rE5DXJtYKusw=","owner": "nix-community","repo": "NixOS-WSL","rev": "58c814cc6d4a789191f9c12e18277107144b0c91","type": "github"},"original": {"owner": "nix-community","ref": "main","repo": "NixOS-WSL","type": "github"}},"nixpkgs": {"locked": {"lastModified": 1753694789,"narHash": "sha256-cKgvtz6fKuK1Xr5LQW/zOUiAC0oSQoA9nOISB0pJZqM=","owner": "NixOS","repo": "nixpkgs","rev": "dc9637876d0dcc8c9e5e22986b857632effeb727","type": "github"},"original": {"owner": "NixOS","ref": "nixos-unstable","repo": "nixpkgs","type": "github"}},"root": {"inputs": {"fenix": "fenix","home-manager": "home-manager","nixos-wsl": "nixos-wsl","nixpkgs": "nixpkgs"}},"rust-analyzer-src": {"flake": false,"locked": {"lastModified": 1753724566,"narHash": "sha256-DolKhpXhoehwLX+K/4xRRIeppnJHgKk6xWJdqn/vM6w=","owner": "rust-lang","repo": "rust-analyzer","rev": "511c999bea1c3c129b8eba713bb9b809a9003d00","type": "github"},"original": {"owner": "rust-lang","ref": "nightly","repo": "rust-analyzer","type": "github"}}},"root": "root","version": 7}
return {-- "zenbones-theme/zenbones.nvim",-- lazy = false,-- priority = 1000,-- init = function()-- vim.g.bones_compat = 1-- vim.g.zenbones_transparent_background = 0-- vim.g.zenbones_solid_line_nr = 1-- vim.g.zenbones_italic_comments = 0-- vim.g.zenbones_lighten_line_nr = 10000000000-- vim.g.zenbones_solid_float_border = true-- vim.g.colorize_diagnostic_underline_text = true-- end,-- config = function()-- ColorMyPencils("rosebones")-- DisableItalic()---- -- Custom highlight overrides-- local highlights = {-- DiagnosticUnderlineHint = "gui=underline",-- DiagnosticUnderlineInfo = "gui=underline",-- DiagnosticUnderlineWarn = "gui=underline",-- DiagnosticUnderlineError = "gui=underline",-- ["@markup.link"] = "gui=none",-- }---- for group, opts in pairs(highlights) do-- CMD("hi " .. group .. " " .. opts)-- end-- end,}
return {-- "bettervim/yugen.nvim",-- config = function()-- ColorMyPencils("yugen")---- -- Custom highlight overrides-- local highlights = {-- ColorColumn = { bg = "#303030" },-- StatusLine = { bg = "#151515", fg = "#FAFAFA" },-- StatusLineNC = { bg = "#151515", fg = "#FAFAFA" },-- StatusLineTerm = { link = "StatusLine" },-- StatusLineTermNC = { link = "StatusLineNC" },-- }---- for group, opts in pairs(highlights) do-- SET_HL(0, group, opts)-- end-- end,}
return {-- "folke/tokyonight.nvim",-- name = "tokyonight",-- priority = 1000,-- opts = {-- dim_inactive = true,-- transparent = true,-- terminal_colors = true,-- styles = {-- sidebars = "dark",-- floats = "dark",-- },-- },-- config = function()-- -- CMD("colorscheme tokyonight")-- -- CMD("colorscheme tokyonight-night")-- -- CMD("colorscheme tokyonight-storm")-- end,}
return {-- "nikolvs/vim-sunbather",-- config = function()-- ColorMyPencils("sunbather")-- DisableItalic()-- end,}
return {-- "samharju/serene.nvim",-- lazy = false,-- priority = 1000,-- config = function()-- ColorMyPencils("serene-transparent")-- DisableItalic()-- end,}
return {"haystackandroid/rusticated",priority = 1000,}
return {-- "rose-pine/neovim",-- priority = 1000,-- name = "rose-pine",-- opts = {-- disable_background = true,-- dim_inactive_windows = true,-- styles = { italic = false, transparency = true },-- },-- config = function()-- ColorMyPencils("rose-pine-moon")-- end,}
return {"kvrohit/rasmus.nvim",priority = 1000,}
return {-- "navarasu/onedark.nvim",-- priority = 1000,-- opts = {-- transparent = true,-- lualine = {-- transparent = true,-- },-- ending_tildes = true,-- term_colors = true,-- },-- config = function()-- -- CMD("colorscheme onedark")-- end,}
return {-- "jesseleite/nvim-noirbuddy",-- dependencies = { { "tjdevries/colorbuddy.nvim" } },-- lazy = false,-- priority = 1000,-- opts = {-- preset = "minimal",-- colors = {-- -- primary = "#D5A6A8",-- -- secondary = "#FADADD"-- },-- styles = {-- italic = false,-- bold = true,-- underline = true,-- undercurl = false,-- },-- },-- config = function()-- ColorMyPencils("noirbuddy")-- DisableItalic()-- end,}
return {-- "bluz71/vim-moonfly-colors",-- name = "moonfly",-- lazy = false,-- priority = 1000,-- init = function()-- vim.g.moonflyWinSeparator = 0-- vim.g.moonflyItalics = false-- vim.g.moonflyUndercurls = false-- end,-- config = function()-- ColorMyPencils("moonfly")-- end,}
return {-- "kdheepak/monochrome.nvim",-- priority = 1000,-- lazy = false,-- config = function()-- ColorMyPencils("monochrome")-- DisableItalic()-- end,}
return {-- "dasupradyumna/midnight.nvim",-- lazy = false,-- priority = 1000,-- config = function()-- ColorMyPencils("midnight")-- DisableItalic()-- end,}
return {-- "slugbyte/lackluster.nvim",-- lazy = false,-- priority = 1000,-- opts = {-- disable_plugin = {-- todo_comments = true,-- },-- tweak_ui = {-- disable_undercurl = true,-- enable_end_of_buffer = true,-- },-- tweak_background = {-- normal = "none",-- telescope = "none",-- menu = "none",-- popup = "none",-- },-- tweak_highlight = {-- ["@function"] = {-- bold = true,-- },-- ["@keyword"] = {-- bold = true,-- },-- },-- tweak_syntax = {-- comment = require("lackluster").color.gray5,-- },-- },-- config = function()-- ColorMyPencils("lackluster-mint")-- DisableItalic()-- end,}
return {-- "jamesukiyo/jimbo.vim",-- lazy = false,-- priority = 1000,-- init = function()-- vim.g.jimbo_transparent = 1-- vim.g.jimbo_bold = 0-- vim.g.jimbo_italic = 0-- end,-- config = function()-- CMD("colorscheme jimbo")-- end,}
return {-- "ellisonleao/gruvbox.nvim",-- priority = 1000,-- opts = {-- terminal_colors = true,-- dim_inactive = true,-- transparent = true,-- },-- config = function()-- ColorMyPencils("gruvbox")-- end,}
return {-- -- blazkowolf is a bit more colourful-- -- "blazkowolf/gruber-darker.nvim",-- "thimc/gruber-darker.nvim",-- lazy = false,-- priority = 1000,-- opts = {-- transparent = true,-- -- Alternative setup options:-- -- bold = true,-- -- italic = {-- -- comments = false,-- -- strings = false,-- -- folds = false,-- -- operators = false,-- -- },-- -- invert = {-- -- visual = false,-- -- },-- -- undercurl = true,-- -- underline = true,-- },-- config = function()-- local function disable_gruber_undercurl()-- local hl_groups = {-- "GruberDarkerRedUnderline",-- "GruberDarkerGreenUnderline",-- "GruberDarkerYellowUnderline",-- "GruberDarkerQuartzUnderline",-- "GruberDarkerNiagaraUnderline",-- "GruberDarkerWisteriaUnderline",-- }-- for _, hl in ipairs(hl_groups) do-- CMD.highlight(hl .. " gui=underline cterm=underline")-- end-- end---- ColorMyPencils("gruber-darker")-- disable_gruber_undercurl()-- DisableItalic()-- end,}
return {-- "yorickpeterse/nvim-grey",-- priority = 1000,}
return {-- "aliqyan-21/darkvoid.nvim",-- lazy = false,-- priority = 1000,-- opts = {-- transparent = true,-- glow = false,-- show_end_of_buffer = true,-- colors = {-- plugins = {-- lualine = false,-- },-- },-- },-- config = function()-- ColorMyPencils("darkvoid")-- DisableItalic()-- end,}
return {-- "catppuccin/nvim",-- name = "catppuccin",-- priority = 1000,-- opts = {-- flavour = "mocha", -- latte, frappe, macchiato, mocha-- background = { dark = "mocha" },-- transparent = true,-- term_colors = true,-- dim_inactive = {-- enabled = true,-- shade = "dark",-- percentage = 0.5,-- },-- show_end_of_buffer = true,-- integrations = {-- telescope = { enabled = true },-- mini = { enabled = true, indentscope_color = "lavender" },-- mason = true,-- harpoon = true,-- cmp = true,-- treesitter = true,-- which_key = true,-- gitsigns = true,-- },-- custom_highlights = function(colors)-- return {-- LineNr = { fg = colors.overlay1 },-- }-- end,-- },-- config = function()-- ColorMyPencils("catppuccin")-- end,}
return {-- "andreasvc/vim-256noir",-- priority = 1000,-- lazy = false,-- config = function()-- ColorMyPencils("256_noir")---- -- Custom highlight overrides for 256 noir theme-- local highlights = {-- "hi Normal cterm=NONE ctermfg=250 ctermbg=NONE gui=NONE guifg=#bcbcbc guibg=NONE",-- "hi Keyword cterm=NONE ctermfg=255 ctermbg=NONE gui=NONE guifg=#eeeeee guibg=NONE",-- "hi Constant cterm=NONE ctermfg=252 ctermbg=NONE gui=NONE guifg=#d0d0d0 guibg=NONE",-- "hi String cterm=NONE ctermfg=245 ctermbg=NONE gui=NONE guifg=#8a8a8a guibg=NONE",-- "hi Comment cterm=NONE ctermfg=240 ctermbg=NONE gui=NONE guifg=#585858 guibg=NONE",-- "hi Number cterm=NONE ctermfg=196 ctermbg=NONE gui=NONE guifg=#ff0000 guibg=NONE",-- "hi SignColumn cterm=NONE ctermfg=124 ctermbg=NONE gui=NONE guifg=#af0000 guibg=NONE",-- "hi SpellRare cterm=NONE ctermfg=124 ctermbg=NONE gui=NONE guifg=#af0000 guibg=NONE",-- "hi StatusLine cterm=bold ctermfg=245 ctermbg=233 gui=bold guifg=#8a8a8a guibg=#121212",-- "hi StatusLineNC cterm=NONE ctermfg=236 ctermbg=233 gui=NONE guifg=#303030 guibg=#121212",-- "hi Visual cterm=NONE ctermfg=250 ctermbg=236 gui=NONE guifg=#bcbcbc guibg=#303030",-- "hi Normal cterm=NONE ctermfg=Gray ctermbg=NONE",-- "hi Keyword cterm=NONE ctermfg=White ctermbg=NONE",-- "hi Constant cterm=NONE ctermfg=Gray ctermbg=NONE",-- "hi String cterm=NONE ctermfg=Gray ctermbg=NONE",-- "hi Comment cterm=NONE ctermfg=DarkGray ctermbg=NONE",-- "hi Number cterm=NONE ctermfg=Red ctermbg=NONE",-- "hi SignColumn cterm=NONE ctermfg=Red ctermbg=NONE",-- "hi SpellRare cterm=NONE ctermfg=Red ctermbg=NONE",-- "hi StatusLine cterm=bold ctermfg=Gray ctermbg=Black",-- "hi StatusLineNC cterm=NONE ctermfg=DarkGray ctermbg=Black",-- "hi Visual cterm=NONE ctermfg=Gray ctermbg=DarkGray",-- }---- for _, hl in ipairs(highlights) do-- CMD(hl)-- end---- ColorMyPencils("256_noir")-- DisableItalic()-- DisableBold()-- end,}
{"script": {"prefix": "script","body": ["<script lang=\"ts\">"," $1","</script>"],"description": "opening script tags"},"sveltebp": {"prefix": "sveltebp","body": ["<script lang=\"ts\">"," $1","</script>","","<div>"," ","</div>"],"description": "script + divs"}}
{"clog": {"prefix": "clog","scope": "javascript,typescript","body": ["console.log('$1');","$2"],"description": "Log output to console"}}
{"tag": {"prefix": "tag","body": ["<${1}>"," $0","</${1}>"],"description": "HTML tag"}}
{"name": "james-snippets","contributes": {"snippets": [{"language": ["all"],"path": "./snippets/all.json"},{"language": ["javascript","typescript"],"path": "./snippets/javascript.json"},{"language": ["svelte"],"path": "./snippets/svelte.json"}]}}
local light_theme = "rusticated"local dark_theme = "rasmus"local current_theme = dark_themelocal bg = current_theme == dark_theme and "dark" or "light"ColorMyPencils(current_theme, bg, true)DisableBold()DisableItalic()DisableUndercurl()
local o = vim.oo.fileformat = "unix"o.fileformats = "unix,dos"o.autochdir = falseo.termguicolors = trueo.mouse = ""o.tabstop = 8o.softtabstop = 8o.shiftwidth = 8o.expandtab = falseo.pumheight = 8o.ignorecase = trueo.smartcase = trueo.smartindent = trueo.smoothscroll = trueo.scrolloff = 8o.sidescrolloff = 10o.signcolumn = "no"o.wrap = falseo.splitright = trueo.splitbelow = trueo.number = trueo.relativenumber = trueo.incsearch = trueo.hlsearch = trueo.showmode = falseo.showtabline = 0o.colorcolumn = "80"o.cursorline = trueo.completeopt = "menuone,noselect"-- Shell configuration handled by systemo.updatetime = 50o.guicursor = ""o.undofile = trueo.swapfile = falseo.backup = falseo.writebackup = falseo.fillchars = "eob:~,fold: ,foldopen:,foldsep: ,foldclose:,vert:▏,lastline:▏"o.conceallevel = 0o.foldcolumn = "0"o.foldenable = falseo.foldlevel = 99o.foldlevelstart = 99o.foldmethod = "indent"--o.foldexpr = 'nvim_treesitter#foldexpr()'--o.foldexpr = 'v:lua.vim.lsp.foldexpr()'
vim.g.mapleader = " "-- thanks primeagenMAP("x", "<leader>p", [["_dP]], { desc = "paste over text but keep clipboard" })MAP({ "n", "v" }, "<leader>y", [["+y]], { desc = "yank selection to system clipboard" })MAP("n", "<leader>Y", [["+Y]], { desc = "yank line to system clipboard" })MAP({ "n", "v" }, "<leader>d", '"_d', { desc = "delete without yank" })MAP("n", "J", "mzJ`z", { desc = "better line joins" })MAP("n","<leader>sr",[[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]],{ desc = "instant search and replace current word" })MAP("v", "J", ":m '>+1<CR>gv=gv", { desc = "move line down" })MAP("v", "K", ":m '<-2<CR>gv=gv", { desc = "move line up" })-- Center cursor on various movementsMAP("n", "<C-d>", "<C-d>zz", { desc = "1/2 page down + center cursor" })MAP("n", "<C-u>", "<C-u>zz", { desc = "1/2 page up + center cursor" })MAP("n", "n", "nzz", { desc = "center cursor on next search result" })MAP("n", "N", "Nzz", { desc = "center cursor on previous search result" })-- Start/end of line movementsMAP("n", "H", "^", { desc = "move to first non-blank character of line" })MAP("n", "L", "$", { desc = "move to last character of line" })-- Switch panesMAP("n", "<C-h>", "<C-w>h", { desc = "switch to left pane" })MAP("n", "<C-j>", "<C-w>j", { desc = "switch to below pane" })MAP("n", "<C-k>", "<C-w>k", { desc = "switch to above pane" })MAP("n", "<C-l>", "<C-w>l", { desc = "switch to right pane" })-- Visual mode mappingsMAP("v", "<C-d>", "<C-d>zz", { desc = "1/2 page down + center cursor" })MAP("v", "<C-u>", "<C-u>zz", { desc = "1/2 page up + center cursor" })MAP("v", "n", "nzz", { desc = "center cursor on next search result" })MAP("v", "N", "Nzz", { desc = "center cursor on previous search result" })-- switch buffers-- MAP('n', '<leader>h', ":bprevious<CR>", { desc = "previous buffer" })-- MAP('n', '<leader>l', ":bnext<CR>", { desc = "next buffer" })-- not needed now that I use conform-- MAP('n', '<leader>gg', "gg=G``", {desc = "Indent entire file and return to last edit position"})MAP("n","<leader>tt","<cmd>:vs<cr><cmd>term<cr>",{ desc = "open a terminal in a vertical split" })MAP("n", "<leader>qq", "<cmd>clo<cr>", { desc = "close window" })MAP("n","<leader><esc><esc>","<cmd>silent nohl<cr>",{ desc = "disable search highlight" })
return {"folke/zen-mode.nvim",cmd = "ZenMode",opts = {on_open = function()vim.wo.colorcolumn = "0"end,window = {width = 80,height = 1,},plugins = {options = {enabled = true,showcmd = true,ruler = false,laststatus = 0,},twilight = { enabled = true },gitsigns = { enabled = false },},},}
return {"natecraddock/workspaces.nvim",cmd = "Telescope workspaces",keys = {{"<leader>fp",":Telescope workspaces<CR>",desc = "open project list",},},opts = {auto_open = true,},config = function()require("telescope").load_extension("workspaces")end,}
return {"vimwiki/vimwiki",keys = { "<leader>ww", "<leader>wi" },init = function()vim.g.vimwiki_option_diary_path = "./diary/"vim.g.vimwiki_global_ext = 0vim.g.vimwiki_option_nested_syntaxes = { svelte = "svelte", typescript = "ts" }vim.g.vimwiki_list = {{path = "~/vimwiki/james/",name = "james",syntax = "markdown",ext = "md",},{path = "~/vimwiki/healgorithms/",name = "healgorithms",syntax = "markdown",ext = "md",auto_toc = 1,},}end,}
return {"ThePrimeagen/vim-be-good",cmd = "VimBeGood",}
return {-- "Xiione/vim-apm",-- config = function()-- require("apm"):setup({})-- end,---- keys = {-- {-- "<leader>apm",-- function()-- require("apm"):toggle_monitor()-- end,-- },-- },}
return {"mbbill/undotree",event = "BufRead",keys = {{"<leader>u","<cmd>UndotreeToggle<CR>",desc = "Toggle undotree",},},}
return {"nvzone/typr",dependencies = "nvzone/volt",opts = {config = {on_attach = function()vim.bo.wrap = falsevim.bo.completion = falseend,},},cmd = { "Typr", "TyprStats" },}
return {"folke/twilight.nvim",cmd = "Twilight",opts = {dimming = {alpha = 0.4,},},}
return {"JoosepAlviste/nvim-ts-context-commentstring",event = "BufRead",}
return {"windwp/nvim-ts-autotag",event = "InsertEnter",opts = {opts = {enable_close_on_slash = true,},},}
return {"folke/trouble.nvim",event = "LspAttach",keys = {{"<leader>tr","<cmd>Trouble diagnostics toggle focus=true filter.buf=0<cr>",desc = "Trouble diagonostics current file",},{"<leader>te","<cmd>Trouble diagnostics toggle focus=true<cr>",desc = "Trouble diagonostics all files",},{"<leader>tq","<cmd>Trouble qflist toggle<cr>",desc = "Trouble quickfix list",},},opts = {auto_close = true,modes = {diagnostics = { -- Configure symbols modewin = {size = 0.3, -- 30% of the window})-- },--preview = {-- type = "float",-- relative = "win",-- title = "Preview",-- border = "single",--size = { width = 0.25, height = 0.4 },-- zindex = 200,--},},},},},}
return {"nvim-treesitter/nvim-treesitter",build = ":TSUpdate",event = "BufRead",main = "nvim-treesitter.configs",opts = {ensure_installed = {"javascript","typescript","svelte","markdown","css","html","lua","vim","json","yaml","vimdoc","go","http","rust",},highlight = { enable = true },auto_install = true,indent = { enable = true },},}
return {"nvim-treesitter/nvim-treesitter-textobjects",event = "BufRead",}
return {"nvim-treesitter/nvim-treesitter-context",event = "BufRead",opts = {max_lines = 3,separator = "-",},config = function()SET_HL(0, "TreesitterContextLineNumberBottom", {fg = "#FFFFFF",})SET_HL(0, "TreesitterContextSeparator", {fg = "#363636",})end,}
return {"folke/todo-comments.nvim",event = "BufRead",-- cmd = "TodoTelescope",keys = {{"<leader>td","<cmd>TodoTelescope<CR>",desc = "todo list in telescope",},},opts = {signs = false,highlight = {before = "",keyword = "wide",after = "",},},}
return {"rachartier/tiny-inline-diagnostic.nvim",event = "BufReadPost",opts = {preset = "minimal",transparent_bg = true,transparent_cursorline = false,signs = {arrow = "",up_arrow = "",},options = {show_source = { enabled = true },multilines = { enabled = true, always_show = true },throttle = 100,},},}
return {"nvim-telescope/telescope.nvim",keys = {{"<leader>fc",function()require("telescope.builtin").resume()end,desc = "resume last picker",},{"<leader>ff",function()require("telescope.builtin").find_files()end,desc = "fuzzy files",},{"<leader>fg",function()require("telescope.builtin").live_grep()end,desc = "fuzzy live grep",},{"<leader>ft",function()require("telescope.builtin").treesitter()end,desc = "treesitter picker",},{"<leader>fr",function()require("telescope.builtin").registers()end,desc = "registers picker",},{"<leader>fw",function()local builtin = require("telescope.builtin")local word = vim.fn.expand("<cword>")builtin.grep_string({ search = word })end,desc = "search word",},{"<leader>fW",function()local builtin = require("telescope.builtin")local word = vim.fn.expand("<cWORD>")builtin.grep_string({ search = word })end,desc = "search WORD",},{"<leader>fs",function()local builtin = require("telescope.builtin")builtin.grep_string({ search = vim.fn.input("Grep > ") })end,desc = "search word from input",},},cmd = { "Telescope" },dependencies = { "nvim-lua/plenary.nvim" },opts = {defaults = {layout_config = {prompt_position = "top",preview_width = 0.6,},path_display = { truncate = 4 },sorting_strategy = "ascending",dynamic_preview_title = true,},extensions = {workspaces = {},},},}
return {"supermaven-inc/supermaven-nvim",event = "InsertEnter",opts = {},}
return {"leath-dub/snipe.nvim",keys = {{"<leader>fb",function()require("snipe").open_buffer_menu()end,desc = "Open buffer menu",},},opts = {ui = {position = "topleft",open_win_override = {title = "",border = "single",},},},}
return {"jamesukiyo/search-this.nvim",name = "search-this",cmd = { "SearchThis", "SearchThisNormal" },keys = "<leader>st",opts = {default_engine = "ddg",},}
return {"Aasim-A/scrollEOF.nvim",event = { "WinScrolled" },opts = {},}
return {"NStefan002/screenkey.nvim",cmd = { "Screenkey" },branch = "main",opts = {win_opts = {title = "",width = 25,height = 1,border = "single",},clear_after = 5,group_mappings = true,filter = function(keys)return keysend,keys = {["<TAB>"] = "",["<CR>"] = "",["<ESC>"] = "Esc",["<SPACE>"] = "␣",["<BS>"] = "",["<DEL>"] = "Del",["<LEFT>"] = "",["<RIGHT>"] = "",["<UP>"] = "",["<DOWN>"] = "",["<HOME>"] = "Home",["<END>"] = "End",["<PAGEUP>"] = "PgUp",["<PAGEDOWN>"] = "PgDn",["<INSERT>"] = "Ins",["<F1>"] = "",["<F2>"] = "",["<F3>"] = "",["<F4>"] = "",["<F5>"] = "",["<F6>"] = "",["<F7>"] = "",["<F8>"] = "",["<F9>"] = "",["<F10>"] = "",["<F11>"] = "",["<F12>"] = "",["CTRL"] = "Ctrl",["ALT"] = "Alt",["SUPER"] = "",["<leader>"] = "<leader>",},},config = function()CMD("Screenkey")end,}
return {"b0o/schemastore.nvim",event = "BufRead *.{json,yaml,yml,toml}",}
return {-- "mrcjkb/rustaceanvim",-- version = "^6",-- lazy = false,-- init = function()-- vim.g.rustaceanvim = {-- tools = {-- test_executor = "background",-- },-- server = {-- default_settings = {-- ["rust-analyzer"] = {-- -- checkOnSave and diagnostics must be disabled for bacon-ls-- checkOnSave = {-- command = "clippy",-- enable = true,-- },-- diagnostics = {-- enable = true,-- experimental = {-- enable = true,-- },-- styleLints = {-- enable = true,-- },-- },-- hover = {-- actions = {-- references = {-- enable = true,-- },-- },-- },-- interpret = {-- tests = true,-- },-- cargo = {-- features = "all",-- },-- completion = {-- fullFunctionSignatures = {-- enable = true,-- },-- },-- },-- },-- },-- dap = {},-- }-- end,}
return {"MeanderingProgrammer/render-markdown.nvim",ft = "markdown",opts = { completions = { blink = { enabled = true } } },}
return {"jamesukiyo/quicksnip.vim",cmd = { "SnipCurrent", "SnipPick" },keys = { { "<leader>sp", ":SnipPick<CR>" }, { "<leader>sc", ":SnipCurrent<CR>" } },init = function()vim.g.miniSnip_dirs = { "~/.vim/snippets" }vim.g.miniSnip_trigger = "<C-c>"vim.g.miniSnip_complkey = ""vim.g.miniSnip_extends = {html = { "svelte" },svelte = { "typescript", "html" },javascript = { "typescript" },typescript = { "javascript" },}end,}
return {"epwalsh/pomo.nvim",version = "*",lazy = true,cmd = { "TimerStart", "TimerRepeat", "TimerSession" },opts = {update_interval = 500,sessions = {pomodoro = {{ name = "Work", duration = "25m" },{ name = "Break", duration = "5m" },{ name = "Work", duration = "25m" },{ name = "Break", duration = "5m" },{ name = "Work", duration = "25m" },{ name = "Break", duration = "15m" },},},notifiers = {{name = "Default",opts = {sticky = false,},},-- {-- name = "System", -- Doesn't work on Windows yet-- },},},}
return {"topaxi/pipeline.nvim",cmd = "Pipeline",opts = {split = { size = 80 },},}
return {"vuki656/package-info.nvim",event = "BufRead package.json",opts = {autostart = true,hide_unstable_versions = true,notifications = false,icons = {enable = true,style = {up_to_date = " ",outdated = " ",invalid = " ",},},},config = function()-- only working way to set the colors https://github.com/vuki656/package-info.nvim/issues/155#issuecomment-2270572104SET_HL(0, "PackageInfoUpToDateVersion", { fg = "#3c4048" })SET_HL(0, "PackageInfoOutdatedVersion", { fg = "#d19a66" })SET_HL(0, "PackageInfoInvalidVersion", { fg = "#ee4b2b" })CMD("lua require('package-info').show({ force = true })")end,}
return {"Equilibris/nx.nvim",keys = {{ "<leader>nx", ":Telescope nx actions<CR>", desc = "view nx actions" },},opts = {nx_cmd_root = "bunx nx",},}
return {"shortcuts/no-neck-pain.nvim",lazy = false,priority = 1001,opts = {width = 110,autocmds = {enableOnVimEnter = true,skipEnteringNoNeckPainBuffer = true,},buffers = {wo = {fillchars = "eob: ",},},},}
return {"NeogitOrg/neogit",dependencies = { "sindrets/diffview.nvim" },cmd = "Neogit",keys = {{"<leader>g",":Neogit<CR>",desc = "open neogit",},},opts = {integrations = {telescope = true,diffview = true,},commit_editor = {staged_diff_split_kind = "vsplit",},commit_select_view = { kind = "vsplit" },},}
return {"Jorenar/miniSnip",event = "InsertEnter",}
return {"echasnovski/mini.surround",event = "BufRead",opts = {},}
return {"echasnovski/mini.diff",event = "BufRead",opts = {view = {style = "number",},mappings = {apply = "",reset = "",textobject = "",goto_first = "",goto_prev = "",goto_next = "",goto_last = "",},},}
return {"echasnovski/mini.bufremove",event = "BufRead",opts = {},keys = {{"<leader>qb",function()CMD("lua MiniBufremove.delete()")end,desc = "close buffer",},},}
return {"echasnovski/mini.ai",event = "BufRead",opts = {},}
local function file_info()local fe = vim.o.fileencodinglocal ff = vim.o.fileformatif fe == "" or ff == "" thenreturn ""elseif fe ~= "utf-8" and ff ~= "unix" thenreturn fe .. " :: " .. ff .. " :: "elseif fe ~= "utf-8" and ff == "unix" thenreturn fe .. " :: "elseif fe == "utf-8" and ff ~= "unix" thenreturn ff .. " :: "elsereturn ""endendlocal function lualine_custom_no_icons()local fe = vim.o.fileencodinglocal ff = vim.o.fileformatlocal ft = vim.o.filetypeif fe == "" or ff == "" or ft == "" thenreturn ""elseif fe ~= "utf-8" and ff ~= "unix" thenreturn fe .. " :: " .. ff .. " :: " .. ftelseif fe ~= "utf-8" and ff == "unix" thenreturn fe .. " :: " .. ftelseif fe == "utf-8" and ff ~= "unix" thenreturn ff .. " :: " .. ftelsereturn ftendendlocal function pomo_timer()local ok, pomo = pcall(require, "pomo")if not ok then return "" endlocal timer = pomo.get_first_to_finish()if timer == nil then return "" endreturn " " .. tostring(timer)endlocal filename = { "filename", show_filename_only = false, path = 1 }local diagnostics = {"diagnostics",symbols = {error = "",warn = "",info = "",hint = "",},}return {"nvim-lualine/lualine.nvim",lazy = false,priority = 900,dependencies = { "nvim-tree/nvim-web-devicons" },opts = {options = {theme = "auto",disabled_filetypes = { "no-neck-pain" },section_separators = "",component_separators = "",icons_enabled = true,},-- extensions = { "lazy", "mason", "toggleterm", "quickfix", "fugitive", "lazy", "trouble" },sections = {lualine_a = { "mode" },lualine_b = { "branch", diagnostics },lualine_c = { filename, "diff" },lualine_x = { pomo_timer },lualine_y = { file_info, "filetype" },lualine_z = { "location" },},inactive_sections = {lualine_a = { "mode" },lualine_b = { "branch", diagnostics },lualine_c = { filename, "diff" },lualine_x = { pomo_timer },lualine_y = { file_info, "filetype" },lualine_z = { "location" },},},}
return {-- "matbme/JABS.nvim",-- dependencies = {-- "nvim-tree/nvim-web-devicons",-- },-- cmd = "JABSOpen",-- keys = { { "<leader>fb", ":JABSOpen<CR>" } },-- opts = {-- position = "center",-- border = "single",-- sort_mru = true,-- symbols = {-- current = "C", -- default -- split = "S", -- default -- alternate = "A", -- default -- hidden = "H", -- default -- locked = "L", -- default -- ro = "R", -- default -- edited = "E", -- default -- terminal = "T", -- default -- default_file = "D", -- Filetype icon if not present in nvim-web-devicons. Default -- terminal_symbol = ">_", -- Filetype icon for a terminal split. Default -- },-- keymap = {-- h_split = "s",-- v_split = "v",-- close = "dd",-- },-- },}
return {-- "ThePrimeagen/harpoon",-- branch = "harpoon2",-- init = function()-- require("harpoon"):setup()-- end,-- keys = {-- {-- "<leader>a",-- function()-- require("harpoon"):list():add()-- end,-- },-- {-- "<C-e>",-- function()-- require("harpoon").ui:toggle_quick_menu(require("harpoon"):list())-- end,-- },-- {-- "<leader>h",-- function()-- require("harpoon"):list():select(1)-- end,-- },-- {-- "<leader>j",-- function()-- require("harpoon"):list():select(2)-- end,-- },-- {-- "<leader>k",-- function()-- require("harpoon"):list():select(3)-- end,-- },-- {-- "<leader>l",-- function()-- require("harpoon"):list():select(4)-- end,-- },-- },-- opts = {-- settings = {-- save_on_toggle = true,-- save_on_ui_close = true,-- },-- },}
return {"vuciv/golf",cmd = "Golf",}
return {"j-hui/fidget.nvim",event = "VeryLazy",opts = {progress = {display = {done_ttl = 10,},},notification = {override_vim_notify = true,window = {winblend = 0,zindex = 1000,max_width = 60,},},},}
return {"vxpm/ferris.nvim",ft = "rust",opts = {create_commands = true,url_handler = "start",},}
return {-- "X3eRo0/dired.nvim",-- dependencies = { "MunifTanjim/nui.nvim" },-- keys = {-- {-- "<C-s>",-- function()-- if vim.bo.filetype == "dired" then-- CMD("DiredQuit")-- else-- CMD("Dired")-- end-- end,-- desc = "Open Dired",-- },-- {-- "-",-- ":Dired<cr>",-- desc = "Open Dired",-- },-- },-- opts = {-- hide_details = false,-- sort_order = "dirs",-- show_icons = false,-- show_hidden = true,-- show_banner = true,-- },}
return {"elihunter173/dirbuf.nvim",cmd = "Dirbuf",keys = {{"<C-s>",function()if vim.bo.filetype == "dirbuf" thenCMD("DirbufQuit")elseCMD("Dirbuf")endend,desc = "Open dirbuf",},{"-",":Dirbuf<CR>",},},opts = {sort_order = "directories_first",write_cmd = "DirbufSync -confirm",show_hidden = true,},}
return {"luckasRanarison/nvim-devdocs",cmd = { "DevdocsOpenCurrent", "DevdocsOpen" },keys = {{"<leader>de",":DevdocsOpenCurrent<CR>",desc = "open dev docs",},},opts = {},}
return {"eliseshaffer/darklight.nvim",opts = {mode = "custom",light_mode_callback = function()ColorMyPencils("rusticated", "light", true)DisableBold()DisableItalic()end,dark_mode_callback = function()ColorMyPencils("rasmus", "dark", true)DisableBold()DisableItalic()end,},}
return {"saecki/crates.nvim",event = { "BufRead Cargo.toml" },opts = {},}
return {"stevearc/conform.nvim",event = "BufRead",opts = {formatters = {-- Use system binaries without .exe extensionprettier = {command = "prettier",},prettierd = {command = "prettierd",},},formatters_by_ft = {astro = { "prettierd", "prettier", stop_after_first = true },go = { "gofumpt", "goimports", stop_after_first = true },javascript = { "prettierd", "prettier", stop_after_first = true },javascriptreact = { "prettierd", "prettier", stop_after_first = true },typescript = { "prettierd", "prettier", stop_after_first = true },typescriptreact = { "prettierd", "prettier", stop_after_first = true },json = { "prettierd", "prettier", stop_after_first = true },svelte = { "prettierd", "prettier", stop_after_first = true },vue = { "prettierd", "prettier", stop_after_first = true },yaml = { "prettierd", "prettier", stop_after_first = true },md = { "dprint" },toml = { "dprint" },lua = { "stylua" },sql = { "sql_formatter" },python = { "ruff_format" },rust = { "rustfmt" },-- nu = { "nufmt" },nix = { "nixfmt" },},format_after_save = {async = true,-- lsp_format = "fallback",},},}
return {"ej-shafran/compile-mode.nvim",cmd = "Compile",init = function()vim.g.compile_mode = {baleia_setup = true,default_command = "",recompile_no_fail = true,}end,keys = {{"<leader>co",":vert Compile<cr>",desc = "run a compile cmd",},{"<leader>cr",":vert Recompile<cr>",desc = "rerun last compile cmd",},},dependencies = {"nvim-lua/plenary.nvim",{ "m00qek/baleia.nvim", tag = "v1.3.0" },},}
return {"uga-rosa/ccc.nvim",cmd = "CccHighlighterToggle",keys = {{"<leader>ccc","<cmd>CccHighlighterToggle<CR>",desc = "Toggle ccc",silent = true,},},opts = {highlighter = {auto_enable = false,lsp = true,},},}
return {"saghen/blink.cmp",event = "BufRead",enabled = true,version = "1.4", -- NOTE: 1.4 until fixed: https://github.com/LazyVim/LazyVim/pull/6183build = "cargo build --release",opts = {keymap = { preset = "enter" },completion = {documentation = { auto_show = true, auto_show_delay_ms = 250 },menu = {draw = {columns = {{ "kind" },{ "label", gap = 1 },},},},},cmdline = { enabled = false },-- completion = {-- menu = {-- auto_show = false,-- draw = {-- columns = {-- { "label", "label_description", gap = 1 },-- },-- },-- },-- },-- },signature = { enabled = true },sources = {default = { "lsp", "path", "snippets", "buffer" },providers = {buffer = {opts = {get_bufnrs = function()return vim.tbl_filter(function(bufnr)return vim.bo[bufnr].buftype == ""end, vim.api.nvim_list_bufs())end,},},},},},}
return {"code-biscuits/nvim-biscuits",ft = { "rust", "javascript", "typescript", "shell" },opts = {cursor_line_only = true,prefix_string = " ",toggle_keybind = "<leader>bi",show_on_start = false,},}
return {"windwp/nvim-autopairs",event = "InsertEnter",opts = { disable_filetype = { "typr" } },}
local lsp = vim.lsplsp.set_log_level("off")local c = vim.tbl_deep_extend("force",{},vim.lsp.protocol.make_client_capabilities(),require("blink.cmp").get_lsp_capabilities())lsp.config["*"] = {capabilities = c,root_markers = { ".git" },}lsp.enable({"astro",-- "bacon-ls","gopls","json_ls","lua_ls","nushell","rust_analyzer","svelteserver","tailwindcss","ts_ls","yamlls",})local orig_util_open_floating_preview = lsp.util.open_floating_previewfunction lsp.util.open_floating_preview(contents, syntax, opts, ...)opts = opts or {}opts.border = opts.border or "single"opts.max_width = opts.max_width or 60opts.focusable = opts.focusable or falsereturn orig_util_open_floating_preview(contents, syntax, opts, ...)end-- trying tiny-inline-diagnostic.nvim for a while-- AUTOCMD("CursorHold", {-- callback = function()-- vim.diagnostic.open_float()-- end,-- })local function reload_lsp()CMD("lua vim.lsp.stop_client(vim.lsp.get_clients())")local function check_and_reload()if not lsp.buf_is_attached(0) thenCMD.edit()elsevim.defer_fn(check_and_reload, 50)endendvim.defer_fn(check_and_reload, 50)endCREATE_CMD("LspReload", reload_lsp, { desc = "Reload attached LSP" })AUTOCMD("LspAttach", {callback = function(args)vim.diagnostic.config({update_in_insert = false,virtual_text = false,float = {focusable = false,border = "rounded",source = "always",header = "",prefix = "",},})local client = lsp.get_client_by_id(args.data.client_id)MAP("n", "<leader>ih", function()if vim.lsp.inlay_hint.is_enabled() thenvim.lsp.inlay_hint.enable(false)elsevim.lsp.inlay_hint.enable(true)endend)if client:supports_method("textDocument/foldingRange") thenvim.wo.foldmethod = "expr"vim.wo.foldexpr = "v:lua.vim.lsp.foldexpr()"elsevim.wo.foldmethod = "indent"endMAP("n", "gd", function()lsp.buf.definition()end, { desc = "Go to definition" })MAP("n", "gr", function()lsp.buf.references()end, { desc = "Show references" })MAP("n", "grn", function()lsp.buf.rename()end, { desc = "vim.lsp rename" })MAP("n", "gi", function()lsp.buf.implementation()end, { desc = "vim.lsp implementation" })MAP({ "n", "v" }, "ga", function()lsp.buf.code_action()end, { desc = "vim.lsp code action" })MAP("n", "K", function()lsp.buf.hover()end, { desc = "Hover" })end,})return {}
-- Bootstrap lazy.nvimlocal lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"if not (vim.uv or vim.loop).fs_stat(lazypath) thenlocal out = vim.fn.system({"git","clone","--filter=blob:none","--branch=stable","https://github.com/folke/lazy.nvim.git",lazypath,})if vim.v.shell_error ~= 0 thenvim.api.nvim_echo({{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },{ out, "WarningMsg" },{ "\nPress any key to exit..." },}, true, {})vim.fn.getchar()os.exit(1)endendvim.opt.rtp:prepend(lazypath)-- Setup lazy.nvimrequire("lazy").setup({lockfile = vim.fn.stdpath("data") .. "/lazy-lock.json",spec = {{ import = "themes" },{ import = "plugins" },{ import = "lsp" },},change_detection = { notify = false },-- Configure any other settings here. See the documentation for more details.-- colorscheme that will be used when installing plugins.install = { colorscheme = { "auto" } },-- automatically check for plugin updateschecker = { enabled = true, notify = true, concurrency = 24 },ui = { border = "single", backdrop = 95 },performance = {rtp = {disabled_plugins = {"gzip","netrwPlugin","tarPlugin","tohtml","tutor","zipPlugin","matchit","rplugin",},},},})AUTOCMD("VimEnter", {callback = function()require("lazy").update({ show = false })end,})
-- disable netrwvim.g.loaded_netrw = 1vim.g.loaded_netrwPlugin = 1require("globals")require("set")require("remap")require("lazy_init")require("autocmd")require("set_colorscheme")
-- Global variablesCMD = vim.cmdAUTOCMD = vim.api.nvim_create_autocmdAUGROUP = vim.api.nvim_create_augroupCREATE_CMD = vim.api.nvim_create_user_commandMAP = vim.keymap.setSET_HL = vim.api.nvim_set_hl-- Global functionsfunction ColorMyPencils(color, theme, transparent)vim.o.background = theme or "light"CMD.colorscheme(color or "default")require("fidget").notify("background: ".. vim.o.background.. "\n theme: ".. theme.. "\n colorscheme: ".. color)-- general tweaksif transparent thenSET_HL(0, "Normal", { bg = "none" })SET_HL(0, "NormalFloat", { bg = "none" })SET_HL(0, "NormalNC", { bg = "none" })endif theme == "dark" thenSET_HL(0, "LineNrAbove", { fg = "#BFBFBF", bold = false })SET_HL(0, "LineNr", { fg = "white", bold = true })SET_HL(0, "LineNrBelow", { fg = "#BFBFBF", bold = false })endSET_HL(0, "LspInlayHint", { fg = "#808080" })-- fixes for colorschemesif color == "rusticated" then FixRusticated() endif color == "rasmus" then FixRasmus() endendfunction DisableItalic()local hl_groups = vim.api.nvim_get_hl(0, {})for key, hl_group in pairs(hl_groups) doif hl_group.italic thenSET_HL(0, key, vim.tbl_extend("force", hl_group, { italic = false }))endendendfunction DisableBold()local hl_groups = vim.api.nvim_get_hl(0, {})for key, hl_group in pairs(hl_groups) doif hl_group.bold thenSET_HL(0, key, vim.tbl_extend("force", hl_group, { bold = false }))endendendfunction DisableUndercurl()local highlights = {DiagnosticUnderlineError = { undercurl = false, underline = true },DiagnosticUnderlineWarn = { undercurl = false, underline = true },DiagnosticUnderlineInfo = { undercurl = false, underline = true },DiagnosticUnderlineHint = { undercurl = false, underline = true },}for group, opts in pairs(highlights) doSET_HL(0, group, opts)endendfunction FixRasmus()local highlights = {SpellBad = { undercurl = false, underline = true },SpellCap = { undercurl = false, underline = true },SpellLocal = { undercurl = false, underline = true },SpellRare = { undercurl = false, underline = true },DiffAdd = { reverse = false },DiffChange = { reverse = false },DiffDelete = { reverse = false },}for group, opts in pairs(highlights) doSET_HL(0, group, opts)endendfunction FixRusticated()SET_HL(0, "DiffAdd", {fg = "#1e1e1e",bg = "#98c379",})SET_HL(0, "DiffAdded", {fg = "#1e1e1e",bg = "#98c379",})SET_HL(0, "DiffTextAdd", {fg = "#1e1e1e",bg = "#98c379",})SET_HL(0, "DiffText", {fg = "#1e1e1e",bg = "#98c379",})endreturn {}
-- Trailing whitespace highlightSET_HL(0, "ws", { bg = "red" })vim.fn.matchadd("ws", [[\s\+$]])AUTOCMD("InsertEnter", {callback = function()vim.fn.clearmatches()end,})AUTOCMD("InsertLeave", {callback = function()vim.fn.matchadd("ws", [[\s\+$]])end,})-- Yank highlightAUTOCMD("TextYankPost", {callback = function()vim.highlight.on_yank({ higroup = "Visual", timeout = 500 })end,})-- Auto-resize windowsAUTOCMD("VimResized", {pattern = "*",callback = function()CMD("wincmd =")end,})-- Remove trailing whitespace on saveAUTOCMD("BufWritePre", {pattern = "*",command = [[%s/\s\+$//e]],})
return {filetypes = { "yaml" },settings = {yaml = {schemaStore = {-- You must disable built-in schemaStore support if you want to use-- this plugin and its advanced options like `ignore`.enable = false,-- Avoid TypeError: Cannot read properties of undefined (reading 'length')url = "",},schemas = require("schemastore").yaml.schemas(),},},}
return {cmd = { "bunx", "--bun", "typescript-language-server", "--stdio" },root_markers = { "package.json", "bun.lock", "package-lock.json" },init_options = {plugins = {{name = "@vue/typescript-plugin",location = vim.fn.exepath("vue-language-server"),languages = { "vue" },},},},filetypes = {"typescript","javascript","javascriptreact","typescriptreact","vue",},}
return {cmd = { "tailwindcss-language-server", "--stdio" },filetypes = { "astro", "svelte", "tsx", "jsx", "html", "vue" },root_markers = { "package.json", "bun.lock" },settings = {},}
return {cmd = { "svelteserver", "--stdio" },filetypes = { "svelte" },root_markers = { "package.json", "bun.lock" },settings = {},}
return {cmd = { "rust-analyzer" },filetypes = { "rust" },root_markers = { "Cargo.toml", "Cargo.lock" },settings = {["rust-analyzer"] = {assist = {preferSelf = true,},lens = {references = {adt = {enable = true,},enumVariant = {enable = true,},method = {enable = true,},trait = {enable = true,all = true,},},},semanticHighlighting = {operator = {specialization = {enable = true,},},punctuation = {enable = true,separate = {macro = {enable = true,},},specialization = {enable = true,},},},inlayHints = {bindingModeHints = {enable = true,},closureCaptureHints = {enable = true,},closureReturnTypeHints = {enable = true,},discriminantHints = {enable = true,},expressionAdjustmentHints = {enable = true,},genericParameterHints = {lifetime = {enable = true,},type = {enable = true,},},implicitDrops = {enable = true,},implicitSizedBoundHints = {enable = true,},lifetimeElisionHints = {useParameterNames = true,enable = true,},rangeExclusiveHints = {enable = true,},},-- checkOnSave and diagnostics must be disabled for bacon-lscheckOnSave = {command = "clippy",enable = true,},diagnostics = {enable = true,experimental = {enable = true,},styleLints = {enable = true,},},hover = {actions = {references = {enable = true,},},show = {enumVariants = 10,fields = 10,traitAssocItems = 10,},},interpret = {tests = true,},cargo = {features = "all",},completion = {hideDeprecated = true,fullFunctionSignatures = {enable = true,},},},},}
return {cmd = { "nu", "--lsp" },filetypes = { "nu" },settings = {},}
return {cmd = { "lua-language-server" },filetypes = { "lua" },settings = {Lua = {diagnostics = {globals = { "vim" },},workspace = {checkThirdParty = true,library = vim.api.nvim_get_runtime_file("", true),},},},}
return {filetypes = { "json", "jsonc" },settings = {json = {schemas = require("schemastore").json.schemas(),validate = { enable = true },},},}
return {capabilities = capabilities,cmd = { "gopls" },root_markers = { "go.mod", "go.sum" },filetypes = { "go" },-- init_options = {-- usePlaceholders = true,-- },settings = {experimentalPostfixCompletions = true,gofumpt = true,staticcheck = true,completeUnimported = true,usePlaceholders = true,semanticTokens = true,-- stylua: ignore startanalyses = { -- all good analyses are enabledshadow = true, QF1005 = true, QF1006 = true, QF1007 = true, QF1011 = true, S1002 = true, S1005 = true, S1006 = true, S1008 = true, S1009 = true, S1011 = true, S1016 = true, S1021 = true, S1029 = true, SA1000 = true, SA1002 = true, SA1003 = true, SA1007 = true, SA1010 = true, SA1011 = true, SA1014 = true, SA1015 = true, SA1017 = true, SA1018 = true, SA1020 = true, SA1021 = true, SA1023 = true, SA1024 = true, SA1025 = true, SA1026 = true, SA1027 = true, SA1028 = true, SA1030 = true, SA1031 = true, SA1032 = true, SA2002 = true, SA2003 = true, SA4005 = true, SA4006 = true, SA4008 = true, SA4009 = true, SA4010 = true, SA4012 = true, SA4015 = true, SA4017 = true, SA4018 = true, SA4023 = true, SA4031 = true, SA5000 = true, SA5002 = true, SA5005 = true, SA5007 = true, SA5010 = true, SA5011 = true, SA5012 = true, SA6000 = true, SA6001 = true, SA6002 = true, SA6003 = true, SA9001 = true, SA9003 = true, SA9005 = true, SA9007 = true, SA9008 = true,},-- stylua: ignore endcodelenses = {run_govulncheck = true,},vulncheck = "Imports",},}
return {cmd = { "bacon-ls" },filetypes = { "rust" },root_markers = { "Cargo.toml", "Cargo.lock", ".bacon-locations" },settings = {init_options = {locationsFile = ".bacon-locations",updateOnSave = true,updateOnSaveWaitMillis = 100,runBaconInBackground = true,synchronizeAllOpenFilesWaitMillis = 1000,},},}
return {cmd = { "astro-ls", "--stdio" },filetypes = { "astro" },root_markers = { "package.json", "bun.lock", "tsconfig.json" },settings = {},init_options = {typescript = {tsdk = "node_modules/typescript/lib",},},}
vim.loader.enable()require("init")
vim.bo.tabstop = 4vim.bo.shiftwidth = 4vim.bo.softtabstop = 4
vim.bo.tabstop = 8vim.bo.shiftwidth = 8vim.bo.softtabstop = 8
vim.bo.tabstop = 4vim.bo.shiftwidth = 4vim.bo.softtabstop = 4
vim.bo.tabstop = 4vim.bo.shiftwidth = 4vim.bo.softtabstop = 4
vim.bo.tabstop = 8vim.bo.shiftwidth = 8vim.bo.softtabstop = 8-- was for rustaceanvim but now using ferris.nvim-- local bufnr = vim.api.nvim_get_current_buf()-- -- MAP("n", "<leader>a", function()-- -- CMD.RustLsp("codeAction") -- supports rust-analyzer's grouping-- -- or lsp.buf.codeAction() if you don't want grouping.-- -- end, { silent = true, buffer = bufnr })-- MAP(-- "n",-- "K", -- Override Neovim's built-in hover keymap with rustaceanvim's hover actions-- function() CMD.RustLsp({ "hover", "actions" }) end,-- { silent = true, buffer = bufnr }-- )
vim.bo.shiftwidth = 2vim.bo.softtabstop = 2vim.bo.tabstop = 2
vim.bo.tabstop = 4vim.bo.shiftwidth = 4vim.bo.softtabstop = 4
vim.bo.tabstop = 4vim.bo.shiftwidth = 4vim.bo.softtabstop = 4vim.bo.textwidth = 80
vim.bo.tabstop = 4vim.bo.shiftwidth = 4vim.bo.softtabstop = 4
vim.bo.tabstop = 4vim.bo.shiftwidth = 4vim.bo.softtabstop = 4
vim.bo.tabstop = 8vim.bo.shiftwidth = 8vim.bo.softtabstop = 8
vim.o.textwidth = 72vim.o.colorcolumn = "50"
vim.bo.tabstop = 4vim.bo.shiftwidth = 4vim.bo.softtabstop = 4
{config,lib,pkgs,...}:{nixpkgs.config.allowUnfree = true;wsl = {enable = true;defaultUser = "james";startMenuLaunchers = true;useWindowsDriver = true;docker-desktop.enable = true;# usb passthroughusbip = {enable = true;autoAttach = [ ]; # add device IDs like "4-1" to auto-attach USB devices};wslConf = {automount.root = "/mnt";automount.options = "metadata,uid=1000,gid=100,noatime";boot.systemd = true;interop.enabled = true;interop.appendWindowsPath = true;network.generateHosts = true;};};nix = {settings = {experimental-features = ["nix-command""flakes"];auto-optimise-store = true;};gc = {automatic = true;dates = "weekly";options = "--delete-older-than 7d";};};# user configurationusers.users.james = {isNormalUser = true;shell = pkgs.nushell; # nushell as default shellextraGroups = ["wheel" # sudo access"docker" # if using Docker];};programs = {};services = {openssh.enable = true;};networking = {hostName = "nixos-wsl";firewall.enable = true;};time.timeZone = "Europe/Warsaw";i18n.defaultLocale = "en_US.UTF-8";# this value determines the NixOS release from which the default# settings for stateful data, like file locations and database versions# on your system were taken. Don't change this after installation.system.stateVersion = "24.11";}
<h1 align="center">James' NixOS Configuration</h1><p align="center">NixOS configuration for WSL</p>## AboutRight now I'm primarily using Windows and WSL but thanks to the [NixOS-WSL](https://github.com/nix-community/NixOS-WSL)project I can use glorious NixOS inside WSL :]## FeaturesMainly configured for :- Neovim- Nushell- Zellij- Rust- TypeScriptThings like Alacritty and other tools etc. are handled in my Windows configuration.Generally I no longer even touch my Windows environment and instantly hop intoWSL and zellij with...```bashwsl -d nixos --exec /etc/profiles/per-user/james/bin/zellij```...which automatically launches when I start Alacritty.## NotesI'd appreciate any feedback or pointers from someone with more experience usingNixOS :]Some things have been directly copied from my Windows configs so there may beremnants of that, especially for nushell.I plan to configure Neovim with NixOS soon but for now I'm cloning it into`./dotfiles` and removing garbage files.My zellij config is brand new and needs work.## LicenseCopyright (c) James Plummer <jamesp2001@live.co.uk>This project is licensed under the MIT license ([LICENSE.md] or <http://opensource.org/licenses/MIT>)[LICENSE.md]: ./LICENSE.md
The MIT License (MIT)Copyright (c) James Plummer <jamesp2001@live.co.uk>Permission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THESOFTWARE.
# buildresultresult-*# annoying files.claude/