Changes returning to solo.io (#1)
1. Add ghostty config 2. Revise the nvim-lsp config to remedy deprecation warnings 3. Add back solo.zsh with enhancements Reviewed-on: #1 Co-authored-by: Jacob Bohanon <jacobbohanon@gmail.com> Co-committed-by: Jacob Bohanon <jacobbohanon@gmail.com>
This commit was merged in pull request #1.
This commit is contained in:
20
.gitconfig
20
.gitconfig
@@ -1,10 +1,14 @@
|
|||||||
[user]
|
[user]
|
||||||
name = Jacob Bohanon
|
name = Jacob Bohanon
|
||||||
email = jacobbohanon@gmail.com
|
email = jacob.bohanon@solo.io
|
||||||
signingkey = /home/jacob/.ssh/id_ed25519.pub
|
signingkey = /home/jacob/.ssh/id_ed25519.pub
|
||||||
[url "ssh://git@github.com/"]
|
[url "ssh://git@github.com/"]
|
||||||
insteadOf = https://github.com/
|
insteadOf = https://github.com/
|
||||||
[url "ssh://git@git.nonahob.net:30009/"]
|
[includeIf "gitdir:~/src/git.nonahob.net/"]
|
||||||
|
path = ~/.gitconfig-personal
|
||||||
|
[includeIf "gitdir:~/.dotfiles/"]
|
||||||
|
path = ~/.gitconfig-personal
|
||||||
|
[url "ssh://git@192.168.10.50:30009/"]
|
||||||
insteadOf = https://git.nonahob.net/
|
insteadOf = https://git.nonahob.net/
|
||||||
[tag]
|
[tag]
|
||||||
sort = version:refname
|
sort = version:refname
|
||||||
@@ -30,9 +34,9 @@
|
|||||||
prompt = true
|
prompt = true
|
||||||
[mergetool "nvimdiff"]
|
[mergetool "nvimdiff"]
|
||||||
cmd = "nvim -d \"$LOCAL\" \"$REMOTE\" \"$MERGED\" -c 'wincmd w' -c 'wincmd J'"
|
cmd = "nvim -d \"$LOCAL\" \"$REMOTE\" \"$MERGED\" -c 'wincmd w' -c 'wincmd J'"
|
||||||
[credential "https://github.com"]
|
#[credential "https://github.com"]
|
||||||
helper =
|
# helper =
|
||||||
helper = !/usr/bin/gh auth git-credential
|
# helper = !/usr/bin/gh auth git-credential
|
||||||
[credential "https://gist.github.com"]
|
#[credential "https://gist.github.com"]
|
||||||
helper =
|
# helper =
|
||||||
helper = !/usr/bin/gh auth git-credential
|
# helper = !/usr/bin/gh auth git-credential
|
||||||
|
|||||||
2
.gitconfig-personal
Normal file
2
.gitconfig-personal
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
[user]
|
||||||
|
email = jacobbohanon@gmail.com
|
||||||
1
ghostty/config.ghostty
Normal file
1
ghostty/config.ghostty
Normal file
@@ -0,0 +1 @@
|
|||||||
|
font-family = "FiraCode Nerd Font Mono"
|
||||||
@@ -1,5 +1,3 @@
|
|||||||
-- Mappings.
|
|
||||||
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
|
|
||||||
local opts = { noremap = true, silent = true }
|
local opts = { noremap = true, silent = true }
|
||||||
vim.keymap.set('n', '<space>d', vim.diagnostic.open_float, opts)
|
vim.keymap.set('n', '<space>d', vim.diagnostic.open_float, opts)
|
||||||
vim.keymap.set('n', '<space>dd', require 'telescope.builtin'.diagnostics, opts)
|
vim.keymap.set('n', '<space>dd', require 'telescope.builtin'.diagnostics, opts)
|
||||||
@@ -7,14 +5,9 @@ vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts)
|
|||||||
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts)
|
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts)
|
||||||
vim.keymap.set('n', '<space>dl', vim.diagnostic.setloclist, opts)
|
vim.keymap.set('n', '<space>dl', vim.diagnostic.setloclist, opts)
|
||||||
|
|
||||||
-- Use an on_attach function to only map the following keys
|
|
||||||
-- after the language server attaches to the current buffer
|
|
||||||
local on_attach = function(client, bufnr)
|
local on_attach = function(client, bufnr)
|
||||||
-- Enable completion triggered by <c-x><c-o>
|
vim.bo[bufnr].omnifunc = 'v:lua.vim.lsp.omnifunc'
|
||||||
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
|
|
||||||
|
|
||||||
-- Mappings.
|
|
||||||
-- See `:help vim.lsp.*` for documentation on any of the below functions
|
|
||||||
local bufopts = { noremap = true, silent = true, buffer = bufnr }
|
local bufopts = { noremap = true, silent = true, buffer = bufnr }
|
||||||
vim.keymap.set('n', 'gD', require 'telescope.builtin'.lsp_type_definitions, bufopts)
|
vim.keymap.set('n', 'gD', require 'telescope.builtin'.lsp_type_definitions, bufopts)
|
||||||
vim.keymap.set('n', 'gd', require 'telescope.builtin'.lsp_definitions, bufopts)
|
vim.keymap.set('n', 'gd', require 'telescope.builtin'.lsp_definitions, bufopts)
|
||||||
@@ -27,51 +20,30 @@ local on_attach = function(client, bufnr)
|
|||||||
vim.keymap.set('n', 'gr', require 'telescope.builtin'.lsp_references, bufopts)
|
vim.keymap.set('n', 'gr', require 'telescope.builtin'.lsp_references, bufopts)
|
||||||
vim.keymap.set('n', '<space>f', vim.lsp.buf.format, bufopts)
|
vim.keymap.set('n', '<space>f', vim.lsp.buf.format, bufopts)
|
||||||
end
|
end
|
||||||
|
|
||||||
local capabilities = require('cmp_nvim_lsp').default_capabilities(vim.lsp.protocol.make_client_capabilities())
|
local capabilities = require('cmp_nvim_lsp').default_capabilities(vim.lsp.protocol.make_client_capabilities())
|
||||||
require('lspconfig')['gopls'].setup {
|
|
||||||
|
vim.lsp.config('*', {
|
||||||
|
on_attach = on_attach,
|
||||||
|
capabilities = capabilities,
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.lsp.config('gopls', {
|
||||||
settings = {
|
settings = {
|
||||||
gopls = {
|
gopls = {
|
||||||
templateExtensions = { 'gotmpl', 'gohtml' },
|
templateExtensions = { 'gotmpl', 'gohtml' },
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
filetypes = { "go", "gomod", "gowork", "gotmpl", "gohtml", "gohtmltmpl" },
|
filetypes = { "go", "gomod", "gowork", "gotmpl", "gohtml", "gohtmltmpl" },
|
||||||
on_attach = on_attach,
|
})
|
||||||
capabilities = capabilities,
|
|
||||||
}
|
vim.lsp.config('clangd', {
|
||||||
require('lspconfig')['pyright'].setup {
|
-- default filetypes excluding proto
|
||||||
on_attach = on_attach,
|
|
||||||
capabilities = capabilities,
|
|
||||||
}
|
|
||||||
require('lspconfig')['tsserver'].setup {
|
|
||||||
on_attach = on_attach,
|
|
||||||
capabilities = capabilities,
|
|
||||||
}
|
|
||||||
require('lspconfig')['clangd'].setup {
|
|
||||||
on_attach = on_attach,
|
|
||||||
capabilities = capabilities,
|
|
||||||
-- This is the default list of filetypes excluding proto
|
|
||||||
-- https://github.com/neovim/nvim-lspconfig/blob/0ef64599b8aa0187ee5f6d92cb39c951f348f041/lua/lspconfig/server_configurations/clangd.lua#L70C5-L70C66
|
-- https://github.com/neovim/nvim-lspconfig/blob/0ef64599b8aa0187ee5f6d92cb39c951f348f041/lua/lspconfig/server_configurations/clangd.lua#L70C5-L70C66
|
||||||
filetypes = { 'c', 'cpp', 'objc', 'objcpp', 'cuda' }
|
filetypes = { 'c', 'cpp', 'objc', 'objcpp', 'cuda' }
|
||||||
}
|
})
|
||||||
require('lspconfig')['rust_analyzer'].setup {
|
|
||||||
on_attach = on_attach,
|
vim.lsp.config('lua_ls', {
|
||||||
capabilities = capabilities,
|
|
||||||
}
|
|
||||||
require('lspconfig')['bashls'].setup {
|
|
||||||
on_attach = on_attach,
|
|
||||||
capabilities = capabilities,
|
|
||||||
}
|
|
||||||
require('lspconfig')['bzl'].setup {
|
|
||||||
on_attach = on_attach,
|
|
||||||
capabilities = capabilities,
|
|
||||||
}
|
|
||||||
require('lspconfig')['cmake'].setup {
|
|
||||||
on_attach = on_attach,
|
|
||||||
capabilities = capabilities,
|
|
||||||
}
|
|
||||||
require('lspconfig')['lua_ls'].setup {
|
|
||||||
on_attach = on_attach,
|
|
||||||
capabilities = capabilities,
|
|
||||||
on_init = function(client)
|
on_init = function(client)
|
||||||
local path = client.workspace_folders[1].name
|
local path = client.workspace_folders[1].name
|
||||||
if (vim.uv or vim.loop).fs_stat(path .. '/.luarc.json') or (vim.uv or vim.loop).fs_stat(path .. '/.luarc.jsonc') then
|
if (vim.uv or vim.loop).fs_stat(path .. '/.luarc.json') or (vim.uv or vim.loop).fs_stat(path .. '/.luarc.jsonc') then
|
||||||
@@ -80,39 +52,40 @@ require('lspconfig')['lua_ls'].setup {
|
|||||||
|
|
||||||
client.config.settings.Lua = vim.tbl_deep_extend('force', client.config.settings.Lua, {
|
client.config.settings.Lua = vim.tbl_deep_extend('force', client.config.settings.Lua, {
|
||||||
runtime = {
|
runtime = {
|
||||||
-- Tell the language server which version of Lua you're using
|
|
||||||
-- (most likely LuaJIT in the case of Neovim)
|
|
||||||
version = 'LuaJIT'
|
version = 'LuaJIT'
|
||||||
},
|
},
|
||||||
-- Make the server aware of Neovim runtime files
|
|
||||||
workspace = {
|
workspace = {
|
||||||
checkThirdParty = false,
|
checkThirdParty = false,
|
||||||
library = {
|
library = {
|
||||||
vim.env.VIMRUNTIME
|
vim.env.VIMRUNTIME
|
||||||
-- Depending on the usage, you might want to add additional paths here.
|
|
||||||
-- "${3rd}/luv/library"
|
|
||||||
-- "${3rd}/busted/library",
|
|
||||||
}
|
}
|
||||||
-- or pull in all of 'runtimepath'. NOTE: this is a lot slower
|
|
||||||
-- library = vim.api.nvim_get_runtime_file("", true)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
settings = {
|
settings = {
|
||||||
Lua = {}
|
Lua = {}
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
require('lspconfig')['zls'].setup {
|
|
||||||
on_attach = on_attach,
|
vim.lsp.config('zls', {
|
||||||
capabilities = capabilities,
|
|
||||||
cmd = { '/home/jacob/src/github.com/zigtools/zls/zig-out/bin/zls' },
|
cmd = { '/home/jacob/src/github.com/zigtools/zls/zig-out/bin/zls' },
|
||||||
settings = {
|
settings = {
|
||||||
zls = {
|
zls = {
|
||||||
zig_exe_path = '/home/jacob/.zig/zig/zig',
|
zig_exe_path = '/home/jacob/.zig/zig/zig',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
require('lspconfig')['protols'].setup{
|
|
||||||
on_attach = on_attach,
|
vim.lsp.enable({
|
||||||
capabilities = capabilities,
|
'gopls',
|
||||||
}
|
'pyright',
|
||||||
|
'ts_ls',
|
||||||
|
'clangd',
|
||||||
|
'rust_analyzer',
|
||||||
|
'bashls',
|
||||||
|
'bzl',
|
||||||
|
'cmake',
|
||||||
|
'lua_ls',
|
||||||
|
'zls',
|
||||||
|
'protols',
|
||||||
|
})
|
||||||
|
|||||||
@@ -70,4 +70,8 @@ function gclone () {
|
|||||||
eval $(gitclone.sh $1)
|
eval $(gitclone.sh $1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
alias sz='source $HOME/.zshrc'
|
||||||
|
|
||||||
eval "$(starship init zsh)"
|
eval "$(starship init zsh)"
|
||||||
|
|
||||||
|
. "$HOME/.local/share/../bin/env"
|
||||||
|
|||||||
113
zsh/config.d/solo.zsh
Normal file
113
zsh/config.d/solo.zsh
Normal file
@@ -0,0 +1,113 @@
|
|||||||
|
SOLO_DIR="$HOME/src/github.com/solo-io"
|
||||||
|
SOLO_GITHUB="https://github.com/solo-io"
|
||||||
|
|
||||||
|
SOLO_REPOS=(
|
||||||
|
"gloo"
|
||||||
|
"gloo-gateway"
|
||||||
|
"gloo-fed"
|
||||||
|
"solo-projects"
|
||||||
|
"solo-apis"
|
||||||
|
"solo-kit"
|
||||||
|
"dev-portal"
|
||||||
|
"gloo-mesh"
|
||||||
|
"gloo-mesh-ui"
|
||||||
|
"gloo-mesh-enterprise"
|
||||||
|
"ext-auth-service"
|
||||||
|
"rate-limiter"
|
||||||
|
"caching-service"
|
||||||
|
"envoy-gloo-ee"
|
||||||
|
"agentgateway-enterprise"
|
||||||
|
)
|
||||||
|
|
||||||
|
AGW_DIR="$HOME/src/github.com/agentgateway"
|
||||||
|
AGW_GITHUB="https://github.com/agentgateway"
|
||||||
|
|
||||||
|
AGW_REPOS=(
|
||||||
|
"agentgateway"
|
||||||
|
)
|
||||||
|
|
||||||
|
KGW_DIR="$HOME/src/github.com/kgateway-dev"
|
||||||
|
KGW_GITHUB="https://github.com/kgateway-dev"
|
||||||
|
|
||||||
|
KGW_REPOS=(
|
||||||
|
"kgateway"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
mkdir -p $SOLO_DIR $AGW_DIR $KGW_DIR
|
||||||
|
|
||||||
|
# Used to generalize the git clone loop for different orgs
|
||||||
|
# Don't mind the fuckery that claude found for passing the
|
||||||
|
# repos arrays as namerefs
|
||||||
|
#
|
||||||
|
# Pass the following arguments
|
||||||
|
# 1: github as should be defined in above
|
||||||
|
# 2: dir as should be defined in above
|
||||||
|
# 3: repos arr as should be defined above
|
||||||
|
function clone_repos() {
|
||||||
|
local gh="${1}"
|
||||||
|
local dir="${2}"
|
||||||
|
local -a repos=("${(@P)3}")
|
||||||
|
|
||||||
|
for repo in "${repos[@]}"
|
||||||
|
do
|
||||||
|
local repo_addr="${gh}/${repo}"
|
||||||
|
local repo_dir="${dir}/${repo}"
|
||||||
|
|
||||||
|
if [[ ! -d $repo_dir ]]; then
|
||||||
|
pushd $dir
|
||||||
|
git clone $repo_addr
|
||||||
|
popd
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
clone_repos "${SOLO_GITHUB}" "${SOLO_DIR}" SOLO_REPOS
|
||||||
|
clone_repos "${KGW_GITHUB}" "${KGW_DIR}" KGW_REPOS
|
||||||
|
clone_repos "${AGW_GITHUB}" "${AGW_DIR}" AGW_REPOS
|
||||||
|
|
||||||
|
function nvim_readme() {
|
||||||
|
nvim ./README.md
|
||||||
|
}
|
||||||
|
|
||||||
|
# Aliases to reach different repos
|
||||||
|
alias cdsi='cd $SOLO_DIR'
|
||||||
|
alias cdg='cd $SOLO_DIR/gloo'
|
||||||
|
alias nvg='cdg && nvim_readme'
|
||||||
|
alias cdgf='cd $SOLO_DIR/gloo-fed'
|
||||||
|
alias nvgf='cdgf && nvim_readme'
|
||||||
|
alias cdsp='cd $SOLO_DIR/solo-projects'
|
||||||
|
alias nvsp='cdsp && nvim_readme'
|
||||||
|
alias cdsa='cd $SOLO_DIR/solo-apis'
|
||||||
|
alias nvsa='cdsa && nvim_readme'
|
||||||
|
alias cdsk='cd $SOLO_DIR/solo-kit'
|
||||||
|
alias nvsk='cdsk && nvim_readme'
|
||||||
|
alias cddp='cd $SOLO_DIR/dev-portal'
|
||||||
|
alias nvdp='cddp && nvim_readme'
|
||||||
|
alias cdgm='cd $SOLO_DIR/gloo-mesh'
|
||||||
|
alias nvgm='cdgm && nvim_readme'
|
||||||
|
alias cdgmui='cd $SOLO_DIR/gloo-mesh-ui'
|
||||||
|
alias nvgmui='cdgmui && nvim_readme'
|
||||||
|
alias cdgme='cd $SOLO_DIR/gloo-mesh-enterprise'
|
||||||
|
alias nvgme='cdgme && nvim_readme'
|
||||||
|
alias cdea='cd $SOLO_DIR/ext-auth-service'
|
||||||
|
alias nvea='cdea && nvim_readme'
|
||||||
|
alias cdrl='cd $SOLO_DIR/rate-limiter'
|
||||||
|
alias nvrl='cdrl && nvim_readme'
|
||||||
|
alias cdcs='cd $SOLO_DIR/caching-service'
|
||||||
|
alias nvcs='cdcs && nvim_readme'
|
||||||
|
alias cdeg='cd $SOLO_DIR/envoy-gloo'
|
||||||
|
alias nveg='cdeg && nvim_readme'
|
||||||
|
alias cdee='cd $SOLO_DIR/envoy-gloo-ee'
|
||||||
|
alias nvee='cdee && nvim_readme'
|
||||||
|
alias cde='cd $SOLO_DIR/../envoyproxy/envoy'
|
||||||
|
alias nve='cde && nvim_readme'
|
||||||
|
alias cdgg='cd $SOLO_DIR/gloo-gateway'
|
||||||
|
alias nvgg='cdgg && nvim_readme'
|
||||||
|
alias cdagw='cd $AGW_DIR/agentgateway'
|
||||||
|
alias nvagw='cdagw && nvim_readme'
|
||||||
|
alias cdagwe='cd $SOLO_DIR/agentgateway-enterprise'
|
||||||
|
alias nvagwe='cdagwe && nvim_readme'
|
||||||
|
alias cdkgw='cd $KGW_DIR/kgateway'
|
||||||
|
alias nvkgw='cdkgw && nvim_readme'
|
||||||
|
|
||||||
@@ -5,7 +5,7 @@ url=$1
|
|||||||
# make sure we have a valid git url. only works with http/s
|
# make sure we have a valid git url. only works with http/s
|
||||||
regex='^https?://[^/]+/[^/]+/[^/]+(\.git)?$'
|
regex='^https?://[^/]+/[^/]+/[^/]+(\.git)?$'
|
||||||
|
|
||||||
if [[ ! $"url" =~ $regex ]]; then
|
if [[ ! "$url" =~ $regex ]]; then
|
||||||
echo "echo \"$url does not match regex\""
|
echo "echo \"$url does not match regex\""
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user