From 9e596d625240fe6500992afe78380de10dc97675 Mon Sep 17 00:00:00 2001 From: Pat Garrity Date: Fri, 17 Oct 2025 21:14:37 -0500 Subject: [PATCH] Dealing with new version requirements for things like neovim and sbt --- .config/nvim/lua/plugin_management.lua | 11 +++++------ .zshrc | 22 +++++++++++++++++++--- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/.config/nvim/lua/plugin_management.lua b/.config/nvim/lua/plugin_management.lua index 8111911..b46e152 100644 --- a/.config/nvim/lua/plugin_management.lua +++ b/.config/nvim/lua/plugin_management.lua @@ -146,8 +146,6 @@ require("lazy").setup({ 'hrsh7th/cmp-nvim-lsp', }, config = function(_) - local lsp = require('lspconfig') - -- Establish a set of capabilities so we can advertise nvim-cmp support. local capabilities = vim.lsp.protocol.make_client_capabilities() @@ -155,7 +153,7 @@ require("lazy").setup({ capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities) -- lua-language-server - lsp.lua_ls.setup { + vim.lsp.config('lua_ls', { settings = { Lua = { runtime = { @@ -178,13 +176,14 @@ require("lazy").setup({ }, }, }, - } + }) + vim.lsp.enable('lua_ls') -- bash-language-server - lsp.bashls.setup{} + vim.lsp.enable('bashls') -- tsserver = typescript language server, works for JS as well. - lsp.ts_ls.setup{} + vim.lsp.enable('ts_ls') end }, diff --git a/.zshrc b/.zshrc index 2f348a6..7dfd165 100644 --- a/.zshrc +++ b/.zshrc @@ -10,11 +10,12 @@ export DISPLAY=":0" # ============================================================================= # History configuration. # ============================================================================= +alias history='history -t "%Y-%m-%d"' + export HISTFILE="$HOME/.zsh_history" export HISTSIZE=25000 export SAVEHIST=$HISTSIZE export HISTORY_IGNORE="(ls|cd|pwd|exit)*" -export HIST_STAMPS="yyyy-mm-dd" setopt EXTENDED_HISTORY # Write the history file in the ':start:elapsed;command' format. setopt INC_APPEND_HISTORY # Write to the history file immediately, not when the shell exits. @@ -32,7 +33,7 @@ setopt INTERACTIVE_COMMENTS # Allow comments in interactive shell. export FZF_CTRL_R_OPTS=" --preview 'echo {}' --preview-window up:3:hidden:wrap --bind 'ctrl-/:toggle-preview' - --bind 'ctrl-y:execute-silent(echo -n {2..} | xclip -selection clipboard)+abort' + --bind 'ctrl-y:execute-silent(echo -n {2..} | wl-copy)+abort' --color header:italic --header 'Press CTRL-Y to copy command into clipboard'" @@ -65,6 +66,11 @@ fi # Note: use vim here so that if Neovim isn't setup, we gracefully fall back. export EDITOR=vim +# If there is a screenshot directory, use it by default. +if [ -d "$HOME/screenshot" ]; then + export GRIM_DEFAULT_DIR="$HOME/screenshot" +fi + # ============================================================================= # PATH # ============================================================================= @@ -104,6 +110,14 @@ if [ -d "$N_PREFIX/bin" ]; then export PATH="$N_PREFIX/bin:$PATH" fi +# ============================================================================= +# Additional FZF Setup +# ============================================================================= +export FZF_CTRL_T_OPTS=" + --walker-skip .git,node_modules,target + --preview 'bat -n --color=always {}' + --bind 'ctrl-/:change-preview-window(down|hidden|)'" + # ============================================================================= # MAN PATH -- Support locally installed manpages # ============================================================================= @@ -175,7 +189,9 @@ fi # Scala/SBT Setup # ============================================================================= if command -v sbt > /dev/null 2>&1; then - export SBT_OPTS="-XX:+UseG1GC -Xmx2048m" + # This includes fixes for Scala until it supports JVM 24 properly and + # removes the use of deprecated methods (sun.misc.Unsafe) + export SBT_OPTS="-XX:+UseG1GC -Xmx2048m --sun-misc-unsafe-memory-access=allow --enable-native-access=ALL-UNNAMED" fi # =============================================================================