Skip to content

Commit

Permalink
accumulated changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ajjahn committed Jan 23, 2025
1 parent cdd3db5 commit edea47c
Show file tree
Hide file tree
Showing 13 changed files with 2,441 additions and 414 deletions.
15 changes: 10 additions & 5 deletions Brewfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
# frozen_string_literal: true

# vi:ft=ruby:
tap "homebrew/cask"
tap "homebrew/services"
tap "thoughtbot/formulae"
tap "universal-ctags/universal-ctags"
tap "aws/tap"
tap "autozimu/homebrew-formulas"
tap "homebrew/cask-versions"

# Utils
brew "ag"
Expand All @@ -18,11 +17,14 @@ brew "direnv"
brew "efm-langserver"
brew "elixir"
brew "entr"
brew "exa"
brew "eza"
brew "wyne/tap/fasder"
brew "fd"
brew "ffmpeg"
brew "ffmpegthumbnailer"
brew "fish"
brew "fzf"
brew "gh"
# brew "gdb" not available on apple silicon
brew "git"
brew "gnupg"
Expand All @@ -35,10 +37,11 @@ brew "imagemagick"
brew "jq"
brew "lima"
brew "lua-language-server"
brew "neovim", args: %w[HEAD]
brew "neovim"
brew "node"
brew "pinentry-mac"
brew "pyenv"
brew "qemu"
brew "rbenv"
brew "rcm"
brew "reattach-to-user-namespace"
Expand All @@ -51,7 +54,7 @@ brew "tldr"
brew "tmux"
brew "tree"
brew "unison"
brew "unison-fsmonitor"
brew "autozimu/homebrew-formulas/unison-fsmonitor"
brew "universal-ctags"
brew "watch"
brew "wget"
Expand All @@ -60,6 +63,8 @@ brew "yarn"
brew "youtube-dl"
brew "yq"
brew "zlib"
brew "colima"
brew "docker"

# Garbage Heap?
# brew "awscli"
Expand Down
2,750 changes: 2,376 additions & 374 deletions Brewfile.lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions config/gh/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ aliases:
http_unix_socket:
# What web browser gh should use when opening URLs. If blank, will refer to environment.
browser:
version: "1"
6 changes: 3 additions & 3 deletions config/nvim/init.vim
Original file line number Diff line number Diff line change
Expand Up @@ -229,10 +229,10 @@ let g:EnhCommentifyRespectIndent = 'Yes'
let g:EnhCommentifyUseBlockIndent = 'Yes'

" Open NERD Tree
map <F10> :NERDTreeToggle<CR>
map - :NERDTreeToggle<CR>
"map <F10> :NERDTreeToggle<CR>
"map - :NERDTreeToggle<CR>

let NERDTreeIgnore=['\.pyc$', '__pycache__']
"let NERDTreeIgnore=['\.pyc$', '__pycache__']

" convert hash rockets
nmap <leader>rh :%s/\v:(\w+) \=\>/\1:/g<cr>1
Expand Down
3 changes: 0 additions & 3 deletions config/nvim/lua/_colors.lua
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
local vim = vim

-- local active_buffer_bg = "#2E373D"

vim.cmd [[set background=dark]]
vim.cmd [[let g:everforest_background = 'soft']]
vim.cmd [[let g:everforest_enable_italic = 1]]
vim.cmd [[let g:everforest_dim_inactive_windows = 1]]
vim.cmd [[
let g:everforest_colors_override = {'bg0': ['#2E373D', '235']}
]]
-- vim.cmd[[let g:everforest_ui_contrast = 'high']]
vim.cmd [[colorscheme everforest]]
3 changes: 0 additions & 3 deletions config/nvim/lua/_completion.lua
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,6 @@ cmp.setup({

sources = cmp.config.sources({
{ name = 'nvim_lsp' },
{ name = 'vsnip' },
{ name = 'calc' },
-- { name = 'tmux' },
}, {
{ name = 'buffer' },
})
Expand Down
42 changes: 23 additions & 19 deletions config/nvim/lua/_lsp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ local capabilities = require('cmp_nvim_lsp').default_capabilities()
-- 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)
-- https://github.com/redhat-developer/yaml-language-server/issues/486#issuecomment-1046792026
if client.name == "yamlls" then
client.resolved_capabilities.document_formatting = true
end

-- Enable completion triggered by <c-x><c-o>
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')

Expand Down Expand Up @@ -46,10 +51,11 @@ local servers = {
"dockerls",
"gopls",
"html",
"jsonls",
"lua_ls",
"sourcekit",
"taplo",
"tsserver",
"ts_ls",
"yamlls",
-- "graphql",
}
Expand All @@ -60,7 +66,7 @@ end
require('lspconfig').rust_analyzer.setup {
capabilities = capabilities,
on_attach = on_attach,
cmd = { "rustup", "run", "nightly", "rust-analyzer" },
-- cmd = { "rustup", "run", "nightly", "rust-analyzer" },
settings = {
['rust-analyzer'] = {
check = {
Expand Down Expand Up @@ -95,7 +101,7 @@ require('lspconfig').solargraph.setup({
require 'lspconfig'.elixirls.setup {
capabilities = capabilities,
on_attach = on_attach,
cmd = { "elixir-ls" };
cmd = { "elixir-ls" },
}
-- Python
local home = os.getenv("HOME")
Expand All @@ -112,14 +118,12 @@ require('lspconfig').pyright.setup({
})


local black = {
formatCommand = "black --fast -",
formatStdin = true,
}
local isort = {
formatCommand = "isort --stdout --profile black -",
formatStdin = true,
}
require('lspconfig').ruff.setup({
init_options = { documentFormatting = true },
capabilities = capabilities,
on_attach = on_attach,
})


local shfmt = {
formatCommand = "shfmt -ci -s -bn -i 2",
Expand All @@ -136,26 +140,26 @@ require("lspconfig").efm.setup {
settings = {
rootMarkers = { ".git/" },
languages = {
python = { black },
zsh = { shfmt },
bash = { shfmt },
sh = { shfmt },
}
},
filetypes = { 'python', 'sh', 'bash' }
filetypes = { 'zsh', 'sh', 'bash' }
}



vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(
vim.lsp.diagnostic.on_publish_diagnostics, {
underline = true,
underline = true,

-- Enable/Disable virtual text diagnostics
virtual_text = true,
-- Enable/Disable virtual text diagnostics
virtual_text = true,

signs = true,
update_in_insert = false,
}
signs = true,
update_in_insert = false,
}
)

vim.fn.sign_define("LspDiagnosticsSignError", { text = "!!" })
Expand Down
22 changes: 18 additions & 4 deletions config/nvim/lua/_telescope.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ require('telescope').setup {
'--with-filename',
'--line-number',
'--column',
'--smart-case'
'--smart-case',
'--trim'
},
prompt_position = "bottom",
prompt_prefix = "> ",
Expand All @@ -27,9 +28,9 @@ require('telescope').setup {
mirror = false,
},
},
file_sorter = require 'telescope.sorters'.get_fuzzy_file,
-- file_sorter = require 'telescope.sorters'.get_fuzzy_file,
file_ignore_patterns = {},
generic_sorter = require 'telescope.sorters'.get_generic_fuzzy_sorter,
-- generic_sorter = require 'telescope.sorters'.get_generic_fuzzy_sorter,
shorten_path = true,
winblend = 0,
width = 0.75,
Expand Down Expand Up @@ -63,6 +64,13 @@ require('telescope').setup {
override_generic_sorter = false,
override_file_sorter = true,
},
fzf = {
fuzzy = false, -- false will only do exact matching
override_generic_sorter = true, -- override the generic sorter
override_file_sorter = true, -- override the file sorter
case_mode = "smart_case", -- or "ignore_case" or "respect_case"
-- the default case_mode is "smart_case"
}
},
}

Expand All @@ -85,8 +93,14 @@ M.git_branches = function()
end

local map = vim.api.nvim_set_keymap

local opts = { noremap = true, silent = true }

-- map('n', '<space>', "<CMD>lua require('telescope.builtin').resume()<CR>", opts)

map('n', '<space>jl', "<CMD>lua require('telescope.builtin').jumplist()<CR>", opts)
map('n', '<space>qf', "<CMD>lua require('telescope.builtin').quickfix()<CR>", opts)
map('n', '<space>reg', "<CMD>lua require('telescope.builtin').registers()<CR>", opts)

map('n', '<c-p>', "<CMD>lua require('_telescope').project_files()<CR>", opts)
map('n', 'K', "<CMD>lua require('telescope.builtin').grep_string()<CR>", opts)
map('n', '<c-g>', "<CMD>lua require('telescope.builtin').live_grep()<CR>", opts)
Expand Down
2 changes: 1 addition & 1 deletion config/nvim/lua/_trouble.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ require("trouble").setup {
-- or leave it empty to use the default settings
-- refer to the configuration section below
}
vim.keymap.set("n", "gh", "<cmd>TroubleToggle document_diagnostics<cr>",
vim.keymap.set("n", "gh", "<cmd>Trouble diagnostics toggle filter.buf=0<cr>",
{ silent = true, noremap = true }
)
5 changes: 5 additions & 0 deletions gitconfig
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,8 @@
defaultBranch = main
[hub]
protocol = ssh
[rerere]
enabled = true
autoUpdate = true
[branch]
sort = -committerdate
2 changes: 2 additions & 0 deletions install/python-packages
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ PACKAGES=(
pylsp-mypy
black
isort
pyright
ruff
)

pip3 install "${PACKAGES[@]}"
2 changes: 1 addition & 1 deletion sources/ls
Original file line number Diff line number Diff line change
@@ -1 +1 @@
alias ls=exa
alias ls="eza"
2 changes: 1 addition & 1 deletion zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@ for f in ~/.sources/**/*; do
. $f
done

if command -v tmux &> /dev/null && [ -n "$PS1" ] && [[ ! "$TERM" =~ screen ]] && [[ ! "$TERM" =~ tmux ]] && [ -z "$TMUX" ]; then
if command -v tmux &>/dev/null && [ -n "$PS1" ] && [[ ! $TERM =~ screen ]] && [[ ! $TERM =~ tmux ]] && [ -z "$TMUX" ]; then
exec tmux new-session -A -s main
fi

0 comments on commit edea47c

Please sign in to comment.