Compare commits

...

15 Commits

Author SHA1 Message Date
d8621e4a5e [Lua] Lovr integration fix 2026-03-11 15:23:25 +01:00
4a2203892f [Lua] Add lovr support 2026-03-11 15:06:31 +01:00
bc8830555e [TS] Add support for helm chart highlighting 2026-03-10 11:45:39 +01:00
a5644e8645 [LSP] Add sql support 2026-03-06 15:53:03 +01:00
89042e3620 [Mason] Uninstall hls 2026-02-25 13:30:47 +01:00
d9189073c1 [Snippets] Improve 2026-02-24 12:20:40 +01:00
4be3e14027 [Snippets] Add beamer setup 2026-02-24 11:32:55 +01:00
9f58b63752 [Snippets] Fix 2026-02-23 10:09:54 +01:00
d713505729 [Snippets] Update more 2026-02-23 10:00:20 +01:00
cb4057298d [Snippets] Update 2026-02-23 08:50:57 +01:00
2db6ae625a [Haskell] Fully add support 2026-02-20 12:45:48 +01:00
aebf6fc1b1 [LSP] Add nginx language server 2026-02-18 13:12:31 +01:00
dfd2ea5f84 [LSP] Add language server 2026-02-18 08:39:55 +01:00
16a3a662a0 [Actions] Add github actions language server 2026-02-09 11:12:43 +01:00
9c2b3a8dee [Docker] Fix filetypes 2026-02-09 11:12:35 +01:00
13 changed files with 582 additions and 549 deletions

14
lovr-integration.sh Executable file
View File

@@ -0,0 +1,14 @@
#!/bin/sh
cd ~/.local/share
if [[ -d lovr-docs ]] then
echo "Already present, updating repo"
cd lovr-docs
git pull
else
git clone https://github.com/bjornbytes/lovr-docs
cd lovr-docs
fi
lovr api cats

View File

@@ -1,3 +1,4 @@
require("options") require("options")
require("keybinds") require("keybinds")
require("lazy-conf") require("lazy-conf")
require("filetypes")

14
nvim/lua/filetypes.lua Normal file
View File

@@ -0,0 +1,14 @@
vim.filetype.add({
extension = {
gotmpl = "gotmpl",
},
pattern = {
["compose.*%.ya?ml"] = "yaml.docker-compose",
["docker%-compose.*%.ya?ml"] = "yaml.docker-compose",
[".*/.gitea/workflows/.*%.ya?ml"] = "yaml.actions",
[".*/.github/workflows/.*%.ya?ml"] = "yaml.actions",
[".*/templates/.*%.tpl"] = "helm",
[".*/templates/.*%.ya?ml"] = "helm",
["helmfile.*%.ya?ml"] = "helm",
},
})

View File

@@ -16,12 +16,6 @@ lsp.config("clangd", {
on_attach = opts.on_attach_no_formatting, on_attach = opts.on_attach_no_formatting,
}) })
lsp.config("cmake", {
capabilities = opts.capabilities,
on_attach = opts.on_attach,
})
-- ── Enable configs ─────────────────────────────────────────────── -- ── Enable configs ───────────────────────────────────────────────
local enable = vim.lsp.enable local enable = vim.lsp.enable
enable("clangd") enable("clangd")
enable("cmake")

View File

@@ -0,0 +1,20 @@
-- ┌ ┐
-- │ GitHub Actions │
-- └ ┘
local lsp = vim.lsp
local capabilities = require("lsp-options").capabilities
local on_attach = require("lsp-options").on_attach
lsp.config("gh_actions_ls", {
capabilities = capabilities,
on_attach = on_attach,
filetypes = {
"yaml.actions",
},
})
-- ── Enable configs ───────────────────────────────────────────────
local enable = vim.lsp.enable
enable("gh_actions_ls")

View File

@@ -0,0 +1,17 @@
-- ┌ ┐
-- │ Haskell │
-- └ ┘
local lsp = vim.lsp
local capabilities = require("lsp-options").capabilities
local on_attach = require("lsp-options").on_attach
lsp.config("hls", {
capabilities = capabilities,
on_attach = on_attach,
})
-- ── Enable configs ───────────────────────────────────────────────
local enable = vim.lsp.enable
enable("hls")

View File

@@ -7,26 +7,31 @@ local capabilities = require("lsp-options").capabilities
local on_attach = require("lsp-options").on_attach local on_attach = require("lsp-options").on_attach
lsp.config("lua_ls", { lsp.config("lua_ls", {
capabilities = capabilities, capabilities = capabilities,
on_attach = on_attach, on_attach = on_attach,
settings = { settings = {
Lua = { Lua = {
-- make the language server recognize "vim" global -- make the language server recognize "vim" global
diagnostics = { diagnostics = {
globals = { "vim" }, globals = { "vim" },
}, },
workspace = { workspace = {
-- make language server aware of runtime files -- make language server aware of runtime files
library = { library = {
[vim.fn.expand("$VIMRUNTIME/lua")] = true, vim.fn.expand("$VIMRUNTIME/lua"),
[vim.fn.stdpath("config") .. "/lua"] = true, vim.fn.stdpath("config") .. "/lua",
}, vim.fn.expand("~/.luarocks/share/lua/5.3"),
}, -- To use LÖVR, follow https://lovr.org/docs/dev/VS_Code_Setup#manual-installation
}, -- TL;DR run lovr api cats in the lovr-docs repo and update the path below
}, -- Then update the blow path (if you have not used the script in this repo)
vim.fn.expand("~/.local/share/lovr-docs/api/cats"),
"/usr/share/lua/5.3",
},
},
},
},
}) })
-- ── Enable configs ─────────────────────────────────────────────── -- ── Enable configs ───────────────────────────────────────────────
local enable = vim.lsp.enable local enable = vim.lsp.enable
enable("lua_ls") enable("lua_ls")

View File

@@ -0,0 +1,17 @@
-- ┌ ┐
-- │ SQL │
-- └ ┘
local lsp = vim.lsp
local capabilities = require("lsp-options").capabilities
local on_attach = require("lsp-options").on_attach
lsp.config("sqlls", {
capabilities = capabilities,
on_attach = on_attach,
})
-- ── Enable configs ───────────────────────────────────────────────
local enable = vim.lsp.enable
enable("sqlls")

View File

@@ -46,7 +46,7 @@ lsp.config("vue_ls", {
local vue_plugin = { local vue_plugin = {
name = "@vue/typescript-plugin", name = "@vue/typescript-plugin",
location = '/usr/lib/node_modules/', location = "/usr/lib/node_modules/",
languages = { "vue" }, languages = { "vue" },
configNamespace = "typescript", configNamespace = "typescript",
enableForWorkspaceTypeScriptVersions = true, enableForWorkspaceTypeScriptVersions = true,
@@ -76,6 +76,14 @@ lsp.config("vtsls", {
}, },
}) })
-- ┌ ┐
-- │ nginx │
-- └ ┘
lsp.config("nginx_language_server", {
capabilities = capabilities,
on_attach = on_attach,
})
-- ── Enable configs ─────────────────────────────────────────────── -- ── Enable configs ───────────────────────────────────────────────
local enable = vim.lsp.enable local enable = vim.lsp.enable
enable("jsonls") enable("jsonls")
@@ -84,3 +92,4 @@ enable("cssls")
enable("phpactor") enable("phpactor")
enable("vtsls") enable("vtsls")
enable("vue_ls") enable("vue_ls")
enable("nginx_language_server")

View File

@@ -26,13 +26,16 @@ return {
require("plugins.lsp.ls.c") require("plugins.lsp.ls.c")
require("plugins.lsp.ls.dart") require("plugins.lsp.ls.dart")
require("plugins.lsp.ls.docker") require("plugins.lsp.ls.docker")
require("plugins.lsp.ls.gh-actions")
require("plugins.lsp.ls.go") require("plugins.lsp.ls.go")
require("plugins.lsp.ls.haskell")
require("plugins.lsp.ls.hypr") require("plugins.lsp.ls.hypr")
require("plugins.lsp.ls.low-level") require("plugins.lsp.ls.low-level")
require("plugins.lsp.ls.luals") require("plugins.lsp.ls.luals")
require("plugins.lsp.ls.pyright") require("plugins.lsp.ls.pyright")
require("plugins.lsp.ls.rust-analyzer") require("plugins.lsp.ls.rust-analyzer")
require("plugins.lsp.ls.ruby") require("plugins.lsp.ls.ruby")
require("plugins.lsp.ls.sql")
require("plugins.lsp.ls.text") require("plugins.lsp.ls.text")
require("plugins.lsp.ls.web") require("plugins.lsp.ls.web")
-- ─────────────────────────────────────────────────────────────────── -- ───────────────────────────────────────────────────────────────────

View File

@@ -1,53 +1,55 @@
return { return {
-- lsp package manager -- lsp package manager
"mason-org/mason.nvim", "mason-org/mason.nvim",
dependencies = { dependencies = {
"mason-org/mason-lspconfig.nvim", "mason-org/mason-lspconfig.nvim",
}, },
config = function() config = function()
-- import mason -- import mason
local mason = require("mason") local mason = require("mason")
-- import mason-lspconfig -- import mason-lspconfig
local mason_lspconfig = require("mason-lspconfig") local mason_lspconfig = require("mason-lspconfig")
-- enable mason and configure icons -- enable mason and configure icons
mason.setup({ mason.setup({
ui = { ui = {
icons = { icons = {
package_installed = "", package_installed = "",
package_pending = "", package_pending = "",
package_uninstalled = "", package_uninstalled = "",
}, },
}, },
}) })
-- list of servers for mason to install -- list of servers for mason to install
mason_lspconfig.setup({ mason_lspconfig.setup({
ensure_installed = { ensure_installed = {
"asm_lsp", "asm_lsp",
"bashls", "bashls",
"clangd", "clangd",
"cmake", "cssls",
"cssls", "docker_language_server",
"docker_language_server", "gh_actions_ls",
"gopls", "gopls",
"html", "html",
"hyprls", "hls",
"jdtls", "hyprls",
"jsonls", "jdtls",
"marksman", "jsonls",
"lua_ls", "marksman",
"phpactor", "lua_ls",
"pyright", "phpactor",
"rust_analyzer", "pyright",
"ruby_lsp", "rust_analyzer",
"verible", "ruby_lsp",
"vtsls", "sqlls",
"vue_ls", "verible",
}, "vtsls",
-- auto-install configured servers (with lspconfig) "vue_ls",
automatic_enable = false },
}) -- auto-install configured servers (with lspconfig)
end, automatic_enable = false,
})
end,
} }

View File

@@ -1,56 +1,59 @@
return { return {
-- syntax highlighting -- syntax highlighting
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",
branch = "master", branch = "master",
event = { "BufRead", "BufNewFile" }, event = { "BufRead", "BufNewFile" },
build = ":TSUpdate", build = ":TSUpdate",
config = function() config = function()
require("nvim-treesitter.configs").setup({ require("nvim-treesitter.configs").setup({
ensure_installed = { ensure_installed = {
"asm", "asm",
"bash", "bash",
"c", "c",
"cpp", "cpp",
"css", "css",
"html", "gotmpl",
"hyprlang", "haskell",
"java", "helm",
"javadoc", "html",
"javascript", "hyprlang",
"jsdoc", "java",
"json", "javadoc",
"jsonc", "javascript",
-- "latex", "jsdoc",
"lua", "json",
"markdown", "jsonc",
"meson", -- "latex",
"nginx", "lua",
"php", "markdown",
"python", "meson",
"rasi", "nginx",
"requirements", "php",
"robots", "python",
"ruby", "rasi",
"rust", "requirements",
"scss", "robots",
"sql", "ruby",
"svelte", "rust",
"swift", "scss",
"toml", "sql",
"typescript", "svelte",
"tsx", "swift",
"verilog", "toml",
"vue", "typescript",
"xml", "tsx",
"yaml", "verilog",
"zathurarc", "vue",
}, "xml",
sync_install = false, "yaml",
"zathurarc",
},
sync_install = false,
highlight = { highlight = {
enable = true, enable = true,
disable = { "tex" }, disable = { "tex" },
}, },
}) })
end, end,
} }

View File

@@ -1,198 +1,262 @@
{ {
"prepare LaTeX Document": { "prepare LaTeX Document": {
"prefix": "latex-prepare", "prefix": "latex-prepare",
"body": [ "body": [
"\\documentclass{article}\n", "\\documentclass{article}\n",
"\\input{~/projects/latex/dist/recommended.tex}\n", "\\input{~/projects/latex/janishutz-helpers.tex}\n",
"\\setup{$1}\n", "\\usepackage{lmodern}",
"\\begin{document}", "\\setFontType{sans}\n",
"\\startDocument", "\\setup{$1}\n",
"\\usetcolorboxes", "\\begin{document}",
"$2\n\n", "\\startDocument\n\n",
"\\end{document}" "$2\n\n",
], "\\end{document}"
"description": "Prepares a full LaTeX Document for use and compiling" ],
}, "description": "Prepares a simple LaTeX Document"
"Fancy table": { },
"prefix": "table", "LaTeX CheatSheet Setup": {
"body": [ "prefix": "latex-cheatsheet",
"\\begin{tables}{$1}{$2}\n", "body": [
"\t$3\\\\", "\\documentclass{article}\n",
"\\end{tables}" "\\input{~/projects/latex/janishutz-helpers.tex}\n",
], "\\usepackage{lmodern}",
"description": "Insert a table (without environment)" "\\setFontType{sans}\n",
}, "\\setupCheatSheet{$1}\n",
"Formula": { "\\begin{document}",
"prefix": "formula", "\\startDocument\n\n",
"body": [ "$2\n\n",
"\\begin{formula}[]{$1}", "\\end{document}"
"\t$2", ],
"\\end{formula}" "description": "Prepares to write a LaTeX CheatSheet"
], },
"description": "Inserts a tcolorbox to provide a formula (red)" "Full Summary LaTeX Setup": {
}, "prefix": "latex-summary",
"Definition": { "body": [
"prefix": "definition", "\\documentclass{article}\n",
"body": [ "\\input{~/projects/latex/janishutz-helpers.tex}\n",
"\\begin{definition}[]{$1}", "\\usepackage{lmodern}",
"\t$2", "\\setFontType{sans}\n",
"\\end{definition}" "\\setup{$1}\n",
], "\\begin{document}",
"description": "Inserts a tcolorbox to provide a definition (blue)" "\\startDocument\n",
}, "\\vspace{1cm}",
"Recall": { "\\begin{center}",
"prefix": "recall", "\t\\includegraphics[width=0.5\\linewidth]{~/projects/latex/assets/logo.jpg}",
"body": [ "\\end{center}\n\n",
"\\begin{recall}[]{$1}", "\\vspace{2cm}",
"\t$2", "\\begin{center}",
"\\end{recall}" "\t\\begin{Large}",
], "\t\t\\quote{A funny quote by a professor}",
"description": "Inserts a tcolorbox to provide a recall / revision of previous knowledge (yellow)" "\t\\end{Large}\n",
}, "\t\\hspace{3cm} - Prof. Dr. Professor Name, YEAR",
"Important Remarks": { "\\end{center}\n",
"prefix": "remarks", "\\vspace{1.5cm}",
"body": [ "\\begin{center}",
"\\begin{remark}[]{$1}", "\tSEMESTER, ETHZ\n",
"\t$2", "\t\\begin{Large}",
"\\end{remark}" "\t\tSummary of the Script and Lectures",
], "\t\\end{Large}",
"description": "Inserts a tcolorbox to provide remarks (green), but here numbered" "\\end{center}\n\n",
}, "\\newpage",
"Remark (numbered)": { "\\printtoc{Aquamarine}\n\n",
"prefix": "remark", "$2\n\n",
"body": [ "\\end{document}"
"\\begin{remarks}[]{$1}", ],
"\t$2", "description": "Prepares a full LaTeX Summary"
"\\end{remarks}" },
], "LaTeX Beamer Setup": {
"description": "Inserts a tcolorbox to provide remarks (green)" "prefix": "latex-beamer",
}, "body": [
"Guides": { "\\documentclass{beamer}\n",
"prefix": "guides", "\\input{~/projects/latex/janishutz-helpers.tex}\n",
"body": [ "\\usepackage{lmodern}",
"\\begin{guides}[]{$1}{${2:Usage}}", "\\setFontType{sans}\n",
"\t$2", "\\title{$1}",
"\\end{guides}" "\\author{\\authorTitle}\n",
], "\\usetheme{default}",
"description": "Inserts a tcolorbox to provide guides / instructions on how to use (red)" "\\usecolortheme{beaver}\n",
}, "\\AtBeginSection[]{",
"Properties": { "\t\\begin{frame}",
"prefix": "properties", "\t\\frametitle{Table of Contents}",
"body": [ "\t\\tableofcontents[currentsection]",
"\\begin{properties}[]{$1}", "\t\\end{frame}",
"\t$2", "}\n",
"\\end{properties}" "\\begin{document}\n",
], "\\frame{\\titlepage}\n\n",
"description": "Inserts a tcolorbox to inform about properties" "\\begin{frame}\n",
}, "\t\\frametitle{Table of Contents}",
"Restrictions": { "\t\\tableofcontents",
"prefix": "restrictions", "\\end{frame}\n\n",
"body": [ "\\begin{frame}\n",
"\\begin{restrictions}[]{$1}", "\t\\frametitle{$2}",
"\t$2", "\t$3",
"\\end{restrictions}" "\\end{frame}\n\n",
], "\\end{document}"
"description": "Inserts a tcolorbox to inform about restrictions" ],
}, "description": "Prepares to write a LaTeX CheatSheet"
"Intuition": { },
"prefix": "restrictions", "Fancy table": {
"body": [ "prefix": "table",
"\\begin{intuition}[]{$1}", "body": [
"\t$2", "\\begin{tables}{$1}{$2}\n",
"\\end{intuition}" "\t$3\\\\",
], "\\end{tables}"
"description": "Tcolorbox to highlight sections about intuition" ],
}, "description": "Insert a table (without environment)"
"Limitations": { },
"prefix": "limitations", "Formula": {
"body": [ "prefix": "formula",
"\\begin{limitations}[]{$1}", "body": [
"\t$2", "\\begin{formula}[]{$1}",
"\\end{limitations}" "\t$2",
], "\\end{formula}"
"description": "Inserts a tcolorbox to inform about limitations" ],
}, "description": "Inserts a tcolorbox to provide a formula (red)"
"Theorem": { },
"prefix": "theorem", "Definition": {
"body": [ "prefix": "definition",
"\\begin{theorem}[]{$1}", "body": [
"\t$2", "\\begin{definition}[]{$1}",
"\\end{theorem}" "\t$2",
], "\\end{definition}"
"description": "Inserts a tcolorbox to inform about theorems" ],
}, "description": "Inserts a tcolorbox to provide a definition (blue)"
"Lemma": { },
"prefix": "lemma", "Recall": {
"body": [ "prefix": "recall",
"\\begin{lemma}[]{$1}", "body": [
"\t$2", "\\begin{recall}[]{$1}",
"\\end{lemma}" "\t$2",
], "\\end{recall}"
"description": "Inserts a tcolorbox to inform about lemmas" ],
}, "description": "Inserts a tcolorbox to point out / revise of previous knowledge (yellow)"
"Corollary": { },
"prefix": "corollary", "Remark": {
"body": [ "prefix": "remark",
"\\begin{corollary}[]{$1}", "body": [
"\t$2", "\\begin{remarks}[]{$1}",
"\\end{corollary}" "\t$2",
], "\\end{remarks}"
"description": "Inserts a tcolorbox to inform about corollaries" ],
}, "description": "Inserts a tcolorbox to provide remarks (green)"
"Proposition": { },
"prefix": "proposition", "Properties": {
"body": [ "prefix": "properties",
"\\begin{proposition}[]{$1}", "body": [
"\t$2", "\\begin{properties}[]{$1}",
"\\end{proposition}" "\t$2",
], "\\end{properties}"
"description": "Inserts a tcolorbox to inform about propositions" ],
}, "description": "Inserts a tcolorbox to inform about properties"
"Fact": { },
"prefix": "fact", "Restrictions": {
"body": [ "prefix": "restrictions",
"\\begin{fact}[]{$1}", "body": [
"\t$2", "\\begin{restrictions}[]{$1}",
"\\end{fact}" "\t$2",
], "\\end{restrictions}"
"description": "Inserts a tcolorbox to inform about facts" ],
}, "description": "Inserts a tcolorbox to inform about restrictions"
"Terms": { },
"prefix": "terms", "Intuition": {
"body": [ "prefix": "restrictions",
"\\begin{terms}[]{$1}", "body": [
"\t$2", "\\begin{intuition}[]{$1}",
"\\end{terms}" "\t$2",
], "\\end{intuition}"
"description": "Inserts a tcolorbox to inform about terms" ],
}, "description": "Tcolorbox to highlight sections about intuition"
"Proof": { },
"prefix": "proof", "Limitations": {
"body": [ "prefix": "limitations",
"\\begin{proof}[]{$1}", "body": [
"\t$2", "\\begin{limitations}[]{$1}",
"\\end{proof}" "\t$2",
], "\\end{limitations}"
"description": "Inserts a tcolorbox to show a proof" ],
}, "description": "Inserts a tcolorbox to inform about limitations"
"Axiom": { },
"prefix": "axiom", "Theorem": {
"body": [ "prefix": "theorem",
"\\begin{axiom}[]{$1}", "body": [
"\t$2", "\\begin{theorem}[]{$1}",
"\\end{axiom}" "\t$2",
], "\\end{theorem}"
"description": "Inserts a tcolorbox to show an axiom" ],
}, "description": "Inserts a tcolorbox to state a theorem"
"Notation": { },
"prefix": "notation", "Lemma": {
"body": [ "prefix": "lemma",
"\\begin{notation}[]{$1}", "body": [
"\t$2", "\\begin{lemma}[]{$1}",
"\\end{notation}" "\t$2",
], "\\end{lemma}"
"description": "Inserts a tcolorbox to show notation" ],
}, "description": "Inserts a tcolorbox to state a lemma"
},
"Corollary": {
"prefix": "corollary",
"body": [
"\\begin{corollary}[]{$1}",
"\t$2",
"\\end{corollary}"
],
"description": "Inserts a tcolorbox to state a corollary"
},
"Proposition": {
"prefix": "proposition",
"body": [
"\\begin{proposition}[]{$1}",
"\t$2",
"\\end{proposition}"
],
"description": "Inserts a tcolorbox to state a proposition"
},
"Fact": {
"prefix": "fact",
"body": [
"\\begin{fact}[]{$1}",
"\t$2",
"\\end{fact}"
],
"description": "Inserts a tcolorbox to state a fact"
},
"Terms": {
"prefix": "terms",
"body": [
"\\begin{terms}[]{$1}",
"\t$2",
"\\end{terms}"
],
"description": "Inserts a tcolorbox to inform about terms"
},
"Proof": {
"prefix": "proof",
"body": [
"\\begin{proof}[]{$1}",
"\t$2",
"\\end{proof}"
],
"description": "Inserts a tcolorbox to show a proof"
},
"Axiom": {
"prefix": "axiom",
"body": [
"\\begin{axiom}[]{$1}",
"\t$2",
"\\end{axiom}"
],
"description": "Inserts a tcolorbox to show an axiom"
},
"Notation": {
"prefix": "notation",
"body": [
"\\begin{notation}[]{$1}",
"\t$2",
"\\end{notation}"
],
"description": "Inserts a tcolorbox to show notation"
},
"Example": { "Example": {
"prefix": "example", "prefix": "example",
"body": [ "body": [
@@ -211,233 +275,103 @@
], ],
"description": "Inserts a tcolorbox to show example" "description": "Inserts a tcolorbox to show example"
}, },
"Usage": { "Usage": {
"prefix": "usage", "prefix": "usage",
"body": [ "body": [
"\\begin{usage}[]{$1}", "\\begin{usage}[]{$1}",
"\t$2", "\t$2",
"\\end{usage}" "\\end{usage}"
], ],
"description": "Inserts a tcolorbox to inform about usage" "description": "Inserts a tcolorbox to inform about usage"
}, },
"Conjugation": { "General-Tcolorbox": {
"prefix": "conjugation", "prefix": "general-tcb",
"body": [ "body": [
"\\begin{conjugation}[]{$1}", "\\begin{general}[]{${1:title}}{${2:second title}}{${3|red,green,blue,cyan,magenta,yellow,black,gray,white,darkgray,lightgray,brown,lime,olive,orange,pink,purple,teal,violet|}}",
"\t$2", "\t$4",
"\\end{conjugation}" "\\end{general}"
], ],
"description": "Inserts a tcolorbox to inform about conjugation" "description": "Inserts a tcolorbox for general purposes. First bracket is title, second one is second title, third one colour"
}, },
"Forms": { "Simple-Tcolorbox": {
"prefix": "forms", "prefix": "simple-tcb",
"body": [ "body": [
"\\begin{forms}[]{$1}", "\\begin{simplebox}[]{${1|red,green,blue,cyan,magenta,yellow,black,gray,white,darkgray,lightgray,brown,lime,olive,orange,pink,purple,teal,violet|}}",
"\t$2", "\t$2",
"\\end{forms}" "\\end{simplebox}"
], ],
"description": "Inserts a tcolorbox to inform about forms of e.g. grammatical structures" "description": "Inserts a simple tcolorbox. No title, first argument the colour colour"
}, },
"General-Tcolorbox": { "bold": {
"prefix": "general-tcb", "prefix": "#bold",
"body": [ "body": [
"\\begin{general}[]{${1:title}}{${2:second title}}{${3|red,green,blue,cyan,magenta,yellow,black,gray,white,darkgray,lightgray,brown,lime,olive,orange,pink,purple,teal,violet|}}", "\\textbf{$1}"
"\t$4", ]
"\\end{general}" },
], "italic": {
"description": "Inserts a tcolorbox for general purposes. First bracket is title, second one is second title, third one colour" "prefix": "#i",
}, "body": [
"Simple-Tcolorbox": { "\\textit{$1}"
"prefix": "simple-tcb", ]
"body": [ },
"\\begin{simplebox}[]{${1|red,green,blue,cyan,magenta,yellow,black,gray,white,darkgray,lightgray,brown,lime,olive,orange,pink,purple,teal,violet|}}", "bolditalic": {
"\t$2", "prefix": "#bi",
"\\end{simplebox}" "body": [
], "\\textbf{\\textit{$1}}"
"description": "Inserts a simple tcolorbox. No title, first argument the colour colour" ]
}, },
"Derivative": { "underlinie": {
"prefix": "derivative", "prefix": "#u",
"body": [ "body": [
"\\frac{\\mbox{d}}{\\mbox{d}x}$1" "\\underbar{$1}"
] ]
}, },
"Example (inline)": { "angles": {
"prefix": "example-inline", "prefix": "angles",
"body": [ "body": [
"\\inlineex" "\\langle $1 \\rangle"
] ]
}, },
"Example (short)": { "fill-width": {
"prefix": "example-short", "prefix": "#fill",
"body": [ "body": [
"\\shortex" "\\hspace{\\fill}$1"
] ]
}, },
"Definition (inline)": { "Latex-Colour": {
"prefix": "definition-inline", "prefix": "colour",
"body": [ "body": [
"\\inlinedef" "${1|red,green,blue,cyan,magenta,yellow,black,gray,white,darkgray,lightgray,brown,lime,olive,orange,pink,purple,teal,violet|}"
] ]
}, },
"Definition (short)": { "Latex-Text-Colour": {
"prefix": "definition-short", "prefix": "colour-text",
"body": [ "body": [
"\\shortdef" "\\color{${1|red,green,blue,cyan,magenta,yellow,black,gray,white,darkgray,lightgray,brown,lime,olive,orange,pink,purple,teal,violet|}}"
] ]
}, },
"Theorem (inline)": { "Set Language": {
"prefix": "theorem-inline", "prefix": "setLang",
"body": [ "body": [
"\\inlinetheorem" "\\setLang{$1}"
] ]
}, },
"Theorem (short)": { "Letter": {
"prefix": "theorem-short", "prefix": "latex-letter",
"body": [ "body": [
"\\shorttheorem" "\\documentclass[12pt,a4paper]{scrlttr2}\n",
] "\\newcommand{\\dir}{~/projects/latex} % IMPORTANT: No trailing slashes!",
}, "\\input{\\dir/include.tex}",
"Lemma (inline)": { "\\load{letter}\n",
"prefix": "lemma-inline", "% Subject",
"body": [ "\\setkomavar{subject}{$1}",
"\\inlinelemma" "\\begin{document}\\raggedright",
] "\t\\begin{letter}{Company \\\\\\ Name \\\\\\ Address \\\\\\ CH-Place}",
}, "\t\t\\opening{Intro}\n",
"Lemma (short)": { "\t\t$2\n",
"prefix": "lemma-short", "\t\t\\closing{Kind regards}",
"body": [ "\t\\end{letter}",
"\\shortlemma" "\\end{document}"
] ]
}, }
"Corollary (inline)": {
"prefix": "corollary-inline",
"body": [
"\\inlinecorollary"
]
},
"Corollary (short)": {
"prefix": "corollary-short",
"body": [
"\\shortcorollary"
]
},
"Proposition (inline)": {
"prefix": "proposition-inline",
"body": [
"\\inlineproposition"
]
},
"Proposition (short)": {
"prefix": "proposition-short",
"body": [
"\\shortproposition"
]
},
"Fact (inline)": {
"prefix": "fact-inline",
"body": [
"\\inlinefact"
]
},
"Fact (short)": {
"prefix": "fact-short",
"body": [
"\\shortfact"
]
},
"Axiom (inline)": {
"prefix": "axiom-inline",
"body": [
"\\inlineaxiom"
]
},
"Axiom (short)": {
"prefix": "axiom-short",
"body": [
"\\shortaxiom"
]
},
"Proof (inline)": {
"prefix": "proof-inline",
"body": [
"\\inlineproof"
]
},
"Proof (short)": {
"prefix": "proof-short",
"body": [
"\\shortproof"
]
},
"bold": {
"prefix": "#bold",
"body": [
"\\textbf{$1}"
]
},
"italic": {
"prefix": "#i",
"body": [
"\\textit{$1}"
]
},
"bolditalic": {
"prefix": "#bi",
"body": [
"\\textbf{\\textit{$1}}"
]
},
"underlinie": {
"prefix": "#u",
"body": [
"\\underbar{$1}"
]
},
"angles": {
"prefix": "angles",
"body": [
"\\langle $1 \\rangle"
]
},
"fill-width": {
"prefix": "#fill",
"body": [
"\\hspace{\\fill}$1"
]
},
"Latex-Colour": {
"prefix": "colour",
"body": [
"${1|red,green,blue,cyan,magenta,yellow,black,gray,white,darkgray,lightgray,brown,lime,olive,orange,pink,purple,teal,violet|}"
]
},
"Latex-Text-Colour": {
"prefix": "colour-text",
"body": [
"\\color{${1|red,green,blue,cyan,magenta,yellow,black,gray,white,darkgray,lightgray,brown,lime,olive,orange,pink,purple,teal,violet|}}"
]
},
"Set Language": {
"prefix": "setLang",
"body": [
"\\setLang{$1}"
]
},
"Letter": {
"prefix": "latex-letter",
"body": [
"\\documentclass[12pt,a4paper]{scrlttr2}\n",
"\\input{~/projects/latex/dist/letter.tex}\n",
"% Subject",
"\\setkomavar{subject}{$1}",
"\\begin{document}\\raggedright",
"\t\\begin{letter}{Company \\\\\\ Name \\\\\\ Address \\\\\\ CH-Place}",
"\t\t\\opening{Intro}\n",
"\t\t$2\n",
"\t\t\\closing{Kind regards}",
"\t\\end{letter}",
"\\end{document}"
]
}
} }