feat(nvim): add LaTeX workflow; tweak Hyprland master; refresh CS autoexec; add GTK bookmark

Neovim (LaTeX):
- Add TeX ftplugin: spell (en_US,de_DE), soft-wrap + linebreak, conceal=2, no hard wrap
- Add plugins: vimtex (zathura; latexmk with LuaLaTeX + shell-escape),
  LTeX language server via astrolsp + ltex_extra (check on save; motherTongue=de-DE),
  blink.cmp integration (cmp-vimtex, cmp-latex-symbols → insert macros),
  LuaSnip LaTeX snippets, Treesitter “latex”, nabla.nvim (inline/popup math; <leader>mp/<leader>mv)

Hyprland:
- Set master.orientation=left; comment out center_master_* options

Counter-Strike autoexec:
- Rebind +lookatweapon → MOUSE5; map R → lastinv; radio on Y/U/I/H; J → +radialradio
- Crosshair tweaks: size 2.5, gap -3, no outline, alpha off
- Mouse: sensitivity 0.619; zoom_sensitivity_ratio 1.0
- Viewmodel: offset_x -2; cl_prefer_lefthanded 0
- Video/perf: gamma 1.6; set fps_max/fps_max_ui 0; drop legacy perf/network cvars (mat_queue_mode, cl_forcepreload, rate/interp*)
- HUD cleanup: disable target ID; remove +cl_show_team_equipment

GTK:
- Add bookmark: Documents/ttrpg/dsa5
This commit is contained in:
2025-11-12 17:00:08 +01:00
parent 725dfbb3fe
commit 3882349c80
10 changed files with 199 additions and 38 deletions

View File

@@ -7,3 +7,4 @@ file:///home/mpuchstein/Music
file:///home/mpuchstein/Nextcloud file:///home/mpuchstein/Nextcloud
file:///home/mpuchstein/Downloads file:///home/mpuchstein/Downloads
file:///home/mpuchstein/Documents/uni/ss25/AD/Vorlesung Vorlesung file:///home/mpuchstein/Documents/uni/ss25/AD/Vorlesung Vorlesung
file:///home/mpuchstein/Documents/ttrpg/dsa5 dsa5

View File

@@ -152,9 +152,9 @@ dwindle {
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
master { master {
orientation = center orientation = left
center_master_fallback = left # center_master_fallback = left
slave_count_for_center_master = 4 # slave_count_for_center_master = 4
mfact = 0.60 mfact = 0.60
new_status = slave new_status = slave
new_on_top = true new_on_top = true

View File

@@ -0,0 +1,9 @@
-- Spell-check (tweak languages to your needs)
vim.opt_local.spell = true
vim.opt_local.spelllang = { "en_us", "de_de" }
-- Niceties for prose/math
vim.opt_local.wrap = true
vim.opt_local.linebreak = true
vim.opt_local.conceallevel = 2 -- vimtex has sensible conceal defaults
vim.opt_local.textwidth = 0 -- don't hard-wrap LaTeX

View File

@@ -0,0 +1,39 @@
return {
-- Let blink.cmp consume nvim-cmp sources
{ "saghen/blink.compat", version = "2.*", lazy = true, opts = {} },
-- Add vimtex + latex symbol sources to blink.cmp
{
"Saghen/blink.cmp",
optional = true,
dependencies = {
"micangl/cmp-vimtex", -- environments, \cite, \ref, etc. via vimtex
"kdheepak/cmp-latex-symbols", -- math symbols via LaTeX macros
},
opts = function(_, opts)
opts.sources = opts.sources or {}
opts.sources.providers = opts.sources.providers or {}
opts.sources.default = opts.sources.default or { "lsp", "path", "snippets", "buffer" }
-- Only turn on the LaTeX sources for TeX filetypes
opts.sources.per_filetype = vim.tbl_deep_extend("force", opts.sources.per_filetype or {}, {
tex = { inherit_defaults = true, "vimtex", "latex_symbols" },
plaintex = { inherit_defaults = true, "vimtex", "latex_symbols" },
})
-- Expose nvim-cmp sources to blink via blink.compat
opts.sources.providers.vimtex = {
name = "vimtex",
module = "blink.compat.source",
}
opts.sources.providers.latex_symbols = {
name = "latex_symbols",
module = "blink.compat.source",
-- Insert LaTeX commands (e.g. \alpha) instead of Unicode characters:
opts = { strategy = 2 }, -- documented in cmp-latex-symbols README
score_offset = -2, -- keep it below LSP/snippets in relevance
}
return opts
end,
},
}

View File

@@ -0,0 +1,17 @@
-- Gilles Castel-style LaTeX snippets for LuaSnip
return {
-- Make sure autosnippets are enabled globally
{
"L3MON4D3/LuaSnip",
opts = function(_, _) require("luasnip").config.setup { enable_autosnippets = true } end,
},
-- The LaTeX snippets themselves
{
"iurimateus/luasnip-latex-snippets.nvim",
ft = { "tex", "plaintex", "markdown" },
dependencies = { "L3MON4D3/LuaSnip", "lervag/vimtex" },
opts = { use_treesitter = false, allow_on_markdown = true }, -- use vimtex to detect math mode
config = function(_, opts) require("luasnip-latex-snippets").setup(opts) end,
},
}

View File

@@ -0,0 +1,54 @@
-- Grammar & spell checking for LaTeX/Markdown via LanguageTool (LTeX-LS)
return {
-- Tell AstroLSP to manage the ltex server and pass our settings
{
"AstroNvim/astrolsp",
---@param opts AstroLSPOpts
opts = function(_, opts)
opts.servers = opts.servers or {}
if not vim.tbl_contains(opts.servers, "ltex") then table.insert(opts.servers, "ltex") end
-- Extend the ltex server configuration
opts.config = require("astrocore").extend_tbl(opts.config or {}, {
ltex = {
filetypes = { "tex", "plaintex", "bib", "markdown" },
settings = {
ltex = {
-- Run checks on save for performance; switch to "edit" if you prefer live feedback
checkFrequency = "save",
-- Pick the language you want LTeX to check as the document language
language = "en-US",
-- Mother tongue helps the grammar engine (adjust to your preference)
additionalRules = { motherTongue = "de-DE" },
-- Let ltex_extra manage dictionaries/rules on disk
dictionary = {},
disabledRules = {},
hiddenFalsePositives = {},
},
},
-- hook up ltex_extra when the server attaches
on_attach = function(client, bufnr)
local ok, ltex_extra = pcall(require, "ltex_extra")
if ok then
ltex_extra.setup {
-- load both EN+DE dictionaries; change to your set
load_langs = { "en-US", "de-DE" },
init_check = true,
-- store per-project files in .ltex (add to .gitignore if you want)
path = ".ltex",
log_level = "none",
}
end
end,
},
})
end,
},
-- Companion plugin: add-to-dictionary / disable-rule / hide-false-positive
{
"barreiroleo/ltex_extra.nvim",
ft = { "tex", "plaintex", "markdown" },
lazy = true,
},
}

View File

@@ -0,0 +1,19 @@
-- Lightweight inline ASCII preview for LaTeX math
return {
"jbyuki/nabla.nvim",
ft = { "tex", "plaintex", "markdown" },
keys = {
-- Popup preview for the expression under cursor
{ "<leader>mp", function() require("nabla").popup() end, desc = "Math: popup preview" },
-- Toggle inline virtual rendering; re-enable wrap after toggle (nabla toggles it off)
{
"<leader>mv",
function()
require("nabla").toggle_virt { autogen = true }
vim.wo.wrap = true
end,
desc = "Math: toggle inline preview",
},
},
}

View File

@@ -0,0 +1,10 @@
-- Ensure Treesitter knows about LaTeX (nabla benefits, and some plugins use it)
return {
"nvim-treesitter/nvim-treesitter",
opts = function(_, opts)
opts.ensure_installed = opts.ensure_installed or {}
if type(opts.ensure_installed) == "table" then
if not vim.tbl_contains(opts.ensure_installed, "latex") then table.insert(opts.ensure_installed, "latex") end
end
end,
}

View File

@@ -0,0 +1,24 @@
return {
"lervag/vimtex",
lazy = false, -- load immediately (recommended by astrocommunity)
init = function()
-- Viewer
vim.g.vimtex_view_method = "zathura"
-- Compiler: latexmk + LuaLaTeX
vim.g.vimtex_compiler_method = "latexmk"
-- Option A: pass -lualatex explicitly to latexmk
vim.g.vimtex_compiler_latexmk = {
options = {
"-lualatex",
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
-- remove if you don't need shell-escape:
"-shell-escape",
},
}
-- Option B (also helpful): make LuaLaTeX the default engine for latexmk
vim.g.vimtex_compiler_latexmk_engines = { _ = "-lualatex" }
end,
}

View File

@@ -33,7 +33,7 @@ bind "MOUSE2" "+attack2"
bind "CTRL" "+reload" bind "CTRL" "+reload"
bind "F" "+use" bind "F" "+use"
bind "G" "drop" bind "G" "drop"
bind "R" "+lookatweapon" bind "MOUSE5" "+lookatweapon"
// Slot binds // Slot binds
bind "1" "slot1" bind "1" "slot1"
@@ -44,6 +44,7 @@ bind "6" "slot12"
bind "7" "slot13" bind "7" "slot13"
bind "8" "+spray_menu" bind "8" "+spray_menu"
bind "MOUSE4" "lastinv" bind "MOUSE4" "lastinv"
bind "R" "lastinv"
// Grenade binds // Grenade binds
bind "Z" "buy incgrenade; slot10" bind "Z" "buy incgrenade; slot10"
@@ -66,15 +67,12 @@ bind "Q" "player_ping"
bind "`" "toggleconsole" bind "`" "toggleconsole"
bind "ALT" "+voicerecord" bind "ALT" "+voicerecord"
bind "E" "voice_modenable_toggle" bind "E" "voice_modenable_toggle"
bind "6" "radio"
bind "]" "callvote" bind "]" "callvote"
bind "Y" "radio1" bind "Y" "radio"
bind "U" "radio2" bind "U" "radio1"
bind "I" "radio3" bind "I" "radio2"
bind "H" "+radialradio" bind "H" "radio3"
bind "J" "+radialradio2" bind "J" "+radialradio"
bind "K" "+radialradio3"
// Buybinds // Buybinds
bind "KP_0" "buy vesthelm" bind "KP_0" "buy vesthelm"
@@ -135,7 +133,6 @@ bind "/" "say GET LEETIFY"
// Audio // Audio
volume "0.15" volume "0.15"
voice_scale "0.7"
snd_deathcamera_volume "0" snd_deathcamera_volume "0"
snd_mapobjective_volume "0" snd_mapobjective_volume "0"
snd_menumusic_volume "0" snd_menumusic_volume "0"
@@ -146,24 +143,22 @@ snd_tensecondwarning_volume "0.04"
// HUD // HUD
hud_scaling "0.8" hud_scaling "0.8"
hud_showtargetid "1" hud_showtargetid 0
cl_autohelp "0" cl_autohelp 0
cl_hud_color 12 cl_hud_color 12
cl_sanitize_player_names "0" cl_sanitize_player_names 0
cl_showloadout "1" cl_showloadout 1
+cl_show_team_equipment gameinstructor_enable 0
gameinstructor_enable "0"
//CROSSHAIR COMMANDS //CROSSHAIR COMMANDS
cl_crosshairstyle 4 cl_crosshairstyle 4
cl_crosshairsize 2 cl_crosshairsize 2.5
cl_crosshairthickness 0.5 cl_crosshairthickness 0.5
cl_crosshairgap -2 cl_crosshairgap -3
cl_crosshair_drawoutline 1 cl_crosshair_drawoutline 0
cl_crosshair_outlinethickness 1
cl_crosshairdot 0 cl_crosshairdot 0
cl_crosshair_t 0 cl_crosshair_t 0
cl_crosshairusealpha 1 cl_crosshairusealpha 0
cl_crosshairalpha 255 cl_crosshairalpha 255
cl_crosshair_recoil 0 cl_crosshair_recoil 0
cl_crosshairgap_useweaponvalue 0 cl_crosshairgap_useweaponvalue 0
@@ -172,11 +167,10 @@ cl_crosshaircolor 5
//EXTRAS //EXTRAS
cl_crosshair_sniper_width 1 cl_crosshair_sniper_width 1
cl_crosshair_friendly_warning 1 cl_crosshair_friendly_warning 1
hud_showtargetid 0
// Mouse // Mouse
sensitivity "0.5" sensitivity "0.619"
zoom_sensitivity_ratio "0.818933027098955175" zoom_sensitivity_ratio "1.0"
// Radar // Radar
cl_hud_radar_scale "1.3" cl_hud_radar_scale "1.3"
@@ -187,28 +181,22 @@ cl_radar_scale "0.7"
cl_radar_square_with_scoreboard "0" cl_radar_square_with_scoreboard "0"
// Video // Video
fps_max "0" r_fullscreen_gamma "1.6"
r_fullscreen_gamma "1.9"
// Viewmodel // Viewmodel
viewmodel_presetpos 0 viewmodel_presetpos 0
viewmodel_offset_x 0 viewmodel_offset_x -2
viewmodel_offset_y -2 viewmodel_offset_y -2
viewmodel_offset_z -2 viewmodel_offset_z -2
viewmodel_fov 54 viewmodel_fov 54
cl_prefer_lefthanded null cl_prefer_lefthanded 0
// Performance // Performance
mat_queue_mode "-1"
cl_forcepreload "1"
cl_disable_ragdolls "1" cl_disable_ragdolls "1"
engine_low_latency_sleep_after_client_tick true engine_low_latency_sleep_after_client_tick true
r_show_build_info false r_show_build_info false
fps_max 0
fps_max_ui 0
// Network Optimization (1 Gbps Fiber)
rate "786432" // Max bandwidth
cl_interp "0.015625" // Minimum interpolation - best for stable connections
cl_interp_ratio "1" // Minimal delay ratio
echo "Loaded autoexec.cfg" echo "Loaded autoexec.cfg"
host_writeconfig host_writeconfig