Add work nvim language pack, switch tmux prefix to Ctrl-Space

Work language support (C#, TS, JS, CSS, HTML, Prettier) is now gated
behind a stow-loaded work-languages.lua module so it only activates
when the work package is stowed. Tmux prefix changed from Ctrl-b to
Ctrl-Space to match the neovim Space-leader feel.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-22 09:52:33 -04:00
parent 5c334a8b74
commit 6a58f82501
3 changed files with 45 additions and 27 deletions

View File

@@ -5,6 +5,10 @@ vim.g.mapleader = ' '
vim.g.maplocalleader = '\\' -- vimtex uses \ll, \lv, etc.
vim.g.have_nerd_font = true
-- Load work-language extras when the work stow package is active
local _work = {}
pcall(function() _work = require('work-languages') end)
-------------------------------------------------------------------------------
-- Options
-------------------------------------------------------------------------------
@@ -258,12 +262,11 @@ require('lazy').setup({
build = ':TSUpdate',
main = 'nvim-treesitter.configs',
opts = {
ensure_installed = {
'bash', 'c', 'cpp', 'css', 'go', 'html', 'javascript',
'json', 'lua', 'luadoc', 'markdown', 'markdown_inline',
'rust', 'tsx', 'typescript', 'vim', 'vimdoc', 'yaml', 'latex',
'c_sharp',
},
ensure_installed = vim.list_extend(
{ 'bash', 'c', 'cpp', 'go', 'json', 'lua', 'luadoc', 'markdown',
'markdown_inline', 'rust', 'vim', 'vimdoc', 'yaml', 'latex' },
_work.parsers or {}
),
auto_install = true,
highlight = { enable = true },
indent = { enable = true },
@@ -376,20 +379,13 @@ require('lazy').setup({
},
},
opts = {
formatters_by_ft = {
lua = { 'stylua' },
go = { 'goimports', 'gofmt' },
rust = { 'rustfmt' },
c = { 'clang_format' },
cpp = { 'clang_format' },
javascript = { 'prettier' },
javascriptreact = { 'prettier' },
typescript = { 'prettier' },
typescriptreact = { 'prettier' },
css = { 'prettier' },
html = { 'prettier' },
json = { 'prettier' },
},
formatters_by_ft = vim.tbl_extend('force', {
lua = { 'stylua' },
go = { 'goimports', 'gofmt' },
rust = { 'rustfmt' },
c = { 'clang_format' },
cpp = { 'clang_format' },
}, _work.formatters or {}),
format_on_save = { timeout_ms = 500, lsp_fallback = true },
},
},
@@ -457,14 +453,10 @@ require('lazy').setup({
require('cmp_nvim_lsp').default_capabilities()
)
local servers = {
local servers = vim.tbl_extend('force', {
clangd = {},
gopls = {},
rust_analyzer = {},
ts_ls = {},
cssls = {},
html = {},
csharp_ls = {},
lua_ls = {
settings = {
Lua = {
@@ -477,10 +469,10 @@ require('lazy').setup({
},
},
},
}
}, _work.servers or {})
require('mason-tool-installer').setup({
ensure_installed = { 'stylua', 'prettier', 'clang-format' },
ensure_installed = vim.list_extend({ 'stylua', 'clang-format' }, _work.tools or {}),
})
require('mason-lspconfig').setup({

View File

@@ -1,5 +1,10 @@
# tmux.conf — vim-style keybindings
# Prefix
set -g prefix C-Space
unbind C-b
bind C-Space send-prefix
# Splits
unbind '"'
unbind %

View File

@@ -0,0 +1,21 @@
-- Loaded by init.lua when this file exists (work stow package active).
-- Mirrors work-dev-settings.el: C#, TypeScript, JavaScript, CSS, HTML + Prettier.
return {
servers = {
ts_ls = {}, -- handles TypeScript, TSX, JavaScript, JSX
cssls = {},
html = {},
csharp_ls = {},
},
parsers = { 'c_sharp', 'css', 'html', 'javascript', 'tsx', 'typescript' },
formatters = {
javascript = { 'prettier' },
javascriptreact = { 'prettier' },
typescript = { 'prettier' },
typescriptreact = { 'prettier' },
css = { 'prettier' },
html = { 'prettier' },
json = { 'prettier' },
},
tools = { 'prettier' },
}