Compare commits

..

9 Commits

Author SHA1 Message Date
janishutz 9423b98d5f feat(snippets): Add double square brackets snippet 2026-04-24 11:52:35 +02:00
janishutz 2b3b2c5996 feat(lsp): Add yaml language server 2026-04-17 14:57:29 +02:00
janishutz 21bb788396 fix(keybinds): Update for nvim 0.12 2026-04-16 15:43:27 +02:00
janishutz 1a5d9f1e4b fix(tex): Install latex grammar regardless, but don't load 2026-04-14 11:42:54 +02:00
janishutz 22c5b1fc58 fix(tex): Allow texlab to control highlighting 2026-04-14 11:42:17 +02:00
janishutz c78d5756b9 feat(highlighting): TS plugin deprecated, replace with Arborist
Arborist is now used to manage the treesitter parsers,
as nvim-treesitter was archived earlier this month
2026-04-14 11:37:42 +02:00
janishutz 35a331f827 [Lua] Load luarocks modules directory 2026-03-25 10:24:31 +01:00
janishutz 792cd2f051 [Snippets] Further TS improvements 2026-03-20 16:50:31 +01:00
janishutz 0f06ba63fb [Snippets] Improve ts 2026-03-20 16:49:50 +01:00
11 changed files with 90 additions and 96 deletions
+4
View File
@@ -6,6 +6,10 @@ It uses Lazy.nvim as the plugin manager, lspconfig for the language server confi
## Linter configs ## Linter configs
You may find the linter configs and setup-scripts for some linters that require some extra setup [here](https://git.janishutz.com/janishutz/dotfiles/) You may find the linter configs and setup-scripts for some linters that require some extra setup [here](https://git.janishutz.com/janishutz/dotfiles/)
# Lua notes
To get your luarocks packages to be picked up by the language server, it is currently configured to only look at the `cwd` that nvim is open in.
I may expand that in the future to do a proper search for all open buffers, but that would require a language server restart to apply on every buffer add
# Issues with jdtls # Issues with jdtls
Ensure you have jdk21-opnejdk or newer installed. On Arch (and derivatives) you can switch the preferred java version using `archlinux-java set <version name>` Ensure you have jdk21-opnejdk or newer installed. On Arch (and derivatives) you can switch the preferred java version using `archlinux-java set <version name>`
+2 -2
View File
@@ -71,13 +71,13 @@ keymap.set("n", "<leader><leader>x", ":!chmod +x %:p<CR>", opts("make current fi
keymap.set( keymap.set(
"n", "n",
"<leader>#", "<leader>#",
":w<CR>:!chmod +x %:p<CR>ggi#!/bin/sh<CR><CR><Esc>:setfiletype bash<CR>", ":w<CR>:!chmod +x %:p<CR>ggO#!/bin/sh<CR><CR><Esc>:setfiletype bash<CR>",
opts("setup sh script") opts("setup sh script")
) )
keymap.set( keymap.set(
"n", "n",
"<leader><leader>#", "<leader><leader>#",
":set syntax=python<CR>:w<CR>:!chmod +x %:p<CR>:LspStart pyright<CR>i#!/usr/bin/env python3<CR><CR>", ":set syntax=python<CR>:w<CR>:!chmod +x %:p<CR>ggO#!/usr/bin/env python3<CR><CR>",
opts("setup python script") opts("setup python script")
) )
+3 -2
View File
@@ -20,12 +20,13 @@ lsp.config("lua_ls", {
library = { library = {
vim.fn.expand("$VIMRUNTIME/lua"), vim.fn.expand("$VIMRUNTIME/lua"),
vim.fn.stdpath("config") .. "/lua", vim.fn.stdpath("config") .. "/lua",
vim.fn.expand("~/.luarocks/share/lua/5.3"), vim.fn.expand("~/.luarocks/share/lua/5.4"),
-- To use LÖVR, follow https://lovr.org/docs/dev/VS_Code_Setup#manual-installation -- 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 -- 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) -- Then update the blow path (if you have not used the script in this repo)
vim.fn.expand("~/.local/share/lovr-docs/api/cats"), vim.fn.expand("~/.local/share/lovr-docs/api/cats"),
"/usr/share/lua/5.3", vim.fn.expand(vim.fn.getcwd() .. "/lua_modules/share/lua/5.4"),
"/usr/share/lua/5.4",
}, },
}, },
}, },
+17
View File
@@ -0,0 +1,17 @@
-- ┌ ┐
-- │ GitHub Actions │
-- └ ┘
local lsp = vim.lsp
local capabilities = require("lsp-options").capabilities
local on_attach = require("lsp-options").on_attach
lsp.config("yamlls", {
capabilities = capabilities,
on_attach = on_attach,
})
-- ── Enable configs ───────────────────────────────────────────────
local enable = vim.lsp.enable
enable("yamlls")
+1
View File
@@ -38,6 +38,7 @@ return {
require("plugins.lsp.ls.sql") 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")
require("plugins.lsp.ls.yaml")
-- ─────────────────────────────────────────────────────────────────── -- ───────────────────────────────────────────────────────────────────
end, end,
} }
+1
View File
@@ -47,6 +47,7 @@ return {
"verible", "verible",
"vtsls", "vtsls",
"vue_ls", "vue_ls",
"yamlls"
}, },
-- auto-install configured servers (with lspconfig) -- auto-install configured servers (with lspconfig)
automatic_enable = false, automatic_enable = false,
+42
View File
@@ -0,0 +1,42 @@
return {
-- Treesitter parser support
"arborist-ts/arborist.nvim",
config = function()
require("arborist").setup({
update_cadence = "weekly",
prefer_wasm = false,
install_popular = false,
ensure_installed = {
"asm",
"bash",
"c",
"cpp",
"css",
"gotmpl",
"haskell",
"helm",
"html",
"hyprlang",
"java",
"javadoc",
"javascript",
"jsdoc",
"json",
"latex",
"lua",
"markdown",
"python",
"scss",
"toml",
"typescript",
"tsx",
"xml",
"yaml",
},
ignore = {
"tex",
"latex",
},
})
end,
}
-59
View File
@@ -1,59 +0,0 @@
return {
-- syntax highlighting
"nvim-treesitter/nvim-treesitter",
branch = "master",
event = { "BufRead", "BufNewFile" },
build = ":TSUpdate",
config = function()
require("nvim-treesitter.configs").setup({
ensure_installed = {
"asm",
"bash",
"c",
"cpp",
"css",
"gotmpl",
"haskell",
"helm",
"html",
"hyprlang",
"java",
"javadoc",
"javascript",
"jsdoc",
"json",
"jsonc",
-- "latex",
"lua",
"markdown",
"meson",
"nginx",
"php",
"python",
"rasi",
"requirements",
"robots",
"ruby",
"rust",
"scss",
"sql",
"svelte",
"swift",
"toml",
"typescript",
"tsx",
"verilog",
"vue",
"xml",
"yaml",
"zathurarc",
},
sync_install = false,
highlight = {
enable = true,
disable = { "tex" },
},
})
end,
}
+6
View File
@@ -332,6 +332,12 @@
"\\langle $1 \\rangle" "\\langle $1 \\rangle"
] ]
}, },
"dblbrackets": {
"prefix": "dblbrackets",
"body": [
"\\llbracket $1 \\rrbracket"
]
},
"fill-width": { "fill-width": {
"prefix": "#fill", "prefix": "#fill",
"body": [ "body": [
+12 -27
View File
@@ -1,43 +1,28 @@
{ {
"JS-Class": {
"prefix": "jsSetupClass",
"body": "class $1 { \n\tconstructor () {} \n\n \t$2 () {\n\t$3\n\t}\n}",
"description": "Setup the basic structure of a class in JS"
},
"ExpressJS": { "ExpressJS": {
"prefix": "jsExpressSetup", "prefix": "setupExpressApp",
"body": [ "body": [
"const express = require( 'express' );", "import express from 'express';",
"import path from 'path';",
"import expressSession from 'express-session';",
"import fs from 'fs';\n",
"let app = express();", "let app = express();",
"const path = require( 'path' );", "\napp.use( expressSession ( {\n\tsecret: $1,\n\tresave: true,\n\tsaveUninitialized: false\n} ) );",
"const expressSession = require( 'express-session' );", "\n\napp.get( '/', ( request: express.Request, response: express.Response ) => {\n$4\n} );",
"const fs = require( 'fs' );", "app.use( ( _request: express.Request, response: express.Response ) => {",
"const bodyParser = require( 'body-parser' );", "\tresponse.sendFile( path.join( __dirname, '$3' ) ) \n} );",
"const cookieParser = require( 'cookie-parser' )",
"const favicon = require( 'serve-favicon' );",
"\napp.use( expressSession ( {\n\tsecret: $1,\n\tresave: true,\n\tsaveUninitialized: true\n} ) );",
"app.use( bodyParser.urlencoded( { extended: false } ) );",
"app.use( bodyParser.json() );",
"app.use( cookieParser() );",
"app.use( favicon( path.join( __dirname + '$2' ) ) );\n",
"app.use( ( request, response, next ) => {\n\tresponse.sendFile( path.join( __dirname + '$3' ) ) \n} );",
"\n\napp.get( '/', ( request, response ) => {\n$4\n} );",
"\n\nconst PORT = process.env.PORT || 8080;", "\n\nconst PORT = process.env.PORT || 8080;",
"http.createServer( app ).listen( PORT );" "app.listen( PORT );"
] ]
}, },
"ExpressJS-Route": { "ExpressJS-Route": {
"prefix": "jsEjsRoute", "prefix": "expressRoute",
"body": "\n\napp.get( '$1', ( request: express.Request, response: express.Response ) => {\n$4\n} );" "body": "\n\napp.get( '$1', ( request: express.Request, response: express.Response ) => {\n$4\n} );"
}, },
"JSAsync": { "JSAsync": {
"prefix": "jsAsync", "prefix": "async-sync",
"body": "(async () => {\n$1\n} ) ();" "body": "(async () => {\n$1\n} ) ();"
}, },
"JSpromiseReturnFunc": {
"prefix": "jsPromise",
"body": "function $1 () {\n\treturn new Promise( ( resolve, reject ) => {\n\t$2\n\t} );\n}"
},
"fetch from other url": { "fetch from other url": {
"prefix": "remoteURL", "prefix": "remoteURL",
"body": [ "body": [
+1 -5
View File
@@ -9,13 +9,9 @@
"description": "Setup the basic structure of a class in JS" "description": "Setup the basic structure of a class in JS"
}, },
"JSAsync": { "JSAsync": {
"prefix": "jsAsync", "prefix": "async-sync",
"body": "(async () => {\n$1\n} ) ();" "body": "(async () => {\n$1\n} ) ();"
}, },
"JSpromiseReturnFunc": {
"prefix": "jsPromise",
"body": "function $1 () {\n\treturn new Promise( ( resolve, reject ) => {\n\t$2\n\t} );\n}"
},
"fetch from other url": { "fetch from other url": {
"prefix": "remoteURL", "prefix": "remoteURL",
"body": [ "body": [