Void Linux workstation powered by niri, Fish and NeoVim. Contains scripts, browser extensions, custom XBPS packages, and typst plugins. git.anhgelus.world/anhgelus/dotfiles
void niri fish neovim nvim vim dotfiles linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat(nvim): finally setup lsp and blind keybindings

+44 -867
-814
config/nvim/UltiSnips/tex.snippets
··· 1 - global !p 2 - texMathZones = ['texMathZone'+x for x in ['A', 'AS', 'B', 'BS', 'C', 'CS', 'D', 'DS', 'E', 'ES', 'F', 'FS', 'G', 'GS', 'H', 'HS', 'I', 'IS', 'J', 'JS', 'K', 'KS', 'L', 'LS', 'DS', 'V', 'W', 'X', 'Y', 'Z']] 3 - 4 - texIgnoreMathZones = ['texMathText'] 5 - 6 - texMathZoneIds = vim.eval('map('+str(texMathZones)+", 'hlID(v:val)')") 7 - texIgnoreMathZoneIds = vim.eval('map('+str(texIgnoreMathZones)+", 'hlID(v:val)')") 8 - 9 - ignore = texIgnoreMathZoneIds[0] 10 - 11 - def math(): 12 - synstackids = vim.eval("synstack(line('.'), col('.') - (col('.')>=2 ? 1 : 0))") 13 - try: 14 - first = next(i for i in reversed(synstackids) if i in texIgnoreMathZoneIds or i in texMathZoneIds) 15 - return first != ignore 16 - except StopIteration: 17 - return False 18 - endglobal 19 - 20 - snippet litemplate "Little basic template" b 21 - \documentclass[a4paper]{article} 22 - 23 - \usepackage[utf8]{inputenc} 24 - \usepackage[T1]{fontenc} 25 - \usepackage{textcomp} 26 - \usepackage[french]{babel} 27 - \usepackage{amsmath, amssymb} 28 - \usepackage{amsthm} 29 - \usepackage[svgnames]{xcolor} 30 - \usepackage{thmtools} 31 - \usepackage{lipsum} 32 - \usepackage{framed} 33 - \usepackage{parskip} 34 - 35 - \renewcommand{\familydefault}{\sfdefault} 36 - 37 - \newenvironment{AQT}{{\fontfamily{qbk}\selectfont AQT}} 38 - 39 - \usepackage{titlesec} 40 - \usepackage{LobsterTwo} 41 - \titleformat{\section}{\newpage\LobsterTwo \huge\bfseries}{\thesection.}{1em}{} 42 - \titleformat{\subsection}{\vspace{2em}\LobsterTwo \Large\bfseries}{\thesubsection.}{1em}{} 43 - \titleformat{\subsubsection}{\vspace{1em}\LobsterTwo \large\bfseries}{\thesubsubsection.}{1em}{} 44 - 45 - \title{Titre} 46 - \author{William Hergès\thanks{CPES Science Henri-IV / PSL}} 47 - 48 - \begin{document} 49 - \maketitle 50 - $0 51 - \end{document} 52 - endsnippet 53 - 54 - snippet template "Basic template" b 55 - \documentclass[a4paper, titlepage]{article} 56 - 57 - \usepackage[utf8]{inputenc} 58 - \usepackage[T1]{fontenc} 59 - \usepackage{textcomp} 60 - \usepackage[french]{babel} 61 - \usepackage{amsmath, amssymb} 62 - \usepackage{amsthm} 63 - \usepackage[svgnames]{xcolor} 64 - \usepackage{thmtools} 65 - \usepackage{lipsum} 66 - \usepackage{framed} 67 - \usepackage{parskip} 68 - \usepackage{titlesec} 69 - 70 - \renewcommand{\familydefault}{\sfdefault} 71 - 72 - % figure support 73 - \usepackage{import} 74 - \usepackage{xifthen} 75 - \pdfminorversion=7 76 - \usepackage{pdfpages} 77 - \usepackage{transparent} 78 - \newcommand{\incfig}[1]{% 79 - \def\svgwidth{\columnwidth} 80 - \import{./figures/}{#1.pdf_tex} 81 - } 82 - 83 - \pdfsuppresswarningpagegroup=1 84 - 85 - \colorlet{defn-color}{DarkBlue} 86 - \colorlet{props-color}{Blue} 87 - \colorlet{warn-color}{Red} 88 - \colorlet{exemple-color}{Green} 89 - \colorlet{corol-color}{Orange} 90 - \newenvironment{defn-leftbar}{% 91 - \def\FrameCommand{{\color{defn-color}\vrule width 3pt} \hspace{10pt}}% 92 - \MakeFramed {\advance\hsize-\width \FrameRestore}}% 93 - {\endMakeFramed} 94 - \newenvironment{warn-leftbar}{% 95 - \def\FrameCommand{{\color{warn-color}\vrule width 3pt} \hspace{10pt}}% 96 - \MakeFramed {\advance\hsize-\width \FrameRestore}}% 97 - {\endMakeFramed} 98 - \newenvironment{exemple-leftbar}{% 99 - \def\FrameCommand{{\color{exemple-color}\vrule width 3pt} \hspace{10pt}}% 100 - \MakeFramed {\advance\hsize-\width \FrameRestore}}% 101 - {\endMakeFramed} 102 - \newenvironment{props-leftbar}{% 103 - \def\FrameCommand{{\color{props-color}\vrule width 3pt} \hspace{10pt}}% 104 - \MakeFramed {\advance\hsize-\width \FrameRestore}}% 105 - {\endMakeFramed} 106 - \newenvironment{corol-leftbar}{% 107 - \def\FrameCommand{{\color{corol-color}\vrule width 3pt} \hspace{10pt}}% 108 - \MakeFramed {\advance\hsize-\width \FrameRestore}}% 109 - {\endMakeFramed} 110 - 111 - \def \freespace {1em} 112 - \declaretheoremstyle[headfont=\sffamily\bfseries,% 113 - notefont=\sffamily\bfseries,% 114 - notebraces={}{},% 115 - headpunct=,% 116 - bodyfont=\sffamily,% 117 - headformat=\color{defn-color}Définition~\NUMBER\hfill\NOTE\smallskip\linebreak,% 118 - preheadhook=\vspace{\freespace}\begin{defn-leftbar},% 119 - postfoothook=\end{defn-leftbar},% 120 - ]{better-defn} 121 - \declaretheoremstyle[headfont=\sffamily\bfseries,% 122 - notefont=\sffamily\bfseries,% 123 - notebraces={}{},% 124 - headpunct=,% 125 - bodyfont=\sffamily,% 126 - headformat=\color{warn-color}Attention~\NUMBER\hfill\NOTE\smallskip\linebreak,% 127 - preheadhook=\vspace{\freespace}\begin{warn-leftbar},% 128 - postfoothook=\end{warn-leftbar},% 129 - ]{better-warn} 130 - \declaretheoremstyle[headfont=\sffamily\bfseries,% 131 - notefont=\sffamily\bfseries,% 132 - notebraces={}{},% 133 - headpunct=,% 134 - bodyfont=\sffamily,% 135 - headformat=\color{exemple-color}Exemple~\NUMBER\hfill\NOTE\smallskip\linebreak,% 136 - preheadhook=\vspace{\freespace}\begin{exemple-leftbar},% 137 - postfoothook=\end{exemple-leftbar},% 138 - ]{better-exemple} 139 - \declaretheoremstyle[headfont=\sffamily\bfseries,% 140 - notefont=\sffamily\bfseries,% 141 - notebraces={}{},% 142 - headpunct=,% 143 - bodyfont=\sffamily,% 144 - headformat=\color{props-color}Proposition~\NUMBER\hfill\NOTE\smallskip\linebreak,% 145 - preheadhook=\vspace{\freespace}\begin{props-leftbar},% 146 - postfoothook=\end{props-leftbar},% 147 - ]{better-props} 148 - \declaretheoremstyle[headfont=\sffamily\bfseries,% 149 - notefont=\sffamily\bfseries,% 150 - notebraces={}{},% 151 - headpunct=,% 152 - bodyfont=\sffamily,% 153 - headformat=\color{props-color}Théorème~\NUMBER\hfill\NOTE\smallskip\linebreak,% 154 - preheadhook=\vspace{\freespace}\begin{props-leftbar},% 155 - postfoothook=\end{props-leftbar},% 156 - ]{better-thm} 157 - \declaretheoremstyle[headfont=\sffamily\bfseries,% 158 - notefont=\sffamily\bfseries,% 159 - notebraces={}{},% 160 - headpunct=,% 161 - bodyfont=\sffamily,% 162 - headformat=\color{corol-color}Corollaire~\NUMBER\hfill\NOTE\smallskip\linebreak,% 163 - preheadhook=\vspace{\freespace}\begin{corol-leftbar},% 164 - postfoothook=\end{corol-leftbar},% 165 - ]{better-corol} 166 - 167 - \declaretheorem[style=better-defn]{defn} 168 - \declaretheorem[style=better-warn]{warn} 169 - \declaretheorem[style=better-exemple]{exemple} 170 - \declaretheorem[style=better-corol]{corol} 171 - \declaretheorem[style=better-props, numberwithin=defn]{props} 172 - \declaretheorem[style=better-thm, sibling=props]{thm} 173 - \newtheorem*{lemme}{Lemme}%[subsection] 174 - %\newtheorem{props}{Propriétés}[defn] 175 - 176 - \newenvironment{system}% 177 - {\left\lbrace\begin{align}}% 178 - {\end{align}\right.} 179 - 180 - \newenvironment{AQT}{{\fontfamily{qbk}\selectfont AQT}} 181 - 182 - \usepackage{LobsterTwo} 183 - \titleformat{\section}{\newpage\LobsterTwo \huge\bfseries}{\thesection.}{1em}{} 184 - \titleformat{\subsection}{\vspace{2em}\LobsterTwo \Large\bfseries}{\thesubsection.}{1em}{} 185 - \titleformat{\subsubsection}{\vspace{1em}\LobsterTwo \large\bfseries}{\thesubsubsection.}{1em}{} 186 - 187 - \newenvironment{lititle}% 188 - {\vspace{7mm}\LobsterTwo \large}% 189 - {\\} 190 - 191 - \renewenvironment{proof}{\par$\square$ \footnotesize\textit{Démonstration.}}{\begin{flushright}$\blacksquare$\end{flushright}\par} 192 - 193 - \title{Titre} 194 - \author{William Hergès\thanks{CPES Science Henri-IV / PSL}} 195 - 196 - \begin{document} 197 - \maketitle 198 - \tableofcontents 199 - \newpage 200 - $0 201 - \end{document} 202 - endsnippet 203 - 204 - snippet beg "begin{} / end{}" bA 205 - \\begin{$1} 206 - $0 207 - \\end{$1} 208 - endsnippet 209 - 210 - priority 100 211 - snippet ... "ldots" iA 212 - \ldots 213 - endsnippet 214 - 215 - snippet table "Table environment" b 216 - \begin{table}[${1:htpb}] 217 - \centering 218 - \caption{${2:caption}} 219 - \label{tab:${3:label}} 220 - \begin{tabular}{${5:c}} 221 - $0${5/((?<=.)c|l|r)|./(?1: & )/g} 222 - \end{tabular} 223 - \end{table} 224 - endsnippet 225 - 226 - snippet fig "Figure environment" b 227 - \begin{figure}[${1:htpb}] 228 - \centering 229 - ${2:\includegraphics[width=0.8\textwidth]{$3}} 230 - \caption{${4:$3}} 231 - \label{fig:${5:${3/\W+/-/g}}} 232 - \end{figure} 233 - endsnippet 234 - 235 - snippet enum "Enumerate" bA 236 - \begin{enumerate} 237 - \item $0 238 - \end{enumerate} 239 - endsnippet 240 - 241 - snippet item "Itemize" bA 242 - \begin{itemize} 243 - \item $0 244 - \end{itemize} 245 - endsnippet 246 - 247 - snippet desc "Description" b 248 - \begin{description} 249 - \item[$1] $0 250 - \end{description} 251 - endsnippet 252 - 253 - snippet pac "Package" b 254 - \usepackage[${1:options}]{${2:package}}$0 255 - endsnippet 256 - 257 - snippet => "implies" Ai 258 - \implies 259 - endsnippet 260 - 261 - snippet =< "implied by" Ai 262 - \impliedby 263 - endsnippet 264 - 265 - context "math()" 266 - snippet iff "iff" Ai 267 - \iff 268 - endsnippet 269 - 270 - snippet mk "Math" wA 271 - $${1}$`!p 272 - if t[2] and t[2][0] not in [',', '.', '?', '-', ' ']: 273 - snip.rv = ' ' 274 - else: 275 - snip.rv = '' 276 - `$2 277 - endsnippet 278 - 279 - snippet dm "Math" wA 280 - \[ 281 - ${1:${VISUAL}} 282 - \] $0 283 - endsnippet 284 - 285 - snippet ali "Align" bA 286 - \begin{align*} 287 - ${1:${VISUAL}} 288 - \end{align*} 289 - endsnippet 290 - 291 - 292 - #context "math()" 293 - snippet / "Fraction" i 294 - \\frac{$1}{$2}$0 295 - endsnippet 296 - 297 - snippet " ssi" "Si et seulement si" iA 298 - si et seulement si 299 - endsnippet 300 - snippet -> "to" iA 301 - \\to $0 302 - endsnippet 303 - 304 - snippet |> "Maps to" iA 305 - \\longmapsto $0 306 - endsnippet 307 - 308 - context "math()" 309 - snippet '((\d+)|(\d*)(\\)?([A-Za-z]+)((\^|_)(\{\d+\}|\d))*)/' "symbol frac" wrA 310 - \\frac{`!p snip.rv = match.group(1)`}{$1}$0 311 - endsnippet 312 - 313 - priority 1000 314 - context "math()" 315 - snippet '^.*\)/' "() frac" wrA 316 - `!p 317 - stripped = match.string[:-1] 318 - depth = 0 319 - i = len(stripped) - 1 320 - while True: 321 - if stripped[i] == ')': depth += 1 322 - if stripped[i] == '(': depth -= 1 323 - if depth == 0: break; 324 - i-=1 325 - snip.rv = stripped[0:i] + "\\frac{" + stripped[i+1:-1] + "}" 326 - `{$1}$0 327 - endsnippet 328 - 329 - context "math()" 330 - snippet '([A-Za-z])(\d)' "auto subscript" wrA 331 - `!p snip.rv = match.group(1)`_`!p snip.rv = match.group(2)` 332 - endsnippet 333 - 334 - context "math()" 335 - snippet '([A-Za-z])_(\d|[a-z]|\\)' "auto subscript2" wrA 336 - `!p snip.rv = match.group(1)`_{`!p snip.rv = match.group(2)`$0} 337 - endsnippet 338 - 339 - 340 - snippet sympy "sympyblock " w 341 - sympy $1 sympy$0 342 - endsnippet 343 - 344 - priority 10000 345 - snippet 'sympy(.*)sympy' "sympy" wr 346 - `!p 347 - from sympy import * 348 - x, y, z, t = symbols('x y z t') 349 - k, m, n = symbols('k m n', integer=True) 350 - f, g, h = symbols('f g h', cls=Function) 351 - init_printing() 352 - snip.rv = eval('latex(' + match.group(1).replace('\\', '').replace('^', '**').replace('{', '(').replace('}', ')') + ')') 353 - ` 354 - endsnippet 355 - 356 - priority 1000 357 - snippet math "mathematicablock" w 358 - math $1 math$0 359 - endsnippet 360 - 361 - priority 10000 362 - snippet 'math(.*)math' "math" wr 363 - `!p 364 - import subprocess 365 - code = match.group(1) 366 - code = 'ToString[' + code + ', TeXForm]' 367 - snip.rv = subprocess.check_output(['wolframscript', '-code', code]) 368 - ` 369 - endsnippet 370 - 371 - snippet == "equals" iA 372 - &= $1 \\\\ 373 - endsnippet 374 - 375 - snippet != "equals" iA 376 - \neq 377 - endsnippet 378 - 379 - context "math()" 380 - snippet ceil "ceil" iA 381 - \left\lceil $1 \right\rceil $0 382 - endsnippet 383 - 384 - context "math()" 385 - snippet floor "floor" iA 386 - \left\lfloor $1 \right\rfloor$0 387 - endsnippet 388 - 389 - snippet pmat "pmat" iA 390 - \begin{pmatrix} $1 \end{pmatrix} $0 391 - endsnippet 392 - 393 - snippet bmat "bmat" iA 394 - \begin{bmatrix} $1 \end{bmatrix} $0 395 - endsnippet 396 - 397 - snippet lr "left( right)" i 398 - \left( ${1:${VISUAL}} \right) $0 399 - endsnippet 400 - 401 - snippet lr| "left| right|" i 402 - \left| ${1:${VISUAL}} \right| $0 403 - endsnippet 404 - 405 - snippet lr{ "left\{ right\}" i 406 - \left\\{ ${1:${VISUAL}} \right\\} $0 407 - endsnippet 408 - 409 - snippet lrb "left\{ right\}" i 410 - \left\\{ ${1:${VISUAL}} \right\\} $0 411 - endsnippet 412 - 413 - snippet lr[ "left[ right]" i 414 - \left[ ${1:${VISUAL}} \right] $0 415 - endsnippet 416 - 417 - snippet lra "leftangle rightangle" iA 418 - \left<${1:${VISUAL}} \right>$0 419 - endsnippet 420 - 421 - context "math()" 422 - snippet conj "conjugate" iA 423 - \overline{$1}$0 424 - endsnippet 425 - 426 - snippet sum "sum" w 427 - \sum_{${1:i=1}}^{${2:\infty}} ${3:a_n z^n} 428 - endsnippet 429 - 430 - snippet taylor "taylor" w 431 - \sum_{${1:k}=${2:0}}^{${3:\infty}} ${4:c_$1} (x-a)^$1 $0 432 - endsnippet 433 - 434 - snippet lim "limit" w 435 - \lim_{${1:n} \to ${2:\infty}} 436 - endsnippet 437 - 438 - snippet limsup "limsup" w 439 - \limsup_{${1:n} \to ${2:\infty}} 440 - endsnippet 441 - 442 - snippet limarr "lim arrow" w 443 - \xrightarrow[${1:n} \to ${2:\infty}]{} 444 - endsnippet 445 - 446 - snippet prod "product" w 447 - \prod_{${1:n=${2:1}}}^{${3:\infty}} ${4:${VISUAL}} $0 448 - endsnippet 449 - 450 - snippet part "d/dx" w 451 - \frac{\partial ${1:V}}{\partial ${2:x}} $0 452 - endsnippet 453 - 454 - context "math()" 455 - snippet sq "\sqrt{}" iA 456 - \sqrt{${1:${VISUAL}}} $0 457 - endsnippet 458 - 459 - context "math()" 460 - snippet sr "^2" iA 461 - ^2 462 - endsnippet 463 - 464 - context "math()" 465 - snippet cb "^3" iA 466 - ^3 467 - endsnippet 468 - 469 - snippet ^_ "to the ... power" iA 470 - ^{$1}$0 471 - endsnippet 472 - 473 - context "math()" 474 - snippet rd "to the ... power" iA 475 - ^{($1)}$0 476 - endsnippet 477 - 478 - snippet __ "subscript" iA 479 - _{$1}$0 480 - endsnippet 481 - 482 - snippet ooo "\infty" iA 483 - \infty 484 - endsnippet 485 - 486 - snippet rij "mrij" i 487 - (${1:x}_${2:n})_{${3:$2}\\in${4:\\N}}$0 488 - endsnippet 489 - 490 - snippet <= "leq" iA 491 - \leqslant 492 - endsnippet 493 - 494 - snippet >= "geq" iA 495 - \geqslant 496 - endsnippet 497 - 498 - snippet EE "geq" iA 499 - \exists 500 - endsnippet 501 - 502 - snippet AA "forall" iA 503 - \forall 504 - endsnippet 505 - 506 - context "math()" 507 - snippet xnn "xn" iA 508 - x_{n} 509 - endsnippet 510 - 511 - context "math()" 512 - snippet ynn "yn" iA 513 - y_{n} 514 - endsnippet 515 - 516 - 517 - context "math()" 518 - snippet xii "xi" iA 519 - x_{i} 520 - endsnippet 521 - 522 - context "math()" 523 - snippet yii "yi" iA 524 - y_{i} 525 - endsnippet 526 - 527 - context "math()" 528 - snippet xjj "xj" iA 529 - x_{j} 530 - endsnippet 531 - 532 - context "math()" 533 - snippet yjj "yj" iA 534 - y_{j} 535 - endsnippet 536 - 537 - context "math()" 538 - snippet xp1 "x" iA 539 - x_{n+1} 540 - endsnippet 541 - 542 - context "math()" 543 - snippet xmm "x" iA 544 - x_{m} 545 - endsnippet 546 - 547 - snippet R0+ "R0+" iA 548 - \R_0^+ 549 - endsnippet 550 - 551 - snippet plot "Plot" w 552 - \begin{figure}[$1] 553 - \centering 554 - \begin{tikzpicture} 555 - \begin{axis}[ 556 - xmin= ${2:-10}, xmax= ${3:10}, 557 - ymin= ${4:-10}, ymax = ${5:10}, 558 - axis lines = middle, 559 - ] 560 - \addplot[domain=$2:$3, samples=${6:100}]{$7}; 561 - \end{axis} 562 - \end{tikzpicture} 563 - \caption{$8} 564 - \label{${9:$8}} 565 - \end{figure} 566 - endsnippet 567 - 568 - snippet nn "Tikz node" w 569 - \node[$5] (${1/[^0-9a-zA-Z]//g}${2}) ${3:at (${4:0,0}) }{$${1}$}; 570 - $0 571 - endsnippet 572 - 573 - snippet mcal "mathcal" iA 574 - \mathcal{$1}$0 575 - endsnippet 576 - 577 - snippet mbb "mathbb" iA 578 - \mathbb{$1}$0 579 - endsnippet 580 - 581 - snippet [bb "mathbb[X]" iA 582 - \mathbb{$1}[${2:X}]$0 583 - endsnippet 584 - 585 - snippet (bb "mathbb(X)" iA 586 - \mathbb{$1}(${2:X})$0 587 - endsnippet 588 - 589 - snippet mrm "mathrm" iA 590 - \mathrm{$1}$0 591 - endsnippet 592 - 593 - context "math()" 594 - snippet nabl "nabla" iA 595 - \nabla 596 - endsnippet 597 - 598 - context "math()" 599 - snippet xx "cross" iA 600 - \times 601 - endsnippet 602 - 603 - priority 100 604 - snippet ** "cdot" iA 605 - \cdot 606 - endsnippet 607 - 608 - context "math()" 609 - snippet norm "norm" iA 610 - \|$1\|$0 611 - endsnippet 612 - 613 - priority 100 614 - context "math()" 615 - snippet '(?<!\\)(sin|cos|arccot|cot|csc|ln|log|exp|star|perp)' "ln" rwA 616 - \\`!p snip.rv = match.group(1)` 617 - endsnippet 618 - 619 - priority 300 620 - context "math()" 621 - snippet dint "integral" wA 622 - \int_{${1:-\infty}}^{${2:\infty}} ${3:${VISUAL}} $0 623 - endsnippet 624 - 625 - priority 200 626 - context "math()" 627 - snippet '(?<!\\)(arcsin|arccos|arctan|arccot|arccsc|arcsec|pi|zeta|int)' "ln" rwA 628 - \\`!p snip.rv = match.group(1)` 629 - endsnippet 630 - 631 - 632 - priority 100 633 - context "math()" 634 - snippet -> "to" iA 635 - \to 636 - endsnippet 637 - 638 - priority 200 639 - context "math()" 640 - snippet <-> "leftrightarrow" iA 641 - \leftrightarrow 642 - endsnippet 643 - 644 - context "math()" 645 - snippet !> "mapsto" iA 646 - \mapsto 647 - endsnippet 648 - 649 - context "math()" 650 - snippet invs "inverse" iA 651 - ^{-1} 652 - endsnippet 653 - 654 - context "math()" 655 - snippet compl "complement" iA 656 - ^{c} 657 - endsnippet 658 - 659 - context "math()" 660 - snippet \\\ "setminus" iA 661 - \setminus 662 - endsnippet 663 - 664 - snippet >> ">>" iA 665 - \gg 666 - endsnippet 667 - 668 - snippet << "<<" iA 669 - \ll 670 - endsnippet 671 - 672 - 673 - snippet ~~ "~" iA 674 - \sim 675 - endsnippet 676 - 677 - context "math()" 678 - snippet set "set" wA 679 - \\{$1\\} $0 680 - endsnippet 681 - 682 - context "math()" 683 - snippet cc "subset" Ai 684 - \subset 685 - endsnippet 686 - 687 - snippet notin "not in " iA 688 - \not\in 689 - endsnippet 690 - 691 - context "math()" 692 - snippet inn "in " iA 693 - \in 694 - endsnippet 695 - 696 - snippet NN "n" iA 697 - \N 698 - endsnippet 699 - 700 - snippet Nn "cap" iA 701 - \cap 702 - endsnippet 703 - 704 - snippet Uu "cup" iA 705 - \cup 706 - endsnippet 707 - 708 - snippet uuu "bigcup" iA 709 - \bigcup_{${1:i \in ${2: I}}} $0 710 - endsnippet 711 - 712 - snippet nnn "bigcap" iA 713 - \bigcap_{${1:i \in ${2: I}}} $0 714 - endsnippet 715 - 716 - snippet OO "emptyset" iA 717 - \O 718 - endsnippet 719 - 720 - snippet RR "real" iA 721 - \R 722 - endsnippet 723 - 724 - snippet QQ "Q" iA 725 - \Q 726 - endsnippet 727 - 728 - snippet ZZ "Z" iA 729 - \Z 730 - endsnippet 731 - 732 - snippet <! "normal" iA 733 - \triangleleft 734 - endsnippet 735 - 736 - snippet <> "hokje" iA 737 - \diamond 738 - endsnippet 739 - 740 - 741 - context "math()" 742 - snippet '(?<!i)sts' "text subscript" irA 743 - _\text{$1} $0 744 - endsnippet 745 - 746 - context "math()" 747 - snippet tt "text" iA 748 - \text{$1}$0 749 - endsnippet 750 - 751 - context "math()" 752 - snippet case "cases" wA 753 - \begin{cases} 754 - $1 755 - \end{cases} 756 - endsnippet 757 - 758 - snippet bigfun "Big function" iA 759 - \begin{align*} 760 - $1: $2 &\longrightarrow $3 \\\\ 761 - $4 &\longmapsto $1($4) = $0 762 - .\end{align*} 763 - endsnippet 764 - 765 - snippet cvec "column vector" iA 766 - \begin{pmatrix} ${1:x}_${2:1}\\\\ \vdots\\\\ $1_${2:n} \end{pmatrix} 767 - endsnippet 768 - 769 - priority 10 770 - context "math()" 771 - snippet "bar" "bar" riA 772 - \overline{$1}$0 773 - endsnippet 774 - 775 - priority 100 776 - context "math()" 777 - snippet "([a-zA-Z])bar" "bar" riA 778 - \overline{`!p snip.rv=match.group(1)`} 779 - endsnippet 780 - 781 - priority 10 782 - context "math()" 783 - snippet "hat" "hat" riA 784 - \hat{$1}$0 785 - endsnippet 786 - 787 - priority 100 788 - context "math()" 789 - snippet "([a-zA-Z])hat" "hat" riA 790 - \hat{`!p snip.rv=match.group(1)`} 791 - endsnippet 792 - 793 - context "math()" 794 - snippet "dot" "dot" riA 795 - \dot{$1}$0 796 - endsnippet 797 - 798 - context "math()" 799 - snippet "arw" "arw" riA 800 - \overrightarrow{$1}$0 801 - endsnippet 802 - 803 - snippet box "Box" 804 - `!p snip.rv = '┌' + '─' * (len(t[1]) + 2) + '┐'` 805 - │ $1 │ 806 - `!p snip.rv = '└' + '─' * (len(t[1]) + 2) + '┘'` 807 - $0 808 - endsnippet 809 - 810 - snippet today "Date" 811 - `date +%F` 812 - endsnippet 813 - 814 - # vim:ft=snippets
+21 -8
config/nvim/lua/keybindings.lua
··· 1 1 vim.keymap.set('n', '<A-Right>', '<cmd>tabnext<CR>') 2 2 vim.keymap.set('n', '<A-Left>', '<cmd>tabprevious<CR>') 3 + 3 4 -- Neotree 4 5 vim.keymap.set('n', '<A-&>', '<cmd>Neotree<CR>') 5 - vim.api.nvim_create_user_command('Gs', 'Neotree float git_status git_base=main', {}) 6 + --vim.api.nvim_create_user_command('Gs', 'Neotree float git_status git_base=main', {}) 7 + 6 8 -- LSP 7 - vim.keymap.set('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<cr>', opts) 8 - vim.keymap.set('n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<cr>', opts) 9 - vim.keymap.set('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<cr>', opts) 10 - vim.keymap.set('n', 'go', '<cmd>lua vim.lsp.buf.type_definition()<cr>', opts) 11 - vim.keymap.set('n', 'gr', '<cmd>lua vim.lsp.buf.references()<cr>', opts) 12 - vim.keymap.set('n', 'gs', '<cmd>lua vim.lsp.buf.signature_help()<cr>', opts) 13 - vim.keymap.set('n', '<F6>', '<cmd>lua vim.lsp.buf.rename()<cr>', opts) 9 + -- go to 10 + vim.keymap.set('n', 'gd', vim.lsp.buf.definition) 11 + vim.keymap.set('n', 'gD', vim.lsp.buf.declaration) 12 + vim.keymap.set('n', 'gi', vim.lsp.buf.implementation) 13 + vim.keymap.set('n', 'go', vim.lsp.buf.type_definition) 14 + vim.keymap.set('n', 'gr', vim.lsp.buf.references) 15 + -- display 16 + vim.keymap.set('n', 'ds', vim.lsp.buf.signature_help) 17 + vim.keymap.set('n', 'dh', vim.lsp.buf.hover) 18 + -- utils 19 + vim.keymap.set('n', '<F2>', vim.lsp.buf.rename) 20 + vim.keymap.set('n', '<space><CR>', vim.lsp.buf.code_action) 21 + vim.api.nvim_create_autocmd({"CursorHold", "CursorHoldI"}, { 22 + callback = vim.lsp.buf.document_highlight 23 + }) 24 + vim.api.nvim_create_autocmd({"CursorMoved"}, { 25 + callback = vim.lsp.buf.clear_references 26 + })
+10
config/nvim/lua/options.lua
··· 27 27 heex = 'eelixir' 28 28 } 29 29 }) 30 + vim.filetype.add({ 31 + extension = { 32 + yrl = 'erlang' 33 + } 34 + }) 35 + vim.filetype.add({ 36 + extension = { 37 + xrl = 'erlang' 38 + } 39 + })
+13 -34
config/nvim/lua/plugins/blink.lua
··· 2 2 { 3 3 "saghen/blink.cmp", 4 4 -- optional: provides snippets for the snippet source 5 - dependencies = { "rafamadriz/friendly-snippets" }, 5 + -- dependencies = { "rafamadriz/friendly-snippets" }, 6 6 7 - -- Use a release tag to download pre-built binaries 8 7 version = "*", 9 - -- AND/OR build from source, requires nightly: https://rust-lang.github.io/rustup/concepts/channels.html#working-with-nightly-rust 10 - -- build = 'cargo build --release', 11 - -- If you use nix, you can build from source using the latest nightly rust with: 12 - -- build = 'nix run .#build-plugin', 13 - 14 8 opts = { 15 - -- 'default' (recommended) for mappings similar to built-in completions (C-y to accept) 16 - -- 'super-tab' for mappings similar to VSCode (tab to accept) 17 - -- 'enter' for enter to accept 18 - -- 'none' for no mappings 19 - -- 20 - -- All presets have the following mappings: 21 - -- C-space: Open menu or open docs if already open 22 - -- C-n/C-p or Up/Down: Select next/previous item 23 - -- C-e: Hide menu 24 - -- C-k: Toggle signature help (if signature.enabled = true) 25 - -- 26 - -- See :h blink-cmp-config-keymap for defining your own keymap 9 + 27 10 keymap = { 28 - -- Each keymap may be a list of commands and/or functions 29 11 preset = "enter", 30 12 -- Select completions 31 13 ["<Up>"] = { "select_prev", "fallback" }, 32 14 ["<Down>"] = { "select_next", "fallback" }, 33 15 ["<Tab>"] = { "select_next", "fallback" }, 34 16 ["<S-Tab>"] = { "select_prev", "fallback" }, 17 + ["<CR-space>"] = { "show", "hide", "fallback" }, 35 18 -- Scroll documentation 36 - ["<C-b>"] = { "scroll_documentation_up", "fallback" }, 37 - ["<C-f>"] = { "scroll_documentation_down", "fallback" }, 19 + ["<S-Up>"] = { "scroll_documentation_up", "fallback" }, 20 + ["<S-Down>"] = { "scroll_documentation_down", "fallback" }, 38 21 -- Show/hide signature 39 22 ["<C-k>"] = { "show_signature", "hide_signature", "fallback" }, 40 23 }, 41 24 42 25 appearance = { 43 - -- 'mono' (default) for 'Nerd Font Mono' or 'normal' for 'Nerd Font' 44 - -- Adjusts spacing to ensure icons are aligned 45 26 nerd_font_variant = "mono", 46 27 }, 47 28 48 29 sources = { 49 - -- `lsp`, `buffer`, `snippets`, `path`, and `omni` are built-in 50 - -- so you don't need to define them in `sources.providers` 51 30 default = { "lsp", "path", "snippets", "buffer" }, 52 - 53 - -- Sources are configured via the sources.providers table 54 31 }, 55 32 56 - -- (Default) Rust fuzzy matcher for typo resistance and significantly better performance 57 - -- You may use a lua implementation instead by using `implementation = "lua"` or fallback to the lua implementation, 58 - -- when the Rust fuzzy matcher is not available, by using `implementation = "prefer_rust"` 59 - -- 60 - -- See the fuzzy documentation for more information 61 33 fuzzy = { implementation = "prefer_rust_with_warning" }, 62 34 completion = { 63 35 -- The keyword should only match against the text before 64 36 keyword = { range = "prefix" }, 37 + list = { 38 + selection = { preselect = true, auto_insert = false } 39 + }, 40 + ghost_text = { enabled = true }, 65 41 menu = { 42 + auto_show = false, 66 43 -- Use treesitter to highlight the label text for the given list of sources 67 44 draw = { 68 45 treesitter = { "lsp" }, 69 46 }, 70 47 }, 71 48 -- Show completions after typing a trigger character, defined by the source 72 - trigger = { show_on_trigger_character = true }, 49 + trigger = { 50 + show_on_trigger_character = true 51 + }, 73 52 documentation = { 74 53 -- Show documentation automatically 75 54 auto_show = true,
-11
config/nvim/lua/plugins/ultisnips.lua
··· 1 - return { 2 - { 3 - "SirVer/ultisnips", 4 - init = function() 5 - -- vim.g.UltiSnipsSnippetDirectories = { "~/.config/nvim/UltiSnips" } 6 - vim.g.UltiSnipsExpandTrigger = '<C-a>' 7 - vim.g.UltiSnipsJumpForwardTrigger = '<tab>' 8 - vim.g.UltiSnipsJumpBackwardTrigger = '<s-tab>' 9 - end, 10 - } 11 - }