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

View File

@@ -1,5 +1,10 @@
# tmux.conf — vim-style keybindings # tmux.conf — vim-style keybindings
# Prefix
set -g prefix C-Space
unbind C-b
bind C-Space send-prefix
# Splits # Splits
unbind '"' unbind '"'
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' },
}