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

@@ -18,15 +18,20 @@ lsp.config("lua_ls", {
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

@@ -28,11 +28,12 @@ return {
"asm_lsp", "asm_lsp",
"bashls", "bashls",
"clangd", "clangd",
"cmake",
"cssls", "cssls",
"docker_language_server", "docker_language_server",
"gh_actions_ls",
"gopls", "gopls",
"html", "html",
"hls",
"hyprls", "hyprls",
"jdtls", "jdtls",
"jsonls", "jsonls",
@@ -42,12 +43,13 @@ return {
"pyright", "pyright",
"rust_analyzer", "rust_analyzer",
"ruby_lsp", "ruby_lsp",
"sqlls",
"verible", "verible",
"vtsls", "vtsls",
"vue_ls", "vue_ls",
}, },
-- auto-install configured servers (with lspconfig) -- auto-install configured servers (with lspconfig)
automatic_enable = false automatic_enable = false,
}) })
end, end,
} }

View File

@@ -12,6 +12,9 @@ return {
"c", "c",
"cpp", "cpp",
"css", "css",
"gotmpl",
"haskell",
"helm",
"html", "html",
"hyprlang", "hyprlang",
"java", "java",

View File

@@ -3,15 +3,97 @@
"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",
"\\usepackage{lmodern}",
"\\setFontType{sans}\n",
"\\setup{$1}\n", "\\setup{$1}\n",
"\\begin{document}", "\\begin{document}",
"\\startDocument", "\\startDocument\n\n",
"\\usetcolorboxes",
"$2\n\n", "$2\n\n",
"\\end{document}" "\\end{document}"
], ],
"description": "Prepares a full LaTeX Document for use and compiling" "description": "Prepares a simple LaTeX Document"
},
"LaTeX CheatSheet Setup": {
"prefix": "latex-cheatsheet",
"body": [
"\\documentclass{article}\n",
"\\input{~/projects/latex/janishutz-helpers.tex}\n",
"\\usepackage{lmodern}",
"\\setFontType{sans}\n",
"\\setupCheatSheet{$1}\n",
"\\begin{document}",
"\\startDocument\n\n",
"$2\n\n",
"\\end{document}"
],
"description": "Prepares to write a LaTeX CheatSheet"
},
"Full Summary LaTeX Setup": {
"prefix": "latex-summary",
"body": [
"\\documentclass{article}\n",
"\\input{~/projects/latex/janishutz-helpers.tex}\n",
"\\usepackage{lmodern}",
"\\setFontType{sans}\n",
"\\setup{$1}\n",
"\\begin{document}",
"\\startDocument\n",
"\\vspace{1cm}",
"\\begin{center}",
"\t\\includegraphics[width=0.5\\linewidth]{~/projects/latex/assets/logo.jpg}",
"\\end{center}\n\n",
"\\vspace{2cm}",
"\\begin{center}",
"\t\\begin{Large}",
"\t\t\\quote{A funny quote by a professor}",
"\t\\end{Large}\n",
"\t\\hspace{3cm} - Prof. Dr. Professor Name, YEAR",
"\\end{center}\n",
"\\vspace{1.5cm}",
"\\begin{center}",
"\tSEMESTER, ETHZ\n",
"\t\\begin{Large}",
"\t\tSummary of the Script and Lectures",
"\t\\end{Large}",
"\\end{center}\n\n",
"\\newpage",
"\\printtoc{Aquamarine}\n\n",
"$2\n\n",
"\\end{document}"
],
"description": "Prepares a full LaTeX Summary"
},
"LaTeX Beamer Setup": {
"prefix": "latex-beamer",
"body": [
"\\documentclass{beamer}\n",
"\\input{~/projects/latex/janishutz-helpers.tex}\n",
"\\usepackage{lmodern}",
"\\setFontType{sans}\n",
"\\title{$1}",
"\\author{\\authorTitle}\n",
"\\usetheme{default}",
"\\usecolortheme{beaver}\n",
"\\AtBeginSection[]{",
"\t\\begin{frame}",
"\t\\frametitle{Table of Contents}",
"\t\\tableofcontents[currentsection]",
"\t\\end{frame}",
"}\n",
"\\begin{document}\n",
"\\frame{\\titlepage}\n\n",
"\\begin{frame}\n",
"\t\\frametitle{Table of Contents}",
"\t\\tableofcontents",
"\\end{frame}\n\n",
"\\begin{frame}\n",
"\t\\frametitle{$2}",
"\t$3",
"\\end{frame}\n\n",
"\\end{document}"
],
"description": "Prepares to write a LaTeX CheatSheet"
}, },
"Fancy table": { "Fancy table": {
"prefix": "table", "prefix": "table",
@@ -47,18 +129,9 @@
"\t$2", "\t$2",
"\\end{recall}" "\\end{recall}"
], ],
"description": "Inserts a tcolorbox to provide a recall / revision of previous knowledge (yellow)" "description": "Inserts a tcolorbox to point out / revise of previous knowledge (yellow)"
}, },
"Important Remarks": { "Remark": {
"prefix": "remarks",
"body": [
"\\begin{remark}[]{$1}",
"\t$2",
"\\end{remark}"
],
"description": "Inserts a tcolorbox to provide remarks (green), but here numbered"
},
"Remark (numbered)": {
"prefix": "remark", "prefix": "remark",
"body": [ "body": [
"\\begin{remarks}[]{$1}", "\\begin{remarks}[]{$1}",
@@ -67,15 +140,6 @@
], ],
"description": "Inserts a tcolorbox to provide remarks (green)" "description": "Inserts a tcolorbox to provide remarks (green)"
}, },
"Guides": {
"prefix": "guides",
"body": [
"\\begin{guides}[]{$1}{${2:Usage}}",
"\t$2",
"\\end{guides}"
],
"description": "Inserts a tcolorbox to provide guides / instructions on how to use (red)"
},
"Properties": { "Properties": {
"prefix": "properties", "prefix": "properties",
"body": [ "body": [
@@ -119,7 +183,7 @@
"\t$2", "\t$2",
"\\end{theorem}" "\\end{theorem}"
], ],
"description": "Inserts a tcolorbox to inform about theorems" "description": "Inserts a tcolorbox to state a theorem"
}, },
"Lemma": { "Lemma": {
"prefix": "lemma", "prefix": "lemma",
@@ -128,7 +192,7 @@
"\t$2", "\t$2",
"\\end{lemma}" "\\end{lemma}"
], ],
"description": "Inserts a tcolorbox to inform about lemmas" "description": "Inserts a tcolorbox to state a lemma"
}, },
"Corollary": { "Corollary": {
"prefix": "corollary", "prefix": "corollary",
@@ -137,7 +201,7 @@
"\t$2", "\t$2",
"\\end{corollary}" "\\end{corollary}"
], ],
"description": "Inserts a tcolorbox to inform about corollaries" "description": "Inserts a tcolorbox to state a corollary"
}, },
"Proposition": { "Proposition": {
"prefix": "proposition", "prefix": "proposition",
@@ -146,7 +210,7 @@
"\t$2", "\t$2",
"\\end{proposition}" "\\end{proposition}"
], ],
"description": "Inserts a tcolorbox to inform about propositions" "description": "Inserts a tcolorbox to state a proposition"
}, },
"Fact": { "Fact": {
"prefix": "fact", "prefix": "fact",
@@ -155,7 +219,7 @@
"\t$2", "\t$2",
"\\end{fact}" "\\end{fact}"
], ],
"description": "Inserts a tcolorbox to inform about facts" "description": "Inserts a tcolorbox to state a fact"
}, },
"Terms": { "Terms": {
"prefix": "terms", "prefix": "terms",
@@ -220,24 +284,6 @@
], ],
"description": "Inserts a tcolorbox to inform about usage" "description": "Inserts a tcolorbox to inform about usage"
}, },
"Conjugation": {
"prefix": "conjugation",
"body": [
"\\begin{conjugation}[]{$1}",
"\t$2",
"\\end{conjugation}"
],
"description": "Inserts a tcolorbox to inform about conjugation"
},
"Forms": {
"prefix": "forms",
"body": [
"\\begin{forms}[]{$1}",
"\t$2",
"\\end{forms}"
],
"description": "Inserts a tcolorbox to inform about forms of e.g. grammatical structures"
},
"General-Tcolorbox": { "General-Tcolorbox": {
"prefix": "general-tcb", "prefix": "general-tcb",
"body": [ "body": [
@@ -256,120 +302,6 @@
], ],
"description": "Inserts a simple tcolorbox. No title, first argument the colour colour" "description": "Inserts a simple tcolorbox. No title, first argument the colour colour"
}, },
"Derivative": {
"prefix": "derivative",
"body": [
"\\frac{\\mbox{d}}{\\mbox{d}x}$1"
]
},
"Example (inline)": {
"prefix": "example-inline",
"body": [
"\\inlineex"
]
},
"Example (short)": {
"prefix": "example-short",
"body": [
"\\shortex"
]
},
"Definition (inline)": {
"prefix": "definition-inline",
"body": [
"\\inlinedef"
]
},
"Definition (short)": {
"prefix": "definition-short",
"body": [
"\\shortdef"
]
},
"Theorem (inline)": {
"prefix": "theorem-inline",
"body": [
"\\inlinetheorem"
]
},
"Theorem (short)": {
"prefix": "theorem-short",
"body": [
"\\shorttheorem"
]
},
"Lemma (inline)": {
"prefix": "lemma-inline",
"body": [
"\\inlinelemma"
]
},
"Lemma (short)": {
"prefix": "lemma-short",
"body": [
"\\shortlemma"
]
},
"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": { "bold": {
"prefix": "#bold", "prefix": "#bold",
"body": [ "body": [
@@ -428,7 +360,9 @@
"prefix": "latex-letter", "prefix": "latex-letter",
"body": [ "body": [
"\\documentclass[12pt,a4paper]{scrlttr2}\n", "\\documentclass[12pt,a4paper]{scrlttr2}\n",
"\\input{~/projects/latex/dist/letter.tex}\n", "\\newcommand{\\dir}{~/projects/latex} % IMPORTANT: No trailing slashes!",
"\\input{\\dir/include.tex}",
"\\load{letter}\n",
"% Subject", "% Subject",
"\\setkomavar{subject}{$1}", "\\setkomavar{subject}{$1}",
"\\begin{document}\\raggedright", "\\begin{document}\\raggedright",