Compare commits

..

12 Commits

Author SHA1 Message Date
41e1067647 tweaked avante, removed example, added generate_overview.bash 2025-07-01 20:34:13 +02:00
ace703ea1d added yaml-configs 2025-06-04 10:22:10 +02:00
da496ace05 blink: prefer_rust 2025-06-04 10:15:54 +02:00
9ab97a7867 updates 2025-06-04 10:13:16 +02:00
8e7058f4b2 aded gitignore 2025-05-05 12:34:25 +02:00
6033ab33fb added plugin-config 2025-05-05 12:28:48 +02:00
d84fcedf6b nvim to lazyvim 2025-05-05 12:25:19 +02:00
dcf119690e removed vsnip 2025-04-08 18:20:36 +02:00
a78fdf9f0d added lf, Hack font & tweaked nvim-conf 2024-10-07 12:59:48 +02:00
56d963b0e3 added pdf-shrinker 2024-03-16 18:31:56 +01:00
6145cb81b7 small config changes for markdown. 2024-03-13 14:16:09 +01:00
7ca96c831f merged 2024-02-07 18:29:23 +01:00
41 changed files with 807 additions and 541 deletions

2
.config/lf/cleaner Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
exec kitty +kitten icat --clear --stdin no --silent --transfer-mode file </dev/null >/dev/tty

2
.config/lf/lfrc Normal file
View File

@ -0,0 +1,2 @@
set previewer ~/.config/lf/previewer
set cleaner ~/.config/lf/cleaner

27
.config/lf/previewer Executable file
View File

@ -0,0 +1,27 @@
#!/bin/sh
draw() {
kitty +kitten icat --silent --stdin no --transfer-mode file --place "${w}x${h}@${x}x${y}" "$1" </dev/null >/dev/tty
exit 1
}
file="$1"
w="$2"
h="$3"
x="$4"
y="$5"
case "$(file -Lb --mime-type "$file")" in
image/*)
draw "$file"
;;
video/*)
# vidthumb is from here:
# https://raw.githubusercontent.com/duganchen/kitty-pistol-previewer/main/vidthumb
draw "$(vidthumb "$file")"
;;
text/*)
mdcat --columns "$(($4 * 7 / 9))" "$1"
;;
esac
pistol "$file"

View File

@ -40,6 +40,7 @@ $fill\
""" """
add_newline = true add_newline = true
command_timeout = 1000
# You can also replace your username with a neat symbol like  or disable this # You can also replace your username with a neat symbol like  or disable this
# and use the os module below # and use the os module below

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
lazy-lock.json

13
.markdownlint.yaml Normal file
View File

@ -0,0 +1,13 @@
# ~/.markdownlint.yaml
# Enable all rules by default
# https://github.com/markdownlint/markdownlint/blob/main/docs/RULES.md
default: true
# Allow inline HTML which is useful in Github-flavour markdown for:
# - crafting headings with friendly hash fragments.
# - adding collapsible sections with <details> and <summary>.
MD033: false
# Ignore line length rules (as Prettier handles this).
MD013: false

8
.prettierrc.yaml Normal file
View File

@ -0,0 +1,8 @@
# ~/.prettierrc.yaml
overrides:
- files:
- "*.md"
- "*.markdown"
options:
proseWrap: "always"
printWidth: 80

113
ask_llm.bash Executable file
View File

@ -0,0 +1,113 @@
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
payload=$(mktemp)
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
Script description here.
Available options:
-h, --help Print this help and exit
-v, --verbose Print script debug info
-f, --flag Some flag description
-p, --param Some param description
EOF
exit
}
cleanup() {
trap - SIGINT SIGTERM ERR EXIT
# script cleanup here
rm -rf "$payload"
}
setup_colors() {
if [[ -t 2 ]] && [[ -z "${NO_COLOR-}" ]] && [[ "${TERM-}" != "dumb" ]]; then
NOFORMAT='\033[0m' RED='\033[0;31m' GREEN='\033[0;32m' ORANGE='\033[0;33m' BLUE='\033[0;34m' PURPLE='\033[0;35m' CYAN='\033[0;36m' YELLOW='\033[1;33m'
else
NOFORMAT='' RED='' GREEN='' ORANGE='' BLUE='' PURPLE='' CYAN='' YELLOW=''
fi
}
msg() {
if [[ $# -gt 1 ]]; then
echo >&2 -e -n "${1-}${2}"
else
echo >&2 -e "${1-}"
fi
}
die() {
local msg=$1
local code=${2-1} # default exit status 1
msg "$msg"
exit "$code"
}
get_abs_filename() {
# $1 : relative filename
echo "$(cd "$(dirname "$1")" && pwd)/$(basename "$1")"
}
parse_params() {
# default values of variables set from params
#flag=0
output=''
while :; do
case "${1-}" in
-h | --help) usage ;;
-v | --verbose) set -x ;;
--no-color) NO_COLOR=1 ;;
#-f | --flag) flag=1 ;; # example flag
-i | --image)
image="${2-}"
shift
;;
-p | --prompt)
prompt="${2-}"
shift
;;
-?*) die "Unknown option: $1" ;;
*) break ;;
esac
shift
done
args=("$@")
[[ -z "${prompt-}" ]] && prompt="${args[*]-}"
# check required params and argument
[[ -z "${prompt-}" ]] && die "Missing required parameter: prompt"
return 0
}
parse_params "$@"
setup_colors
# script logic here
msg "${RED}Read parameters:${NOFORMAT}"
msg "- image: ${image-}"
msg "- prompt: ${prompt}"
msg "- arguments: ${args[*]-}"
if [[ -z "${image-}" ]]; then
echo '{ "model": "gemma3:12b", "prompt": "'"${prompt}"'" }' >"$payload"
else
abspath=$(get_abs_filename "${image}")
imgbase64=$(base64 -w 0 "${abspath}")
echo '{ "model": "gemma3:12b", "prompt": "'"${prompt}"'", "images": ["'"${imgbase64}"'"] }' >"$payload"
fi
while IFS= read -r line; do
echo "$line" | jq -j '.response'
done < <(curl -s -X POST http://gpu.dighist.geschichte.hu-berlin.de:11434/api/generate -d @"$payload")

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

45
fonts/Hack/LICENSE.md Normal file
View File

@ -0,0 +1,45 @@
The work in the Hack project is Copyright 2018 Source Foundry Authors and licensed under the MIT License
The work in the DejaVu project was committed to the public domain.
Bitstream Vera Sans Mono Copyright 2003 Bitstream Inc. and licensed under the Bitstream Vera License with Reserved Font Names "Bitstream" and "Vera"
### MIT License
Copyright (c) 2018 Source Foundry Authors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
### BITSTREAM VERA LICENSE
Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera is a trademark of Bitstream, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of the fonts accompanying this license ("Fonts") and associated documentation files (the "Font Software"), to reproduce and distribute the Font Software, including without limitation the rights to use, copy, merge, publish, distribute, and/or sell copies of the Font Software, and to permit persons to whom the Font Software is furnished to do so, subject to the following conditions:
The above copyright and trademark notices and this permission notice shall be included in all copies of one or more of the Font Software typefaces.
The Font Software may be modified, altered, or added to, and in particular the designs of glyphs or characters in the Fonts may be modified and additional glyphs or characters may be added to the Fonts, only if the fonts are renamed to names not containing either the words "Bitstream" or the word "Vera".
This License becomes null and void to the extent applicable to Fonts or Font Software that has been modified and is distributed under the "Bitstream Vera" names.
The Font Software may be sold as part of a larger software package but no copy of one or more of the Font Software typefaces may be sold by itself.
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
Except as contained in this notice, the names of Gnome, the Gnome Foundation, and Bitstream Inc., shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Font Software without prior written authorization from the Gnome Foundation or Bitstream Inc., respectively. For further information, contact: fonts at gnome dot org.

48
fonts/Hack/README.md Normal file
View File

@ -0,0 +1,48 @@
# Nerd Fonts
This is an archived font from the Nerd Fonts release v3.2.1.
For more information see:
* https://github.com/ryanoasis/nerd-fonts/
* https://github.com/ryanoasis/nerd-fonts/releases/latest/
# Hack
A typeface designed for source code.
For more information have a look at the upstream website: https://github.com/source-foundry/Hack
Version: 3.003
## Which font?
### TL;DR
* Pick your font family:
* If you are limited to monospaced fonts (because of your terminal, etc) then pick a font with `Nerd Font Mono` (or `NFM`).
* If you want to have bigger icons (usually around 1.5 normal letters wide) pick a font without `Mono` i.e. `Nerd Font` (or `NF`). Most terminals support this, but ymmv.
* If you work in a proportional context (GUI elements or edit a presentation etc) pick a font with `Nerd Font Propo` (or `NFP`).
### Ligatures
Ligatures are generally preserved in the patched fonts.
Nerd Fonts `v2.0.0` had no ligatures in the `Nerd Font Mono` fonts, this has been dropped with `v2.1.0`.
If you have a ligature-aware terminal and don't want ligatures you can (usually) disable them in the terminal settings.
### Explanation
Once you narrow down your font choice of family (`Droid Sans`, `Inconsolata`, etc) and style (`bold`, `italic`, etc) you have 2 main choices:
#### `Option 1: Download already patched font`
* For a stable version download a font package from the [release page](https://github.com/ryanoasis/nerd-fonts/releases)
* Or download the development version from the folders here
#### `Option 2: Patch your own font`
* Patch your own variations with the various options provided by the font patcher (i.e. not include all symbols for smaller font size)
For more information see: [The FAQ](https://github.com/ryanoasis/nerd-fonts/wiki/FAQ-and-Troubleshooting#which-font)
[SIL-RFN]:http://scripts.sil.org/cms/scripts/page.php?item_id=OFL_web_fonts_and_RFNs#14cbfd4a

52
generate_overview.bash Executable file
View File

@ -0,0 +1,52 @@
#!/usr/bin/env bash
if [ $# -lt 1 ]; then
echo "Usage: $0 <Document>"
exit 1
fi
MODEL="cogito:32b"
DOC=$(jq -Rs . <"$1" | sed 's/^"/"```json\\n/;s/"$/\\n```\\n"/') # Anführungszeichen escapen
SYSTEM=$(
jq -Rs . <<'EOF'
Enable deep thinking subroutine.
We are reading a scientific paper.
Please create a conceptual graphviz-diagram (using sfdp for a mindmap-like layout, setting overlap=scale). You can also use a different style within a note (as subgraph) - but only if you have a good reason for it. Use as many depth-layers as neccessary and refrain from using visible subgraphs as "collection of nodes". Also make sure all nodes are connected, are roughly sqare (i.e. **break long labels of text**) and don't overlap.
The root-node with the paper title should be a filled elipse in the center with a light gray filling.
Then define distinct base-colors for all branches of the root-node (the "concepts"). Use subtle colors-shifts within those base-colors in the (grand-)child nodes according to their "feel" (i.e. reddish for negative connotations, greenish for positive connotation, blueish for technical things, purple for social things, etc.). Like in a blue theme (i.e. tech stack) only a reddish-blue or a greenish-blue (mix of target hue into the base-color, while keeping lightness the same). Only use one consistent mix for each base-color with feel-color. Do not use red/green/blue/purple as base-colors. All base-colors should be very distinct (i.e. differ in hue by at least 20%)
Main result should be a **clear**, **concise** and **informative** graphic. You may also add a further level of leafs with more detailed information in smaller print (like cites, quotes, ...), as this is to be used as SVG and can be zoomed in, if needed.
Return your result as plain graphviz code-block without explanations. It will be used by automatic processing and has to be perfect. Use at least 2 levels of nodes.
All in all: Think beforehand what nodes you want, how they connect and when generating use "r", "r_1", "r_2_1" etc for root->branch->branch to not have name conflicts with reserved keywords (i.e. "graph", "node", ..). Also put captions in boxes properly (i.e. ["foo"] for a box with label foo).
You have only one shot. Think extensively if need be.
EOF
)
tmpfile=$(mktemp)
svgfile="$1.svg"
curl -s http://gpu.dighist.geschichte.hu-berlin.de:11434/api/chat -d '{
"model": "'"$MODEL"'",
"messages": [
{ "role": "system", "content": '"$SYSTEM"' },
{ "role": "user",
"content": "This is the document:" },
{ "role": "user",
"content": '"$DOC"' }
],
"options": {
"num_ctx": 50000,
"num_predict": 20000,
"num_batch": 64,
"num_keep": 768
},
"stream": true
}' | stdbuf -oL jq -crj '.message.content' | tee "$tmpfile"
dotfile=$(mktemp)
awk '/^```/{f = !f; next} f' "$tmpfile" >"$dotfile"
dot -Tsvg -o "$svgfile" "$dotfile"
rm "$tmpfile" "$dotfile"

15
nvim-config/.neoconf.json Normal file
View File

@ -0,0 +1,15 @@
{
"neodev": {
"library": {
"enabled": true,
"plugins": true
}
},
"neoconf": {
"plugins": {
"lua_ls": {
"enabled": true
}
}
}
}

2
nvim-config/init.lua Normal file
View File

@ -0,0 +1,2 @@
-- bootstrap lazy.nvim, LazyVim and your plugins
require("config.lazy")

View File

@ -1,541 +0,0 @@
call plug#begin('~/.local/share/nvim/site/plugged')
" airline
Plug 'https://github.com/bling/vim-airline.git'
Plug 'vim-airline/vim-airline-themes'
" git
Plug 'https://github.com/tpope/vim-fugitive.git'
" Shougos UI-Plugin
Plug 'Shougo/denite.nvim'
" Plug 'roxma/nvim-completion-manager'
" showing function-signatures/doc on completion
Plug 'Shougo/echodoc.vim'
" Tab-Completion
" Plug 'ervandew/supertab'
" vim-sourround
Plug 'https://github.com/tpope/vim-surround.git'
" theme
Plug 'https://github.com/morhetz/gruvbox.git'
Plug 'frankier/neovim-colors-solarized-truecolor-only'
" rainbow-parentethies
Plug 'luochen1990/rainbow'
" fuzzy finder
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'junegunn/fzf.vim'
" git-gutter (little + - and ~ left)
Plug 'https://github.com/airblade/vim-gitgutter.git'
" Tabular
Plug 'https://github.com/godlygeek/tabular.git'
" Multiline-Comments
Plug 'tomtom/tcomment_vim'
" Auto-Formatting
Plug 'Chiel92/vim-autoformat'
" show colors (#abc) with that background-color
Plug 'ap/vim-css-color'
" multiline-stuff
Plug 'terryma/vim-multiple-cursors'
" Icons
Plug 'ryanoasis/vim-devicons'
" Markdown-Support
Plug 'plasticboy/vim-markdown'
Plug 'dhruvasagar/vim-table-mode'
Plug 'suan/vim-instant-markdown'
" Code-Folds
Plug 'tmhedberg/SimpylFold'
" better closing
Plug 'mhinz/vim-sayonara'
" Session-Management
Plug 'xolox/vim-session' | Plug 'xolox/vim-misc'
" todo.txt
Plug 'freitass/todo.txt-vim'
" LSP
Plug 'williamboman/mason.nvim'
Plug 'williamboman/mason-lspconfig.nvim'
Plug 'neovim/nvim-lspconfig'
Plug 'hrsh7th/cmp-nvim-lsp'
Plug 'hrsh7th/cmp-buffer'
Plug 'hrsh7th/cmp-path'
Plug 'hrsh7th/cmp-cmdline'
Plug 'hrsh7th/nvim-cmp'
Plug 'onsails/lspkind.nvim'
" For vsnip users.
Plug 'hrsh7th/cmp-vsnip'
Plug 'hrsh7th/vim-vsnip'
call plug#end()
" GENERAL VIM SETUP
" set leader to space
let mapleader= "\<SPACE>"
let maplocalleader= ";"
" autocmd InsertEnter * :set number
" autocmd InsertEnter * :set norelativenumber
" autocmd InsertLeave * :set relativenumber
" autocmd InsertLeave * :set nonumber
set relativenumber
set number
set shiftwidth=2
set tabstop=2
" show cmd - especially leader
set showcmd
" expand tabs with spaces
set expandtab
" Tell Vim which characters to show for expanded TABs,
" trailing whitespace, and end-of-lines. VERY useful!
if &listchars ==# 'eol:$'
set listchars=tab:>\ ,trail:-,extends:>,precedes:<,nbsp:+
endif
set list " Show problematic characters.
" Also highlight all tabs and trailing whitespace characters.
highlight ExtraWhitespace ctermbg=darkgreen guibg=darkgreen
match ExtraWhitespace /\s\+$\|\t/
set hlsearch " Highlight search results.
set ignorecase " Make searching case insensitive
set smartcase " ... unless the query has capital letters.
set incsearch " Incremental search.
set gdefault " Use 'g' flag by default with :s/foo/bar/.
set magic " Use 'magic' patterns (extended regular expressions).
set inccommand=nosplit " Use live-preview of search/replace etc.
set conceallevel=2 " Allow things to be visually opressed (i.e. *foo* be italic)
set mouse=a " enable mouse
set foldenable " enable folding
set undofile " enable undo over sessions
set undodir="$HOME/.VIM_UNDO_FILES" " save in this path
set laststatus=3 " only 1 statusline, not 1 per window
highlight WinSeperator guibg=None
set hidden
let g:loaded_perl_provider = 0
" Remember cursor position between vim sessions
autocmd BufReadPost *
\ if line("'\"") > 0 && line ("'\"") <= line("$") |
\ exe "normal! g'\"" |
\ endif
" center buffer around cursor when opening files
autocmd BufRead * normal zz
" use <C-J> to Jump to definition instead of <C-]> (default)
nmap <C-J> <C-]>
" c-d to delete line in insert-mode
inoremap <C-D> <esc>ddi
" exit terminal-mode
tnoremap <C-t><C-t> <C-\><C-n>
" FANCY NEOVIM-MAGIC
" setup mason, language-server & nvim-cmp for completion
lua <<EOF
require("mason").setup()
require("mason-lspconfig").setup()
local has_words_before = function()
unpack = unpack or table.unpack
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
end
local feedkey = function(key, mode)
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes(key, true, true, true), mode, true)
end
-- Set up nvim-cmp.
local cmp = require'cmp'
local lspkind = require'lspkind'
cmp.setup({
snippet = {
-- REQUIRED - you must specify a snippet engine
expand = function(args)
vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users.
-- require('luasnip').lsp_expand(args.body) -- For `luasnip` users.
-- require('snippy').expand_snippet(args.body) -- For `snippy` users.
-- vim.fn["UltiSnips#Anon"](args.body) -- For `ultisnips` users.
end,
formatting = {
format = lspkind.cmp_format(),
},
},
window = {
-- completion = cmp.config.window.bordered(),
-- documentation = cmp.config.window.bordered(),
},
mapping = cmp.mapping.preset.insert({
['<C-b>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping.complete(),
['<C-e>'] = cmp.mapping.abort(),
['<CR>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
if #cmp.get_entries() == 1 then
cmp.confirm({ select = true })
else
cmp.select_next_item()
end
elseif vim.fn["vsnip#available"](1) == 1 then
feedkey("<Plug>(vsnip-expand-or-jump)", "")
elseif has_words_before() then
cmp.complete()
if #cmp.get_entries() == 1 then
cmp.confirm({ select = true })
end
else
fallback() -- The fallback function sends a already mapped key. In this case, it's probably `<Tab>`.
end
end, { "i", "s" }),
["<S-Tab>"] = cmp.mapping(function()
if cmp.visible() then
cmp.select_prev_item()
elseif vim.fn["vsnip#jumpable"](-1) == 1 then
feedkey("<Plug>(vsnip-jump-prev)", "")
end
end, { "i", "s" }),
}),
sources = cmp.config.sources({
{ name = 'nvim_lsp' },
{ name = 'vsnip' }, -- For vsnip users.
-- { name = 'luasnip' }, -- For luasnip users.
-- { name = 'ultisnips' }, -- For ultisnips users.
-- { name = 'snippy' }, -- For snippy users.
}, {
{ name = 'buffer' },
})
})
-- Set configuration for specific filetype.
cmp.setup.filetype('gitcommit', {
sources = cmp.config.sources({
{ name = 'git' }, -- You can specify the `git` source if [you were installed it](https://github.com/petertriho/cmp-git).
}, {
{ name = 'buffer' },
})
})
-- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore).
cmp.setup.cmdline({ '/', '?' }, {
mapping = cmp.mapping.preset.cmdline(),
sources = {
{ name = 'buffer' }
}
})
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
cmp.setup.cmdline(':', {
mapping = cmp.mapping.preset.cmdline(),
sources = cmp.config.sources({
{ name = 'path' }
}, {
{ name = 'cmdline' }
})
})
-- Set up lspconfig.
local capabilities = require('cmp_nvim_lsp').default_capabilities()
local on_attach = function(client, bufnr)
local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end
local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end
buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc')
end
require("lspconfig").gopls.setup {
cmd = {'gopls'},
-- on_attach = on_attach,
capabilities = capabilities,
settings = {
gopls = {
experimentalPostfixCompletions = true,
analyses = {
unusedparams = true,
shadow = true,
},
staticcheck = true,
},
},
init_options = {
usePlaceholders = true,
}
}
require("lspconfig").eslint.setup {}
require("lspconfig").jsonls.setup {}
require("lspconfig").tsserver.setup {}
require("lspconfig").ast_grep.setup {}
require("lspconfig").golangci_lint_ls.setup {}
function swallow_output(callback, ...)
local old_print = print
print = function(...) end
pcall(callback, arg)
print = old_print
end
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
vim.keymap.set('n', '<space>e', vim.diagnostic.open_float)
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev)
vim.keymap.set('n', ']d', vim.diagnostic.goto_next)
vim.keymap.set('n', '<space>q', vim.diagnostic.setloclist)
-- Use LspAttach autocommand to only map the following keys
-- after the language server attaches to the current buffer
vim.api.nvim_create_autocmd('LspAttach', {
group = vim.api.nvim_create_augroup('UserLspConfig', {}),
callback = function(ev)
-- Buffer local mappings.
-- See `:help vim.lsp.*` for documentation on any of the below functions
local opts = { buffer = ev.buf }
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts)
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts)
vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts)
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, opts)
vim.keymap.set('n', '<C-k>', vim.lsp.buf.signature_help, opts)
vim.keymap.set('n', '<space>wa', vim.lsp.buf.add_workspace_folder, opts)
vim.keymap.set('n', '<space>wr', vim.lsp.buf.remove_workspace_folder, opts)
vim.keymap.set('n', '<space>wl', function()
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
end, opts)
vim.keymap.set('n', '<space>D', vim.lsp.buf.type_definition, opts)
vim.keymap.set('n', '<space>rn', vim.lsp.buf.rename, opts)
vim.keymap.set({ 'n', 'v' }, '<space>ca', vim.lsp.buf.code_action, opts)
vim.keymap.set('n', 'gr', vim.lsp.buf.references, opts)
vim.keymap.set('v', '<space>f', function()
vim.lsp.buf.format { async = true }
end, opts)
vim.api.nvim_create_autocmd('BufWrite', {
callback = function(ev)
vim.lsp.buf.format { async = false }
end
})
end,
})
EOF
"" KEY-BINDINGS
noremap <leader>TM :TableModeToggle<CR>
" multi-cursor
let g:multi_cursor_next_key='<C-n>'
let g:multi_cursor_prev_key='<C-p>'
let g:multi_cursor_skip_key='<C-x>'
let g:multi_cursor_quit_key='<Esc>'
" Align blocks of text and keep them selected
vmap < <gv
vmap > >gv
nnoremap <leader>d "_d
vnoremap <leader>d "_d
" toggle comments
vnoremap <leader>/ :TComment<cr>
" Open file menu
nnoremap <Leader>o :Files<CR>
" Open buffer menu
nnoremap <Leader>b :Buffers<CR>
" Open most recently used files
nnoremap <Leader>f :GFiles<CR>
" Open Tag-Search
nnoremap <Leader>t :Tags<CR>
" Expand patterns in Haskell
"nnoremap <Leader>hc :GhcModSplitFunCase<CR>
" Expand function signatures in Haskell
"nnoremap <Leader>hs :GhcModSigCodegen<CR>
" Get Type-Info under Cursor
"nnoremap <Leader>ht :GhcModType<CR>
" " Copy to clipboard
vnoremap <leader>y "+y
nnoremap <leader>Y "+yg_
nnoremap <leader>y "+y
nnoremap <leader>yy "+yy
" " Paste from clipboard
nnoremap <leader>p "+p
nnoremap <leader>P "+P
vnoremap <leader>p "+p
vnoremap <leader>P "+P
" Clear stuff
nnoremap <Leader><Leader> :nohlsearch<CR>:cclose<CR>
" Clojure-Bindings
" Enable vim-iced's default key mapping
" This is recommended for newbies
let g:iced_enable_default_key_mappings = v:true
let g:sexp_enable_insert_mode_mappings = 0 " stop inserting brackets
let g:iced_enable_clj_kondo_analysis = v:true " kondo analysis
let g:iced_enable_clj_kondo_local_analysis = v:true " also analyse local.
let g:iced_enable_auto_document = 'any' " automatically open documentation
" THEME-RELATED STUFF
syntax enable
filetype plugin on
" enable true color
set termguicolors
" enable italics, load colorscheme
let g:gruvbox_italic=1
set background=dark
colorscheme gruvbox
let g:rainbow_active = 1
let &colorcolumn="80,".join(range(120,200),",")
" spell checking for markdown
autocmd BufRead,BufNewFile *.md setlocal spell complete+=kspell textwidth=80
autocmd BufRead,BufNewFile *.markdown setlocal spell complete+=kspell textwidth=80
autocmd BufRead,BufNewFile *.md hi SpellBad guibg=#582828 gui=none
autocmd BufRead,BufNewFile *.markdown hi SpellBad guibg=#582828 gui=none
" autocmd FileType markdown nnoremap <Leader>t :Toc<CR>
" set languages to english and german
set spelllang=de_de,en_us
let g:vim_markdown_toc_autofit = 0
let g:vim_markdown_emphasis_multiline = 1
let g:vim_markdown_math = 1
let g:vim_markdown_new_list_item_indent = 2
let g:vim_markdown_folding_level = 0
" disable instant-markdown-preview
let g:instant_markdown_autostart = 0
au FileType markdown setl shell=bash
let g:haskell_enable_quantification = 1 " enable highlighting of forall
let g:haskell_enable_recursivedo = 1 " enable highlighting of mdo and rec
let g:haskell_enable_arrowsyntax = 1 " enable highlighting of proc
let g:haskell_enable_pattern_synonyms = 1 " enable highlighting of pattern
let g:haskell_enable_typeroles = 1 " enable highlighting of type roles
let g:haskell_enable_static_pointers = 1 " enable highlighting of static
let g:haskell_indent_if = 3
let g:haskell_indent_case = 2
let g:haskell_indent_let = 4
let g:haskell_indent_where = 6
let g:haskell_indent_do = 3
let g:haskell_indent_in = 1
let g:haskell_indent_guard = 2
" SNIPPETS
" " Emmet customization
" " Enable Emmet in all modes
" " Remapping <C-y>, just doesn't cut it.
" function! s:expand_html_tab()
" " try to determine if we're within quotes or tags.
" " if so, assume we're in an emmet fill area.
" let line = getline('.')
" if col('.') < len(line)
" let line = matchstr(line, '[">][^<"]*\%'.col('.').'c[^>"]*[<"]')
" if len(line) >= 2
" return "\<C-n>"
" endif
" endif
" " expand anything emmet thinks is expandable.
" if emmet#isExpandable()
" return "\<C-y>,"
" endif
" " return a regular tab character
" return "\<tab>"
" endfunction
" autocmd FileType html,markdown imap <buffer><expr><tab> <sid>expand_html_tab()
" let g:user_emmet_mode='a'
" let g:user_emmet_complete_tag = 1
" let g:user_emmet_install_global = 0
" autocmd FileType html,css EmmetInstall
" AIRLINE
let g:airline#extensions#tabline#ignore_bufadd_pat = 'gundo|undotree|vimfiler|tagbar|netrw|startify|!'
let g:airline#extensions#tabline#enabled = 1
set hidden
let g:airline#extensions#tabline#fnamemod = ':t'
let g:airline#extensions#tabline#show_tab_nr = 1
let g:airline_powerline_fonts = 1
let g:airline_theme='understated'
" let g:airline_theme='base16_solarized'
cnoreabbrev <expr> x getcmdtype() == ":" && getcmdline() == 'x' ? 'Sayonara' : 'x'
nmap <leader>tt :term<cr>
nmap <leader>, :bnext<CR>
nmap <leader>. :bprevious<CR>
let g:airline#extensions#tabline#buffer_idx_mode = 1
nmap <leader>1 <Plug>AirlineSelectTab1
nmap <leader>2 <Plug>AirlineSelectTab2
nmap <leader>3 <Plug>AirlineSelectTab3
nmap <leader>4 <Plug>AirlineSelectTab4
nmap <leader>5 <Plug>AirlineSelectTab5
nmap <leader>6 <Plug>AirlineSelectTab6
nmap <leader>7 <Plug>AirlineSelectTab7
nmap <leader>8 <Plug>AirlineSelectTab8
nmap <leader>9 <Plug>AirlineSelectTab9
set guifont=Sauce\ Code\ Pro\ Nerd\ Font\ Complete:h13
" TABULARIZE
nmap <leader>t: :Tabularize /:: /l1c0l0<CR>
nmap <leader>t= :Tabularize /= /l1c0l0<CR>
nmap <leader>tp :Tabularize /\| /l1c0l0<CR>
nmap <leader>t, :Tabularize /, /l1c0l0<CR>
" Table mode
let g:table_mode_corner_corner="+"
let g:table_mode_header_fillchar="="
" Move between windows
nnoremap <M-Left> <C-W><C-H>
nnoremap <M-Down> <C-W><C-J>
nnoremap <M-Up> <C-W><C-K>
nnoremap <M-Right> <C-W><C-L>
" Move between tabs
nnoremap <M-Home> :bNext<CR>
nnoremap <M-End> :bnext<CR>
" Session-Options
let g:session_autoload='yes'
let g:session_autosave='yes'
" Change background quickly
nmap <F9> :let &background = ( &background == "dark" ? "light" : "dark" )<CR>
" BUGFIX UNTIL #6997 gets meged.
set guicursor=

39
nvim-config/lazyvim.json Normal file
View File

@ -0,0 +1,39 @@
{
"extras": [
"lazyvim.plugins.extras.coding.blink",
"lazyvim.plugins.extras.coding.luasnip",
"lazyvim.plugins.extras.coding.mini-comment",
"lazyvim.plugins.extras.coding.mini-snippets",
"lazyvim.plugins.extras.coding.mini-surround",
"lazyvim.plugins.extras.coding.nvim-cmp",
"lazyvim.plugins.extras.coding.yanky",
"lazyvim.plugins.extras.dap.core",
"lazyvim.plugins.extras.dap.nlua",
"lazyvim.plugins.extras.editor.dial",
"lazyvim.plugins.extras.editor.fzf",
"lazyvim.plugins.extras.editor.inc-rename",
"lazyvim.plugins.extras.editor.outline",
"lazyvim.plugins.extras.editor.snacks_picker",
"lazyvim.plugins.extras.editor.telescope",
"lazyvim.plugins.extras.formatting.prettier",
"lazyvim.plugins.extras.lang.json",
"lazyvim.plugins.extras.lang.markdown",
"lazyvim.plugins.extras.lang.nix",
"lazyvim.plugins.extras.lang.python",
"lazyvim.plugins.extras.lang.svelte",
"lazyvim.plugins.extras.lang.typescript",
"lazyvim.plugins.extras.linting.eslint",
"lazyvim.plugins.extras.test.core",
"lazyvim.plugins.extras.ui.dashboard-nvim",
"lazyvim.plugins.extras.ui.treesitter-context",
"lazyvim.plugins.extras.util.dot",
"lazyvim.plugins.extras.util.gitui",
"lazyvim.plugins.extras.util.mini-hipatterns",
"lazyvim.plugins.extras.util.project"
],
"install_version": 8,
"news": {
"NEWS.md": "10960"
},
"version": 8
}

View File

@ -0,0 +1,8 @@
-- Autocmds are automatically loaded on the VeryLazy event
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
--
-- Add any additional autocmds here
-- with `vim.api.nvim_create_autocmd`
--
-- Or remove existing autocmds by their group name (which is prefixed with `lazyvim_` for the defaults)
-- e.g. vim.api.nvim_del_augroup_by_name("lazyvim_wrap_spell")

View File

@ -0,0 +1,5 @@
-- Keymaps are automatically loaded on the VeryLazy event
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
-- Add any additional keymaps here
vim.keymap.set("t", "<C-t>", "<cmd>close<cr>", { desc = "Hide Terminal" })

View File

@ -0,0 +1,53 @@
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
{ out, "WarningMsg" },
{ "\nPress any key to exit..." },
}, true, {})
vim.fn.getchar()
os.exit(1)
end
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup({
spec = {
-- add LazyVim and import its plugins
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
-- import/override with your plugins
{ import = "plugins" },
},
defaults = {
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
-- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
lazy = false,
-- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
-- have outdated releases, which may break your Neovim install.
version = false, -- always use the latest git commit
-- version = "*", -- try installing the latest stable version for plugins that support semver
},
install = { colorscheme = { "tokyonight", "habamax" } },
checker = {
enabled = true, -- check for plugin updates periodically
notify = false, -- notify on update
}, -- automatically check for plugin updates
performance = {
rtp = {
-- disable some rtp plugins
disabled_plugins = {
"gzip",
-- "matchit",
-- "matchparen",
-- "netrwPlugin",
"tarPlugin",
"tohtml",
"tutor",
"zipPlugin",
},
},
},
})

View File

@ -0,0 +1,8 @@
-- Options are automatically loaded before lazy.nvim startup
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
-- Add any additional options here
vim.opt.laststatus = 3
vim.g.lazyvim_blink_main = true
vim.opt.textwidth = 120
vim.opt.spelllang = { "en", "de" }

View File

@ -0,0 +1,81 @@
return {
"yetone/avante.nvim",
event = "VeryLazy",
version = false, -- Never set this value to "*"! Never!
opts = {
-- add any opts here
-- for example
provider = "ollama",
behaviour = {
enable_cursor_planning_mode = true, -- enable cursor planning mode!
},
providers = {
ollama = {
endpoint = "http://gpu.dighist.geschichte.hu-berlin.de:11434",
model = "cogito:32b", -- your desired model (or use gpt-4o, etc.)
timeout = 30000, -- Timeout in milliseconds, increase this for reasoning models
temperature = 0,
max_completion_tokens = 40000, -- Increase this to include reasoning tokens (for reasoning models)
stream = true,
thinking = true,
--system_prompt = "Enable deep thinking subroutine.",
-- reasoning_effort = "high", -- low|medium|high, only used for reasoning models
},
deepthink = {
__inherited_from = "ollama",
model = "qwen3:32b",
max_completion_tokens = 40000,
reasoning_effort = "high",
},
},
rag_service = {
enabled = true, -- Enables the RAG service
host_mount = os.getenv("HOME"), -- Host mount path for the rag service
provider = "ollama", -- The provider to use for RAG service (e.g. openai or ollama)
llm_model = "cogito", -- The LLM model to use for RAG service
embed_model = "nomic-embed-text", -- The embedding model to use for RAG service
endpoint = "http://gpu.dighist.geschichte.hu-berlin.de:11434", -- The API endpoint for RAG service
},
},
-- if you want to build from source then do `make BUILD_FROM_SOURCE=true`
build = "make",
-- build = "powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false" -- for windows
dependencies = {
"nvim-treesitter/nvim-treesitter",
"stevearc/dressing.nvim",
"nvim-lua/plenary.nvim",
"MunifTanjim/nui.nvim",
--- The below dependencies are optional,
"echasnovski/mini.pick", -- for file_selector provider mini.pick
"nvim-telescope/telescope.nvim", -- for file_selector provider telescope
"hrsh7th/nvim-cmp", -- autocompletion for avante commands and mentions
"ibhagwan/fzf-lua", -- for file_selector provider fzf
"nvim-tree/nvim-web-devicons", -- or echasnovski/mini.icons
"zbirenbaum/copilot.lua", -- for providers='copilot'
{
-- support for image pasting
"HakonHarnes/img-clip.nvim",
event = "VeryLazy",
opts = {
-- recommended settings
default = {
embed_image_as_base64 = false,
prompt_for_file_name = false,
drag_and_drop = {
insert_mode = true,
},
-- required for Windows users
use_absolute_path = true,
},
},
},
{
-- Make sure to set this up properly if you have lazy=true
"MeanderingProgrammer/render-markdown.nvim",
opts = {
file_types = { "markdown", "Avante" },
},
ft = { "markdown", "Avante" },
},
},
}

View File

@ -0,0 +1,40 @@
return {
"saghen/blink.cmp",
dependencies = {
-- "Kaiser-Yang/blink-cmp-avante",
-- ... Other dependencies
},
opts = {
signature = { enabled = true },
fuzzy = { implementation = "prefer_rust" },
keymap = {
["<A-y>"] = {
function(cmp)
cmp.show({ providers = { "minuet" } })
end,
},
},
sources = {
default = { "lsp", "path", "buffer", "minuet" },
providers = {
-- avante = {
-- module = "blink-cmp-avante",
-- name = "Avante",
-- opts = {
-- -- options for blink-cmp-avante
-- },
-- },
minuet = {
name = "minuet",
module = "minuet.blink",
async = true,
-- Should match minuet.config.request_timeout * 1000,
-- since minuet.config.request_timeout is in seconds
timeout_ms = 10000,
score_offset = 50, -- Gives minuet higher priority among suggestions
},
},
},
},
build = "nix run .#build-plugin",
}

View File

@ -0,0 +1,14 @@
return {
"HakonHarnes/img-clip.nvim",
event = "VeryLazy",
opts = {
-- add options here
-- or leave it empty to use the default settings
extension = "avif", ---@type string
process_cmd = "convert - -quality 75 avif:-", ---@type string-
},
keys = {
-- suggested keymap
{ "<leader>ip", "<cmd>PasteImage<cr>", desc = "Paste image from system clipboard" },
},
}

View File

@ -0,0 +1,27 @@
return {
{
"nvim-lualine/lualine.nvim",
event = "VeryLazy",
config = function(_, opts)
require("lualine").setup({
sections = {
lualine_x = {
{
require("minuet.lualine"),
-- the follwing is the default configuration
-- the name displayed in the lualine. Set to "provider", "model" or "both"
-- display_name = 'both',
-- separator between provider and model name for option "both"
-- provider_model_separator = ':',
-- whether show display_name when no completion requests are active
-- display_on_idle = false,
},
"encoding",
"fileformat",
"filetype",
},
},
})
end,
},
}

View File

@ -0,0 +1,122 @@
local function get_text_fn(json)
return json.response
end
return {
{
"milanglacier/minuet-ai.nvim",
config = function()
require("minuet").setup({
virtualtext = {
auto_trigger_ft = {},
keymap = {
-- accept whole completion
accept = "<A-A>",
-- accept one line
accept_line = "<A-a>",
-- accept n lines (prompts for number)
-- e.g. "A-z 2 CR" will accept 2 lines
accept_n_lines = "<A-z>",
-- Cycle to prev completion item, or manually invoke completion
prev = "<A-[>",
-- Cycle to next completion item, or manually invoke completion
next = "<A-]>",
dismiss = "<A-e>",
},
},
provider = "openai_fim_compatible",
-- the maximum total characters of the context before and after the cursor
-- 16000 characters typically equate to approximately 4,000 tokens for
-- LLMs.
context_window = 32000,
-- when the total characters exceed the context window, the ratio of
-- context before cursor and after cursor, the larger the ratio the more
-- context before cursor will be used. This option should be between 0 and
-- 1, context_ratio = 0.75 means the ratio will be 3:1.
context_ratio = 0.75,
throttle = 0, -- only send the request every x milliseconds, use 0 to disable throttle.
-- debounce the request in x milliseconds, set to 0 to disable debounce
debounce = 100,
-- Control notification display for request status
-- Notification options:
-- false: Disable all notifications (use boolean false, not string "false")
-- "debug": Display all notifications (comprehensive debugging)
-- "verbose": Display most notifications
-- "warn": Display warnings and errors only
-- "error": Display errors only
notify = "warn",
-- The request timeout, measured in seconds. When streaming is enabled
-- (stream = true), setting a shorter request_timeout allows for faster
-- retrieval of completion items, albeit potentially incomplete.
-- Conversely, with streaming disabled (stream = false), a timeout
-- occurring before the LLM returns results will yield no completion items.
request_timeout = 10,
-- If completion item has multiple lines, create another completion item
-- only containing its first line. This option only has impact for cmp and
-- blink. For virtualtext, no single line entry will be added.
add_single_line_entry = true,
-- The number of completion items encoded as part of the prompt for the
-- chat LLM. For FIM model, this is the number of requests to send. It's
-- important to note that when 'add_single_line_entry' is set to true, the
-- actual number of returned items may exceed this value. Additionally, the
-- LLM cannot guarantee the exact number of completion items specified, as
-- this parameter serves only as a prompt guideline.
n_completions = 3,
-- Defines the length of non-whitespace context after the cursor used to
-- filter completion text. Set to 0 to disable filtering.
--
-- Example: With after_cursor_filter_length = 3 and context:
--
-- "def fib(n):\n|\n\nfib(5)" (where | represents cursor position),
--
-- if the completion text contains "fib", then "fib" and subsequent text
-- will be removed. This setting filters repeated text generated by the
-- LLM. A large value (e.g., 15) is recommended to avoid false positives.
after_cursor_filter_length = 15,
-- proxy port to use
proxy = nil,
provider_options = {
openai_compatible = {
api_key = "TERM",
name = "Ollama",
end_point = "http://gpu.dighist.geschichte.hu-berlin.de:11434/api/generate",
model = "granite3.3-fim:8b",
optional = {
max_tokens = 512,
top_p = 0.9,
},
},
openai_fim_compatible = {
api_key = "TERM",
name = "Ollama",
end_point = "http://gpu.dighist.geschichte.hu-berlin.de:11434/api/generate",
model = "granite3.3-fim:8b",
stream = true,
optional = {
max_tokens = 512,
top_p = 0.9,
},
get_text_fn = {
no_stream = function(json)
return json.response
end,
stream = function(json)
return json.response
end,
},
template = {
suffix = function(context_before_cursor, context_after_cursor)
return "<fim_prefix>"
.. context_before_cursor
.. "<fim_suffix>"
.. context_after_cursor
.. "<fim_middle>"
end,
},
},
},
})
end,
},
{ "nvim-lua/plenary.nvim" },
}

View File

@ -0,0 +1,25 @@
local opts = {
ensure_installed = {
'c',
'lua',
'vim',
'bash',
'regex',
'vimdoc',
'query',
'markdown',
'markdown_inline',
},
highlight = {
enable = true
}
}
local function config()
require('nvim-treesitter.configs').setup(opts)
end
return {
'nvim-treesitter/nvim-treesitter',
config = config,
build = ':TSUpdate',
}

View File

@ -0,0 +1,14 @@
return {
-- lazy.nvim
{
"folke/snacks.nvim",
---@type snacks.Config
opts = {
image = {
-- your image configuration comes here
-- or leave it empty to use the default settings
-- refer to the configuration section below
}
}
}
}

View File

@ -0,0 +1,19 @@
return {
{ "nvim-neotest/neotest-plenary", "nvim-neotest/neotest-jest" },
{
"nvim-neotest/neotest",
opts = {
adapters = {
"neotest-plenary",
["neotest-jest"] = {
jestCommand = "npm test --",
jestConfigFile = "custom.jest.config.ts",
env = { CI = true },
cwd = function(_)
return vim.fn.getcwd()
end,
},
},
},
},
}

3
nvim-config/stylua.toml Normal file
View File

@ -0,0 +1,3 @@
indent_type = "Spaces"
indent_width = 2
column_width = 120

20
scripts/shrinkpdf.bash Executable file
View File

@ -0,0 +1,20 @@
#!/bin/bash
for i in $@;
do
if [ -f "${i}" ]; then
gs \
-sDEVICE=pdfwrite \
-dCompatibilityLevel=1.4 \
-dPDFSETTINGS=/default \
-dNOPAUSE -dQUIET -dBATCH \
-dColorConverstionStrategy=/sRGB \
-dDownsampleColorImages=true \
-dDownsampleGrayImages=true \
-dDownsampleMonoImages=true \
-dOptimize=true \
-sOutputFile="${i}" \
"${i}_small.pdf"
else
echo "${i} is not a valid file."
fi
done