dots

Laptop & Desktop dotfiles
git clone https://git.pngu.org/dots
Log | Files | Refs | README

commit 599178d617ed740243d9ff95c6aade1f1d3c1b34
parent 36e85e3a9f83dcd8735d1d1bb7f2efd9a8e7df90
Author: Jack Sangdahl <jack@pngu.org>
Date:   Sun,  7 Sep 2025 11:28:23 -0600

Improve Neovim configuration

- Align init.lua to upstream & add necessary autocmds.lua and
  options.lua files
- UI QOL configuration
- Move Mason package list to Mason plugin configuration
- Add Lua language server and formatter
- Remove unused Typst server and formatter

Transition to QMK flashing tools binaries & remove some packages

Diffstat:
M.config/nvim/init.lua | 32++++++++++++++++----------------
A.config/nvim/lua/autocmds.lua | 1+
M.config/nvim/lua/chadrc.lua | 42++++++++++++++++++++++++++++++++++++------
M.config/nvim/lua/configs/conform.lua | 8++++++--
M.config/nvim/lua/configs/lspconfig.lua | 2+-
A.config/nvim/lua/options.lua | 4++++
M.config/nvim/lua/plugins/init.lua | 14++++++++++++--
M.config/sway/config | 2+-
M.gitignore | 1+
M.pkglist.txt | 5+----
M.zshrc | 1+
11 files changed, 80 insertions(+), 32 deletions(-)

diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua @@ -1,37 +1,37 @@ -vim.g.base46_cache = vim.fn.stdpath("data") .. "/base46/" +vim.g.base46_cache = vim.fn.stdpath "data" .. "/base46/" vim.g.mapleader = " " -- bootstrap lazy and all plugins -local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim" if not vim.uv.fs_stat(lazypath) then - local repo = "https://github.com/folke/lazy.nvim.git" - vim.fn.system({ "git", "clone", "--filter=blob:none", repo, "--branch=stable", lazypath }) + local repo = "https://github.com/folke/lazy.nvim.git" + vim.fn.system { "git", "clone", "--filter=blob:none", repo, "--branch=stable", lazypath } end vim.opt.rtp:prepend(lazypath) -local lazy_config = require("configs.lazy") +local lazy_config = require "configs.lazy" -- load plugins require("lazy").setup({ - { - "NvChad/NvChad", - lazy = false, - branch = "v2.5", - import = "nvchad.plugins", - }, - - { import = "plugins" }, + { + "NvChad/NvChad", + lazy = false, + branch = "v2.5", + import = "nvchad.plugins", + }, + + { import = "plugins" }, }, lazy_config) -- load theme dofile(vim.g.base46_cache .. "defaults") dofile(vim.g.base46_cache .. "statusline") -require("nvchad.options") -require("nvchad.autocmds") +require "options" +require "autocmds" vim.schedule(function() - require("mappings") + require "mappings" end) diff --git a/.config/nvim/lua/autocmds.lua b/.config/nvim/lua/autocmds.lua @@ -0,0 +1 @@ +require "nvchad.autocmds" diff --git a/.config/nvim/lua/chadrc.lua b/.config/nvim/lua/chadrc.lua @@ -2,14 +2,44 @@ local M = {} M.base46 = { theme = "onenord", + hl_override = { + Comment = { italic = true }, + ["@comment"] = { italic = true }, + }, } -M.mason.pkgs = { - "ruff", - "python-lsp-server", - "tinymist", - "typstyle", - "prettier", +M.ui = { + cmp = { + style = "atom_colored", + }, + telescope = { + style = "bordered", + }, + statusline = { + theme = "minimal", + }, +} + +M.term = { + sizes = { + vsp = 0.4, + }, +} + +M.nvdash = { + load_on_startup = true, + header = { + " ▄ ▄ ", + " ▄ ▄▄▄ ▄ ▄▄▄ ▄ ▄ ", + " █ ▄ █▄█ ▄▄▄ █ █▄█ █ █ ", + " ▄▄ █▄█▄▄▄█ █▄█▄█▄▄█▄▄█ █ ", + " ▄ █▄▄█ ▄ ▄▄ ▄█ ▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ", + " █▄▄▄▄ ▄▄▄ █ ▄ ▄▄▄ ▄ ▄▄▄ ▄ ▄ █ ▄", + "▄ █ █▄█ █▄█ █ █ █▄█ █ █▄█ ▄▄▄ █ █", + "█▄█ ▄ █▄▄█▄▄█ █ ▄▄█ █ ▄ █ █▄█▄█ █", + " █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█ █▄█▄▄▄█ ", + " ", + }, } return M diff --git a/.config/nvim/lua/configs/conform.lua b/.config/nvim/lua/configs/conform.lua @@ -2,10 +2,14 @@ local options = { formatters_by_ft = { css = { "prettier" }, html = { "prettier" }, - python = { "ruff_format" }, + python = { + "ruff_fix", + "ruff_format", + "ruff_organize_imports", + }, cpp = { "clang-format" }, c = { "clang-format" }, - typst = { "typstyle" }, + lua = { "stylua" }, }, format_on_save = { timeout_ms = 500, diff --git a/.config/nvim/lua/configs/lspconfig.lua b/.config/nvim/lua/configs/lspconfig.lua @@ -1,7 +1,7 @@ require("nvchad.configs.lspconfig").defaults() local lspconfig = require("lspconfig") -local servers = { "html", "cssls", "pylsp", "clangd", "tinymist" } +local servers = { "html", "cssls", "clangd", "pylsp", "lua_ls" } local nvlsp = require("nvchad.configs.lspconfig") for _, lsp in ipairs(servers) do diff --git a/.config/nvim/lua/options.lua b/.config/nvim/lua/options.lua @@ -0,0 +1,4 @@ +require "nvchad.options" + +local o = vim.o +o.cursorlineopt ='both' diff --git a/.config/nvim/lua/plugins/init.lua b/.config/nvim/lua/plugins/init.lua @@ -18,10 +18,20 @@ return { "html", "css", "python", - "rust", "cpp", "c", - "bash", + }, + }, + }, + { + "williamboman/mason.nvim", + opts = { + ensure_installed = { + "ruff", + "python-lsp-server", + "prettier", + "lua-language-server", + "stylua", }, }, }, diff --git a/.config/sway/config b/.config/sway/config @@ -14,7 +14,7 @@ set $down j set $up k set $right l -output * bg $HOME/.img/wallpaper/swirl.png fill +output * bg $HOME/.img/wallpaper/fish.png fill input "1452:657:bcm5974" { dwt enabled diff --git a/.gitignore b/.gitignore @@ -5,6 +5,7 @@ .config/Electron .config/kicad .config/nvim/lazy-lock.json +.config/obsidian .config/pulse .config/typstfmt .config/Vencord diff --git a/.pkglist.txt b/.pkglist.txt @@ -1,6 +1,5 @@ alacritty # Terminal artix-archlinux-support # Required for installing any Arch packages -avrdude # Required for QMK base # Provides all base utilities. Pretty much all needed bat # /bin/cat alternative brightnessctl # To control keyboard/display brightness @@ -11,8 +10,6 @@ clang # Compiler cmake # Required for ZMK cryptsetup # Required for dmcrypt/device-mapper separate swap partition cryptsetup-openrc # Service for aforementioned -dfu-programmer # Required for QMK -dfu-util # Required for QMK discord # Messaging platform dos2unix # Used for formatting some KiCad production files efibootmgr # Required to modify EFI entries (eg. EFI Stubs) @@ -45,6 +42,7 @@ noto-fonts # Variety of common fonts noto-fonts-cjk # Fonts of Asian dialects noto-fonts-emoji # Emojis npm # Required by some Mason (neovim) packages (python-lsp-server & prettier) +obsidian # Notes taking application opendoas # /sbin/sudo alternative openrc # Init system & service manager openresolv # Name resolving required by IWD @@ -65,7 +63,6 @@ thunderbird # Mail & CalDAV client tlp # Battery manager tlp-openrc # Battery manager service tokei # Utility to count lines of code -typst # Text processing utility unzip # Unpack zip archives uv # Python manager waybar # Window manager bar diff --git a/.zshrc b/.zshrc @@ -24,6 +24,7 @@ export PYTHON_HISTORY="$HOME/.local/share/python-history" path+=( "$HOME/.local/bin" "$HOME/.local/qmk_toolchains_linuxX64/bin" +"$HOME/.local/qmk_flashutils_linuxX64" "$path[@]") export PATH