Skip to content

Commit

Permalink
More Neovim config tweaks
Browse files Browse the repository at this point in the history
 - final adjustments grsSwap
   - also added grsSwap abbriviation
 - some monkey-see-monkey-do configuration
   - config/nvim/lua/grs/devel/tooling.lua
     - sumnekop_lua section, based on
       - LuaLS/lua-language-server#259
  • Loading branch information
grscheller committed Dec 1, 2022
1 parent 8e3812e commit f541590
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 19 deletions.
3 changes: 3 additions & 0 deletions config/fish/conf.d/abbrs.fish
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ if not set -q fish_abbr_initialized
# Restart SSH key-agent adding your private key: ~/.ssh/id_rsa
abbr -a addkey 'eval (ssh-agent -c); and ssh-add'

# For dotfiles repo
abbr -a grsSwap '~/devel/dotfiles/grsSwap'

# Shell environment cmds
abbr -a re 'cd; unguard_universals; REDO_ENV=yes fish -l'
abbr -a ue UPDATE_ENV=yes fish
Expand Down
15 changes: 5 additions & 10 deletions config/nvim/lua/grs/devel/tooling.lua
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ local BuiltinTools = {
},
}

local grsUtils = require 'grs.lib.libVim'
local grsVim = require 'grs.lib.libVim'
local grsLspconf = require 'grs.devel.core.lspconfig'
local grsMason = require 'grs.devel.core.mason'
local grsDap = require 'grs.devel.core.dap'
local grsNullLs = require 'grs.devel.core.nullLs'

local msg = grsUtils.msg_hit_return_to_continue
local msg = grsVim.msg_hit_return_to_continue
local keybindings = require 'grs.core.keybindings'
local cmd = vim.api.nvim_command

Expand All @@ -106,15 +106,10 @@ end

--[[ Lua Configuration - geared to Neovim configs ]]

-- Tweak sumneko_lua's notion of runtimepath to help it find runtime files in
-- the repo you are editing, before locations like ~/.config/nvim or random
-- plugins. When editing the repo containing your neovim dotfiles, make sure
-- you start nvim in the directory containing init.lua.
--cmd [[set rtp^=lua rtp^=.]]
local sumneko_runtime_path = vim.api.nvim_get_runtime_file('', true)
--table.insert(sumneko_runtime_path, 1, '?/?.lua')
--table.insert(sumneko_runtime_path, 1, '?/init.lua')
--table.insert(sumneko_runtime_path, 1, '?/?.lua')
table.insert(sumneko_runtime_path, 1, '?.lua')
table.insert(sumneko_runtime_path, 1, '?/init.lua')
table.insert(sumneko_runtime_path, 1, '?/?.lua')

lspconf['sumneko_lua'].setup {
capabilities = capabilities,
Expand Down
17 changes: 8 additions & 9 deletions grsSwap
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,8 @@
# path, will put ~/.config/nvim files into its "workspace" in ways
# which override the corresponding source repo source files.
#
# This script is a temporary hack until I better understand how
# to configure sumneko_lua not to do this.
#
# TODO: Make this a function, otherwise cd commands don't work.
# This is is due to script running in another process.
# This script is a "temporary" hack until I better understand
# how to configure sumneko_lua not to do this.
#

set -q XDG_CONFIG_HOME; or set -lx XDG_CONFIG_HOME ~/.config
Expand All @@ -19,13 +16,15 @@ set -q DOTFILE_GIT_REPO; or set -gx DOTFILE_GIT_REPO ~/devel/dotfiles
if test -d ~/.config/nvim_lua_grs_backup
rm $XDG_CONFIG_HOME/nvim/lua/grs
mv $XDG_CONFIG_HOME/nvim_lua_grs_backup $XDG_CONFIG_HOME/nvim/lua/grs
printf '\nEdit Neovim config files directly in %s.' $DOTFILE_GIT_REPO
printf '\nIssue git commands from dotfiles repo, %s.\n' $DOTFILE_GIT_REPO
printf '\nEdit nvim config files directly in %s.' $DOTFILE_GIT_REPO
printf '\nIssue git commands from dotfiles repo, %s.' $DOTFILE_GIT_REPO
printf '\nThe dotfileInstall script will now work.\n'
cd $DOTFILE_GIT_REPO
else
mv ~/.config/nvim/lua/grs ~/.config/nvim_lua_grs_backup
ln -s $DOTFILE_GIT_REPO/config/nvim/lua/grs $XDG_CONFIG_HOME/nvim/lua/grs
printf '\nEdit Neovim config files thru %s/nvim link.' $XDG_CONFIG_HOME
printf '\nStill issue git commands from %s.\n' $DOTFILE_GIT_REPO
printf '\nEdit nvim config files thru %s/nvim/lua/grs.' $XDG_CONFIG_HOME
printf '\nStill issue git commands from %s.' $DOTFILE_GIT_REPO
printf '\nThe dotfileInstall script will fail!!!\n'
cd $XDG_CONFIG_HOME/nvim
end

0 comments on commit f541590

Please sign in to comment.