Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions fish/conf.d/12-brew-shellenv.fish
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
# Initialize brew environments if available (more complete than just PATH)
if test -x /home/linuxbrew/.linuxbrew/bin/brew
eval (/home/linuxbrew/.linuxbrew/bin/brew shellenv)
else if test -x /opt/homebrew/bin/brew
eval (/opt/homebrew/bin/brew shellenv)
# Initialize brew environment variables (but avoid path_helper which reorders PATH)
# On macOS, brew shellenv calls path_helper which puts /usr/bin before mise paths
if test -x /opt/homebrew/bin/brew
set -gx HOMEBREW_PREFIX /opt/homebrew
set -gx HOMEBREW_CELLAR /opt/homebrew/Cellar
set -gx HOMEBREW_REPOSITORY /opt/homebrew
fish_add_path -g /opt/homebrew/bin /opt/homebrew/sbin
else if test -x /usr/local/bin/brew
eval (/usr/local/bin/brew shellenv)
set -gx HOMEBREW_PREFIX /usr/local
set -gx HOMEBREW_CELLAR /usr/local/Cellar
set -gx HOMEBREW_REPOSITORY /usr/local
fish_add_path -g /usr/local/bin /usr/local/sbin
else if test -x /home/linuxbrew/.linuxbrew/bin/brew
set -gx HOMEBREW_PREFIX /home/linuxbrew/.linuxbrew
set -gx HOMEBREW_CELLAR /home/linuxbrew/.linuxbrew/Cellar
set -gx HOMEBREW_REPOSITORY /home/linuxbrew/.linuxbrew
fish_add_path -g /home/linuxbrew/.linuxbrew/bin
end
5 changes: 1 addition & 4 deletions fish/conf.d/52-mise.fish
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
# mise activation
if command -q mise
mise activate fish | source
end
# mise activation moved to config.fish to run after all PATH setup
6 changes: 6 additions & 0 deletions fish/config.fish
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ if status is-interactive
if test -d /workspaces
__fish_reconstruct_path
end

# Prompt and tools that hook into the interactive shell
starship init fish | source
zoxide init fish | source
Expand All @@ -21,4 +22,9 @@ if status is-interactive

# Optional extra plugin
command -q pay-respects; and pay-respects fish | source

# Initialize mise for interactive shells
if command -q mise
mise activate fish | source
end
end
4 changes: 4 additions & 0 deletions nvim/lua/plugins/conform.lua
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ return {
shfmt = {
prepend_args = { "-i", "2" },
},
-- Use system rubocop (from mise) instead of Mason's version
rubocop = {
command = "rubocop",
},
},
},
init = function()
Expand Down
81 changes: 43 additions & 38 deletions nvim/lua/plugins/mason.lua
Original file line number Diff line number Diff line change
@@ -1,45 +1,20 @@
return {
"williamboman/mason-lspconfig.nvim",
event = { "BufReadPre", "BufNewFile" },
lazy = true,
cmd = { "Mason", "MasonInstall", "MasonUpdate" },
build = ":MasonUpdate",
dependencies = {
{
"williamboman/mason.nvim",
dependencies = {
"WhoIsSethDaniel/mason-tool-installer.nvim",
},
config = function()
require("mason").setup()
local mason_tool_installer = require("mason-tool-installer")
mason_tool_installer.setup({
ensure_installed = {
"delve",
"eslint-lsp",
"eslint_d",
"goimports",
"golangci-lint",
"gopls",
"isort",
"jq-lsp",
"jsonlint",
"json-lsp",
"luacheck",
"lua-language-server",
"prettierd",
"prettier",
"rubocop",
"ruby_lsp",
"sorbet",
"shellcheck",
"stylelint-lsp",
"stylua",
"tailwindcss-language-server",
"typescript-language-server",
"vale",
"vale_ls",
"yaml-language-server",
require("mason").setup({
ui = {
icons = {
package_installed = "✓",
package_pending = "➜",
package_uninstalled = "✗",
},
},
debounce_hours = 96,
})
end,
},
Expand All @@ -57,6 +32,7 @@ return {
ensure_installed = {
"delve",
},
automatic_installation = true,
})
require("dap-go").setup()
require("dapui").setup()
Expand Down Expand Up @@ -129,15 +105,44 @@ return {
},
config = function()
require("mason-lspconfig").setup({
automatic_installation = true,
automatic_enable = false,
automatic_installation = false,
ensure_installed = {
-- Language servers
"ts_ls",
"lua_ls",
"ruby_lsp",
"gopls",
"sorbet",
"eslint",
"jsonls",
"yamlls",
"jqls",
"vale_ls",
"tailwindcss",
"stylelint_lsp",
},
})

-- Auto-install formatters/linters via Mason registry on first load
local registry = require("mason-registry")
local tools = {
"delve",
"eslint_d",
"goimports",
"golangci-lint",
"isort",
"jsonlint",
"luacheck",
"prettierd",
"prettier",
"shellcheck",
"stylua",
"vale",
}

for _, tool in ipairs(tools) do
local p = registry.get_package(tool)
if not p:is_installed() then
p:install()
end
end
end,
}
3 changes: 3 additions & 0 deletions nvim/lua/plugins/nvim-lint.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ return {
typescriptreact = { "eslint_d" },
}

-- Use system rubocop (from mise) instead of Mason's version
lint.linters.rubocop.cmd = "rubocop"

local lint_augroup = vim.api.nvim_create_augroup("lint", { clear = true })

vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "InsertLeave" }, {
Expand Down
7 changes: 6 additions & 1 deletion nvim/lua/plugins/nvim-lspconfig.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
return {
"neovim/nvim-lspconfig",
dependencies = { "nvim-tree/nvim-web-devicons", "folke/trouble.nvim", "saghen/blink.cmp" },
dependencies = {
"nvim-tree/nvim-web-devicons",
"folke/trouble.nvim",
"saghen/blink.cmp",
"williamboman/mason-lspconfig.nvim",
},
event = "VeryLazy",

config = function()
Expand Down
1 change: 0 additions & 1 deletion nvim/lua/plugins/nvim-naic.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ return {
},
preference = {
"sorbet",
"ruby_lsp",
"lua_ls",
"gopls",
"tsserver",
Expand Down
7 changes: 4 additions & 3 deletions tmux/tmux.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ unbind ^b
bind a send-prefix
set -g base-index 1
set-option -g default-terminal 'tmux-256color'
# Start fish in non-login mode to avoid macOS path_helper reshuffling PATH
set -g default-command /opt/homebrew/bin/fish
set-option -sa terminal-features ',xterm*:RGB'
set-option -sa terminal-features ',xterm*:Tc'
set-option -g status-position top
Expand All @@ -17,6 +19,7 @@ set -g allow-passthrough on

set -ga update-environment TERM
set -ga update-environment TERM_PROGRAM
set -ga update-environment PATH
set -s set-clipboard on

# =================== Mouse ========================
Expand Down Expand Up @@ -102,6 +105,4 @@ set -g status-style "bg=terminal"

setw -g mode-keys vi

if-shell '[ $(uname -s) = Linux ]' {
set -g default-command 'fish'
}