Compare commits
No commits in common. "15afe9a85a437c0e3ca556e12e8fb306743fcd4e" and "12d186d871857180bcb2df415118c1912bd22759" have entirely different histories.
15afe9a85a
...
12d186d871
25 changed files with 731 additions and 838 deletions
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -4,6 +4,3 @@
|
|||
[submodule "scripts/.local/share/uoeia"]
|
||||
path = scripts/.local/share/uoeia
|
||||
url = https://git.martyoeh.me/Marty/uoeia.git
|
||||
[submodule "multimedia/.local/share/vimiv/plugins/batchmark"]
|
||||
path = multimedia/.local/share/vimiv/plugins/batchmark
|
||||
url = https://github.com/jcjgraf/BatchMark
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
Name Description Source Target Injections
|
||||
aaxtomp3 Convert Audible's .aax filetype to MP3, FLAC, M4A, or OPUS A
|
||||
abduco Tool for session {at,de}tach support which allows a process to run independently from its controlling terminal R
|
||||
acpid A daemon for delivering ACPI power management events with netlink support R
|
||||
afew Initial tagging script for notmuch mail R
|
||||
alias-tips-git An oh-my-zsh plugin to help remembering those aliases you defined once A
|
||||
|
@ -19,7 +18,6 @@ aspell-en English dictionary for aspell R
|
|||
atool A script for managing file archives of various types R
|
||||
atuin Magical shell history R
|
||||
aubio A tool for extracting annotations from audio signals R
|
||||
auto-cpufreq Automatic CPU speed & power optimizer A
|
||||
autofs A kernel-based automounter for Linux A
|
||||
barrier Open-source KVM software based on Synergy (GUI) R
|
||||
base Minimal package set to define a basic Arch Linux installation R
|
||||
|
@ -238,15 +236,12 @@ python-adblock Brave's adblock library in Python R
|
|||
python-dictcc commandline tool for dict.cc A
|
||||
python-docs Set of HTML documentation for python R
|
||||
python-html2text A HTML to markdown-structured text converter R
|
||||
python-jupytext Jupyter notebooks as Markdown documents, Julia, Python or R scripts A
|
||||
python-openpyxl A Python library to read/write Excel 2007 xlsx/xlsm files R
|
||||
python-pagelabels Python library to manipulate PDF page numbers and labels. A
|
||||
python-pancritic CriticMarkdup parser with optional pandoc backend A
|
||||
python-pdfminer Python PDF Parser R
|
||||
python-pip The PyPA recommended tool for installing Python packages R
|
||||
python-pipx Install and Run Python Applications in Isolated Environments R
|
||||
python-poethepoet A task runner that works well with poetry A
|
||||
python-polars-bin Blazingly fast DataFrames library using Apache Arrow Columnar Format as memory model A
|
||||
python-pybluez Python wrapper for the BlueZ Bluetooth stack R
|
||||
python-pybtex A BibTeX-compatible bibliography processor written in Python R
|
||||
python-pynvim Python client for Neovim R
|
||||
|
@ -277,7 +272,6 @@ rivercarro A slightly modified version of rivertile layout generator for river.
|
|||
rng-tools Random number generator related utilities R
|
||||
sc-im A spreadsheet program based on SC A
|
||||
scc Sloc, Cloc and Code: a very fast accurate code counter with complexity calculations and COCOMO estimates written in pure Go A
|
||||
scc-bin Sloc, Cloc and Code: scc is a very fast accurate code counter with complexity calculations and COCOMO estimates written in pure Go A
|
||||
scrcpy Display and control your Android device R
|
||||
screen Full-screen window manager that multiplexes a physical terminal R
|
||||
sd Intuitive find & replace R
|
||||
|
@ -296,7 +290,8 @@ sudo Give certain users the ability to run some commands as root R
|
|||
surfraw Shell Users' Revolutionary Front Rage Against the Web R
|
||||
swaybg Wallpaper tool for Wayland compositors R
|
||||
swayidle Idle management daemon for Wayland R
|
||||
swww A Solution to your Wayland Wallpaper Woes R
|
||||
swww A Solution to your Wayland Wallpaper Woes A
|
||||
swww Efficient animated wallpaper daemon for wayland, controlled at runtime. A
|
||||
task-spooler Queue up tasks from the shell for batch execution A
|
||||
taskopen Script for taking notes and open urls with taskwarrior A
|
||||
tasksh A shell command that wraps Taskwarrior commands A
|
||||
|
@ -305,7 +300,6 @@ tectonic Modernized, complete, self-contained TeX/LaTeX engine, powered by XeTeX
|
|||
termdown Countdown timer and stopwatch in your terminal R
|
||||
tex-gyre-fonts Substitute PostScript fonts in OpenType format R
|
||||
texlab A cross-platform implementation of the Language Server Protocol for LaTeX. R
|
||||
tgpt-bin ChatGPT in terminal without needing API keys A
|
||||
thermald The Linux Thermal Daemon program from 01.org R
|
||||
tidy-viewer CLI csv pretty printer that uses column styling A
|
||||
timew Timewarrior, A command line time tracking application R
|
||||
|
@ -355,7 +349,6 @@ wf-recorder Screen recorder for wlroots-based compositors such as sway R
|
|||
wget Network utility to retrieve files from the Web R
|
||||
wireguard-tools next generation secure network tunnel - tools for configuration R
|
||||
wireless_tools Tools allowing to manipulate the Wireless Extensions R
|
||||
wl-mirror a simple Wayland output mirror client R
|
||||
wlopm Wayland output power management. A
|
||||
wlsunset Day/night gamma adjustments for Wayland compositors A
|
||||
wlsunset Day/night gamma adjustments for Wayland compositors R
|
||||
|
|
Can't render this file because it has a wrong number of fields in line 30.
|
|
@ -3,7 +3,7 @@
|
|||
mod="Mod4"
|
||||
modemod="Mod1"
|
||||
term=${TERMINAL:-foot}
|
||||
layout="filtile"
|
||||
layout="rivercarro"
|
||||
time_to_lockscreen=300
|
||||
time_to_screendim=600
|
||||
time_to_suspend=900
|
||||
|
@ -58,9 +58,8 @@ riverctl map normal $mod backspace spawn "powermenu"
|
|||
riverctl map normal None XF86Search spawn "qutedmenu"
|
||||
riverctl map normal $mod+Shift O spawn "qutedmenu"
|
||||
|
||||
# Clipboard history
|
||||
# Open clipboard history
|
||||
riverctl map normal $mod+Shift Space spawn "clipman pick --tool=bemenu"
|
||||
riverctl map normal $mod+Shift+Control Space spawn "clipman clear --all"
|
||||
|
||||
# Open floating calculator
|
||||
riverctl map normal $mod+Shift R spawn "$term -e --class float qalc"
|
||||
|
@ -129,8 +128,8 @@ riverctl map normal $mod F toggle-fullscreen
|
|||
# Make all connected outputs show the desktop and no windows at all
|
||||
riverctl map normal $mod+Shift M spawn 'for i in $(wlopm | wc -l); do riverctl set-focused-tags $((1 << 10)); riverctl focus-output next; done; riverctl set-focused-tags $((1 << 10)); riverctl focus-output next'
|
||||
|
||||
riverctl map normal $mod+Shift F10 spawn "riverctl send-layout-cmd $layout '--tags all --output all view-padding 0'"
|
||||
riverctl map normal $mod F10 spawn "riverctl send-layout-cmd $layout '--tags all --output all view-padding 6'"
|
||||
riverctl map normal $mod+Shift F10 spawn "riverctl send-layout-cmd $layout 'gaps 0'"
|
||||
riverctl map normal $mod F10 spawn "riverctl send-layout-cmd $layout 'gaps 6'"
|
||||
|
||||
# toggle float
|
||||
riverctl map normal $mod+Shift v toggle-float
|
||||
|
@ -292,12 +291,8 @@ riverctl spawn "wl-paste -t text --watch clipman store"
|
|||
# /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
|
||||
# start layouting engine
|
||||
killall $layout
|
||||
riverctl spawn "$layout\
|
||||
--tags all --output all main-ratio 0.65,\
|
||||
--tags all --output all view-padding 6,\
|
||||
--tags all --output all outer-padding 0,\
|
||||
--tags all --output all smart-padding on,\
|
||||
--tags all --output all smart-padding 0"
|
||||
riverctl spawn "$layout -main-ratio 0.65"
|
||||
# River will send the process group of the init executable SIGTERM on exit.
|
||||
riverctl default-layout $layout
|
||||
# exec $layout -main-ratio 0.65 -view-padding 6 -outer-padding 6 & # -> does not work with current rivercarro version (0.1.4)
|
||||
brightnessctl set 70%
|
||||
|
|
|
@ -145,7 +145,7 @@
|
|||
"format": "{} ",
|
||||
},
|
||||
"river/window": {
|
||||
"format": " {}",
|
||||
"format": " {}",
|
||||
"max-length": 70
|
||||
},
|
||||
"temperature": {
|
||||
|
@ -166,11 +166,8 @@
|
|||
"interval": 3600
|
||||
},
|
||||
"custom/wireguard": {
|
||||
"format": "{icon}",
|
||||
"format-icons": {
|
||||
"default": "",
|
||||
"pia": "",
|
||||
"netbird": ""
|
||||
"default": ""
|
||||
},
|
||||
"exec": "~/.config/waybar/modules/wireguard json",
|
||||
"exec-if": "command -v nmcli >/dev/null 2>&1",
|
||||
|
|
|
@ -41,8 +41,9 @@ connected=()
|
|||
available=()
|
||||
|
||||
function print_as_json() {
|
||||
text="${1%% |*}" # prints out name of first vpn it finds
|
||||
alt="${1%%:*}"
|
||||
text="" # only prints a single icon when connected
|
||||
# text="${1}" # use this line to show all output in text
|
||||
alt="${1}"
|
||||
tooltip="${1}"
|
||||
[ -n "$1" ] && class="connected" || class="disconnected"
|
||||
printf "{\"text\": \"%s\", \"alt\": \"%s\", \"tooltip\": \"%s\", \"class\": \"%s\"}" \
|
||||
|
@ -78,19 +79,7 @@ function get_pia {
|
|||
|
||||
status=$(piactl get connectionstate)
|
||||
if [[ $status = "Connected" ]]; then
|
||||
connected+=("pia: $(piactl get vpnip)")
|
||||
fi
|
||||
}
|
||||
|
||||
function get_netbird {
|
||||
if ! command -v netbird >/dev/null 2>&1 || [ "$(systemctl is-active netbird)" == "inactive" ]; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
status="$(netbird status)"
|
||||
|
||||
if echo "$status" | grep -q "^Signal: Connected"; then
|
||||
connected+=("netbird:$(echo "$status" | grep "^NetBird IP:" | cut -d':' -f2)")
|
||||
connected+=("$(piactl get region): $(piactl get vpnip)")
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -133,22 +122,19 @@ function array_contains {
|
|||
}
|
||||
|
||||
if [[ $nargs == 0 ]] || [[ $printjson = "yes" ]]; then
|
||||
get_pia
|
||||
get_netbird
|
||||
get_conns "$wgactive"
|
||||
get_pia
|
||||
print_conns connected
|
||||
|
||||
elif [[ $showmenu == "yes" ]]; then
|
||||
get_pia
|
||||
get_netbird
|
||||
get_conns "$wgconns"
|
||||
get_pia
|
||||
print_conns connected "list"
|
||||
print_conns available "list"
|
||||
|
||||
elif [[ $dotoggle == "yes" ]]; then
|
||||
get_pia
|
||||
get_netbird
|
||||
get_conns "$wgconns"
|
||||
get_pia
|
||||
|
||||
if [[ "$(array_contains connected "$conn")" == "yes" ]]; then
|
||||
$nmclicmd down "$conn"
|
||||
|
|
|
@ -26,15 +26,11 @@ k : scroll up
|
|||
? : search --reverse
|
||||
N : search-next
|
||||
P : search-prev
|
||||
za : set library.show_hidden!
|
||||
zh : set library.show_hidden!
|
||||
b : set statusbar.show!
|
||||
tl : toggle library
|
||||
tm : toggle manipulate
|
||||
tt : toggle thumbnail
|
||||
V : batchmark-toggle
|
||||
a : scale --level 1.0
|
||||
s : scale --level fit
|
||||
S : scale --level fit-width
|
||||
|
||||
[IMAGE]
|
||||
M : center
|
||||
|
@ -89,7 +85,6 @@ H : set library.width -0.05
|
|||
$ : end-of-line
|
||||
<button-right> : enter library
|
||||
^ : first-of-line
|
||||
0 : first-of-line
|
||||
<ctrl>d : scroll half-page-down
|
||||
<ctrl>u : scroll half-page-up
|
||||
<button-back> : scroll left
|
||||
|
|
|
@ -43,7 +43,7 @@ left_thumbnail = {thumbnail-index}/{thumbnail-total} {thumbnail-basename}{read-o
|
|||
left_manipulate = {basename} {image-size} Modified: {modified} {processing}
|
||||
center_thumbnail = {thumbnail-size}
|
||||
center = {slideshow-indicator} {slideshow-delay} {transformation-info}
|
||||
right = {keys} {batchmark} {mark-count} {mode}
|
||||
right = {keys} {mark-count} {mode}
|
||||
right_image = {keys} {mark-indicator} {mark-count} {mode}
|
||||
|
||||
[KEYHINT]
|
||||
|
@ -71,7 +71,6 @@ shuffle = False
|
|||
[PLUGINS]
|
||||
print = default
|
||||
metadata = default
|
||||
batchmark =
|
||||
|
||||
[ALIASES]
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@ iabbrev grwoth growth
|
|||
iabbrev Grwoth Growth
|
||||
iabbrev teh the
|
||||
iabbrev projcets projects
|
||||
iabbrev midex mixed
|
||||
|
||||
" Text expansion
|
||||
iabbrev mo@ marty.oehme@gmail.com
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
"cmp-treesitter": { "branch": "master", "commit": "958fcfa0d8ce46d215e19cc3992c542f576c4123" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
||||
"completion-vcard": { "branch": "master", "commit": "2220fd517a985ececed1adcf0e5be8f2815564c7" },
|
||||
"conform.nvim": { "branch": "master", "commit": "acc7337cfd24ddfa3109bfc8c258c09c88c5c450" },
|
||||
"conform.nvim": { "branch": "master", "commit": "ae213f5169d5d0c6abbe76e1438d932772fc1657" },
|
||||
"dial.nvim": { "branch": "master", "commit": "54b503f906bc9e5ab85288414840a1b86d40769f" },
|
||||
"dressing.nvim": { "branch": "master", "commit": "71349f24c6e07b39f33600985843c289ca735308" },
|
||||
"fidget.nvim": { "branch": "main", "commit": "ef99df04a1c53a453602421bc0f756997edc8289" },
|
||||
|
@ -33,10 +33,11 @@
|
|||
"git-conflict.nvim": { "branch": "main", "commit": "bfd9fe6fba9a161fc199771d85996236a0d0faad" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "0b04035bb7b3c83e999b9676e2fb46fd0aa9f910" },
|
||||
"glance.nvim": { "branch": "master", "commit": "51059bcf21016387b6233c89eed220cf47fca752" },
|
||||
"headlines.nvim": { "branch": "master", "commit": "618ef1b2502c565c82254ef7d5b04402194d9ce3" },
|
||||
"image.nvim": { "branch": "master", "commit": "da64ce69598875c9af028afe129f916b02ccc42e" },
|
||||
"img-clip.nvim": { "branch": "main", "commit": "fc30500c35663aa1762697f5aba31d43b86028f0" },
|
||||
"jupytext.nvim": { "branch": "main", "commit": "c8baf3ad344c59b3abd461ecc17fc16ec44d0f7b" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "077102c5bfc578693f12377846d427f49bc50076" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "839f9e78e78dc935b1188fb16583365991739c51" },
|
||||
"lsp-setup.nvim": { "branch": "main", "commit": "6e4e977512ce426d8b52c27f3b6e6aefc73e1452" },
|
||||
"ltex_extra.nvim": { "branch": "dev", "commit": "57192d7ae5ba8cef3c10e90f2cd62d4a7cdaab69" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "544dd1583f9bb27b393f598475c89809c4d5e86b" },
|
||||
|
@ -49,15 +50,15 @@
|
|||
"mdeval.nvim": { "branch": "master", "commit": "2c32e2f3e7d8f222e7a4724989f218d036e1081d" },
|
||||
"mini.nvim": { "branch": "main", "commit": "19e1584124cda35388d4fdb911eab7124014e541" },
|
||||
"molten-nvim": { "branch": "main", "commit": "eb6d0fe33e14989b0f1fbe25d9732889ee57bd1a" },
|
||||
"neogen": { "branch": "main", "commit": "7545cdc8cdfa46b17040968e5aaa3e49e29fdf3f" },
|
||||
"neogen": { "branch": "main", "commit": "0daffcec249bf42275e322361fe55b89a05ff278" },
|
||||
"neotest": { "branch": "master", "commit": "32ff2ac21135a372a42b38ae131e531e64833bd3" },
|
||||
"neotest-python": { "branch": "master", "commit": "81d2265efac717bb567bc15cc652ae10801286b3" },
|
||||
"nvim-FeMaco.lua": { "branch": "main", "commit": "96bbf843595dbe865838b3f2484b73557f34700c" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "d818fd0624205b34e14888358037fb6f5dc51234" },
|
||||
"nvim-colorizer.lua": { "branch": "master", "commit": "194ec600488f7c7229668d0e80bd197f3a2b84ff" },
|
||||
"nvim-colorizer.lua": { "branch": "master", "commit": "08bd34bf0ed79723f62764c7f9ca70516d461d0d" },
|
||||
"nvim-coverage": { "branch": "main", "commit": "aa4b4400588e2259e87e372b1e4e90ae13cf5a39" },
|
||||
"nvim-lint": { "branch": "master", "commit": "efc6fc83f0772283e064c53a8f9fb5645bde0bc0" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "f95d371c1a274f60392edfd8ea5121b42dca736e" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "fa6c2a64100c6f692bbec29bbbc8ec2663c9e869" },
|
||||
"nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" },
|
||||
"nvim-surround": { "branch": "main", "commit": "ec2dc7671067e0086cdf29c2f5df2dd909d5f71f" },
|
||||
"nvim-toggleterm.lua": { "branch": "main", "commit": "48be57eaba817f038d61bbf64d2c597f578c0827" },
|
||||
|
@ -66,7 +67,7 @@
|
|||
"nvim-treesitter-context": { "branch": "master", "commit": "5efba33af0f39942e426340da7bc15d7dec16474" },
|
||||
"nvim-treesitter-endwise": { "branch": "master", "commit": "8b34305ffc28bd75a22f5a0a9928ee726a85c9a6" },
|
||||
"nvim-treesitter-textsubjects": { "branch": "master", "commit": "a8d2844bba925d9450ef7ab215f3b054028288ca" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "dc5e1687ab76ee02e0f11c5ce137f530b36e98b3" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "1624866a1379fc1861797f0ed05899a9c1d2ff61" },
|
||||
"nvim-ts-context-commentstring": { "branch": "main", "commit": "6b5f95aa4d24f2c629a74f2c935c702b08dbde62" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "5b9067899ee6a2538891573500e8fd6ff008440f" },
|
||||
"otter.nvim": { "branch": "main", "commit": "837f258040d0174ff8495584088046f98499b1ac" },
|
||||
|
@ -75,23 +76,22 @@
|
|||
"popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" },
|
||||
"quarto-nvim": { "branch": "main", "commit": "09fabb62d414e56ee3245c558aaedbdc662b6493" },
|
||||
"rainbow-delimiters.nvim": { "branch": "master", "commit": "12b1a1e095d968887a17ef791c2edb78d7595d46" },
|
||||
"render-markdown": { "branch": "main", "commit": "35f8bd24809e21219c66e2a58f1b9f5d547cc2c3" },
|
||||
"smartcolumn.nvim": { "branch": "main", "commit": "d01b99355c7fab13233f48d0f28dc097e68a03f7" },
|
||||
"stickybuf.nvim": { "branch": "master", "commit": "2160fcd536d81f5fa43f7167dba6634e814e3154" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" },
|
||||
"telescope-luasnip.nvim": { "branch": "master", "commit": "11668478677de360dea45cf2b090d34f21b8ae07" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
|
||||
"texpresso.vim": { "branch": "main", "commit": "1cc949fde8ed3220968039b6b1b6ccdd9f475087" },
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "313b04e5b02d29ab9275c9295ff5e2b73921b0eb" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "40c5317a6e90fe3393f07b0fee580d9e93a216b4" },
|
||||
"twilight.nvim": { "branch": "main", "commit": "8bb7fa7b918baab1ca81b977102ddb54afa63512" },
|
||||
"undotree": { "branch": "main", "commit": "eab459ab87dd249617b5f7187bb69e614a083047" },
|
||||
"vifm.vim": { "branch": "master", "commit": "a8130c37d144b51d84bee19f0532abcd3583383f" },
|
||||
"vim-criticmarkup": { "branch": "master", "commit": "d15dc134eb177a170c79f6377f81eb02a9d20b02" },
|
||||
"vim-numbertoggle": { "branch": "main", "commit": "df9b1fe616507340718716204ba7f434125bdf7a" },
|
||||
"vim-pandoc-syntax": { "branch": "master", "commit": "16939cda184ff555938cc895cc62477c172997f9" },
|
||||
"vim-spellsync": { "branch": "master", "commit": "3d6dd50de9c4d953cc16638112a6ae196df41463" },
|
||||
"wezterm.nvim": { "branch": "main", "commit": "f73bba23ab4becd146fa2d0a3a16a84b987eeaca" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "6c1584eb76b55629702716995cca4ae2798a9cca" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "48cdaaab93a4c85cac8eb271bb48307ed337787f" },
|
||||
"wrapping.nvim": { "branch": "master", "commit": "3a823200c297885b70515fa8d974e1763c578e26" },
|
||||
"zen-mode.nvim": { "branch": "main", "commit": "04b52674b8c800f8b7d4609e8bd8d0212e3ffa79" },
|
||||
"zk-nvim": { "branch": "main", "commit": "66b9b490e930fb77f93a2a0c64e0da9a5144fd0a" }
|
||||
|
|
|
@ -13,6 +13,7 @@ return {
|
|||
"hrsh7th/cmp-buffer",
|
||||
"hrsh7th/cmp-calc",
|
||||
"hrsh7th/cmp-cmdline",
|
||||
"hrsh7th/cmp-nvim-lua",
|
||||
"hrsh7th/cmp-nvim-lsp-signature-help",
|
||||
"dmitmel/cmp-digraphs",
|
||||
"jc-doyle/cmp-pandoc-references",
|
||||
|
@ -92,6 +93,7 @@ return {
|
|||
end,
|
||||
},
|
||||
sources = {
|
||||
{ name = "nvim_lua" },
|
||||
{
|
||||
name = "beancount",
|
||||
option = {
|
||||
|
|
242
nvim/.config/nvim/lua/plugins/config/lsp.lua
Normal file
242
nvim/.config/nvim/lua/plugins/config/lsp.lua
Normal file
|
@ -0,0 +1,242 @@
|
|||
vim.diagnostic.config({ virtual_text = true })
|
||||
vim.fn.sign_define("DiagnosticSignError", { text = "✘", texthl = "DiagnosticSignError" })
|
||||
vim.fn.sign_define("DiagnosticSignWarn", { text = "", texthl = "DiagnosticSignWarn" })
|
||||
vim.fn.sign_define("DiagnosticSignInfo", { text = "", texthl = "DiagnosticSignInfo" })
|
||||
vim.fn.sign_define("DiagnosticSignHint", { text = "", texthl = "DiagnosticSignHint" })
|
||||
|
||||
local lsp = require("lsp-setup")
|
||||
|
||||
local servers = {
|
||||
ansiblels = {},
|
||||
arduino_language_server = {},
|
||||
astro = {},
|
||||
bashls = {},
|
||||
beancount = {},
|
||||
clangd = {},
|
||||
cssls = {},
|
||||
docker_compose_language_service = {},
|
||||
dockerls = {},
|
||||
emmet_ls = {},
|
||||
eslint = {},
|
||||
gopls = {},
|
||||
julials = {},
|
||||
jsonls = {},
|
||||
ltex = { autostart = false },
|
||||
lua_ls = {
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = { globals = { "vim" } },
|
||||
-- enable when working on neovim stuff. Takes *long* to load
|
||||
-- workspace = { library = vim.api.nvim_get_runtime_file("", true) },
|
||||
telemetry = { enable = false },
|
||||
hint = {
|
||||
enable = true,
|
||||
setType = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
marksman = {},
|
||||
basedpyright = {},
|
||||
ruff = {},
|
||||
serve_d = {},
|
||||
taplo = {},
|
||||
texlab = {},
|
||||
tsserver = {},
|
||||
yamlls = {},
|
||||
}
|
||||
|
||||
local function on_attach(_, bufnr)
|
||||
local map = vim.keymap.set
|
||||
map("n", "[d", "<cmd>lua vim.diagnostic.goto_prev()<cr>", { buffer = bufnr, desc = "Previous diagnostic" })
|
||||
map("n", "]d", "<cmd>lua vim.diagnostic.goto_next()<cr>", { buffer = bufnr, desc = "Next diagnostic" })
|
||||
map(
|
||||
"n",
|
||||
"[D",
|
||||
"<cmd>lua vim.diagnostic.goto_prev({severity = vim.diagnostic.severity.ERROR})<cr>",
|
||||
{ buffer = bufnr, desc = "Previous error" }
|
||||
)
|
||||
map(
|
||||
"n",
|
||||
"]D",
|
||||
"<cmd>lua vim.diagnostic.goto_next({severity = vim.diagnostic.severity.ERROR})<cr>",
|
||||
{ buffer = bufnr, desc = "Next error" }
|
||||
)
|
||||
|
||||
if require("core.util").is_available("which-key") then
|
||||
require("which-key").add({ "<localleader>l", group = "language" })
|
||||
end
|
||||
map(
|
||||
"n",
|
||||
"<localleader>ld",
|
||||
"<cmd>lua vim.diagnostic.open_float()<cr>",
|
||||
{ buffer = bufnr, desc = "Line diagnostics" }
|
||||
)
|
||||
map("n", "<localleader>li", function()
|
||||
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled())
|
||||
end, { buffer = bufnr, desc = "Inlay hints" })
|
||||
map("n", "<localleader>la", "<cmd>lua vim.lsp.buf.code_action()<cr>", { buffer = bufnr, desc = "Codeactions" })
|
||||
map("n", "<localleader>ln", "<cmd>lua vim.lsp.buf.rename()<cr>", { buffer = bufnr, desc = "Rename element" })
|
||||
if vim.fn.exists(":Glance") then
|
||||
map("n", "<localleader>lr", "<cmd>Glance references<cr>", { buffer = bufnr, desc = "References" })
|
||||
map("n", "<localleader>lf", "<cmd>Glance definitions<cr>", { buffer = bufnr, desc = "Definition" })
|
||||
map("n", "<localleader>lt", "<cmd>Glance type_definitions<cr>", { buffer = bufnr, desc = "Type definition" })
|
||||
map("n", "<localleader>lm", "<cmd>Glance implementations<cr>", { buffer = bufnr, desc = "Implementation" })
|
||||
elseif vim.fn.exists(":Telescope") then
|
||||
map("n", "<localleader>lr", "<cmd>Telescope lsp_references<cr>", { buffer = bufnr, desc = "References" })
|
||||
map("n", "<localleader>lf", "<cmd>Telescope lsp_definitions<cr>", { buffer = bufnr, desc = "Definition" })
|
||||
map(
|
||||
"n",
|
||||
"<localleader>lt",
|
||||
"<cmd>Telescope lsp_type_definitions<cr>",
|
||||
{ buffer = bufnr, desc = "Type definition" }
|
||||
)
|
||||
map(
|
||||
"n",
|
||||
"<localleader>lm",
|
||||
"<cmd>Telescope lsp_implementations<cr>",
|
||||
{ buffer = bufnr, desc = "Implementation" }
|
||||
)
|
||||
else
|
||||
map("n", "<localleader>lr", "<cmd>lua vim.lsp.buf.references()<cr>", { buffer = bufnr, desc = "References" })
|
||||
map("n", "<localleader>lf", "<cmd>lua vim.lsp.buf.definition()<cr>", { buffer = bufnr, desc = "Definition" })
|
||||
map(
|
||||
"n",
|
||||
"<localleader>lt",
|
||||
"<cmd>lua vim.lsp.buf.type_definition()<cr>",
|
||||
{ buffer = bufnr, desc = "Type definition" }
|
||||
)
|
||||
map(
|
||||
"n",
|
||||
"<localleader>lm",
|
||||
"<cmd>lua vim.lsp.buf.implementation()<cr>",
|
||||
{ buffer = bufnr, desc = "Implementation" }
|
||||
)
|
||||
end
|
||||
map("n", "K", "<cmd>lua vim.lsp.buf.hover()<cr>", { buffer = bufnr, desc = "Hover definition" })
|
||||
map("n", "<localleader>lc", "<cmd>lua vim.lsp.buf.declaration()<cr>", { buffer = bufnr, desc = "Declaration" })
|
||||
map(
|
||||
"n",
|
||||
"<localleader>ls",
|
||||
"<cmd>lua vim.lsp.buf.signature_help()<cr>",
|
||||
{ buffer = bufnr, desc = "Signature help" }
|
||||
)
|
||||
map("n", "<localleader>lo", function()
|
||||
if vim.diagnostic.is_disabled(0) then
|
||||
vim.diagnostic.enable(0)
|
||||
else
|
||||
vim.diagnostic.disable(0)
|
||||
end
|
||||
end, { buffer = bufnr, desc = "Toggle Diagnostics" })
|
||||
end
|
||||
|
||||
-- Display diagnostics as virtual text only if not in insert mode
|
||||
-- /r/neovim/comments/12inp4c/disable_diagnostics_virtual_text_when_in_insert/jqqifwk/
|
||||
vim.api.nvim_create_autocmd("InsertEnter", {
|
||||
callback = function()
|
||||
vim.diagnostic.config({ virtual_text = false })
|
||||
end,
|
||||
})
|
||||
vim.api.nvim_create_autocmd("InsertLeave", {
|
||||
callback = function()
|
||||
vim.diagnostic.config({ virtual_text = true })
|
||||
end,
|
||||
})
|
||||
|
||||
lsp.setup({
|
||||
default_mappings = false,
|
||||
servers = servers,
|
||||
on_attach = on_attach,
|
||||
inlay_hints = {
|
||||
enabled = vim.fn.has("nvim-0.10") == true and true or false,
|
||||
},
|
||||
})
|
||||
|
||||
local lspconfig = require("lspconfig")
|
||||
lspconfig.nushell.setup({})
|
||||
|
||||
lspconfig.marksman.setup({
|
||||
filetypes = { "markdown", "quarto" },
|
||||
on_attach = function(client, bufnr)
|
||||
-- TODO: for some reason this stays true even after rootdir switch?
|
||||
if client.config.in_zk_notebook then
|
||||
vim.defer_fn(function()
|
||||
vim.lsp.buf_detach_client(bufnr, client.id)
|
||||
end, 1000)
|
||||
end
|
||||
on_attach(client, bufnr)
|
||||
end,
|
||||
on_new_config = function(conf, new_root)
|
||||
if require("lspconfig.util").root_pattern(".zk")(new_root) then
|
||||
conf.in_zk_notebook = true
|
||||
else
|
||||
conf.in_zk_notebook = false
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
local python_path
|
||||
-- ensure python virtualenv is determined automatically on lsp start
|
||||
lspconfig.basedpyright.setup({
|
||||
on_attach = function(client, bufnr)
|
||||
on_attach(client, bufnr)
|
||||
require("core.util").set_python_env()
|
||||
if python_path == nil then
|
||||
python_path, _ = vim.fn.expand(require("core.util").get_python_venv_bin(client.config.root_dir))
|
||||
end
|
||||
-- print(string.format("[PYTHON VENV]: %s", vim.inspect(python_path)))
|
||||
client.config.settings.python = {} or client.config.settings.python
|
||||
client.config.settings.python.pythonPath = python_path
|
||||
end,
|
||||
settings = {
|
||||
-- disable imports and linting since, we use ruff for that
|
||||
pyright = {
|
||||
disableOrganizeImports = true,
|
||||
},
|
||||
python = {
|
||||
analysis = {
|
||||
ignore = { "*" },
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
lspconfig.ruff.setup({
|
||||
on_attach = function(client, bufnr)
|
||||
on_attach(client, bufnr)
|
||||
require("core.util").set_python_env()
|
||||
client.server_capabilities.hoverProvider = false -- we use pyright for hover info
|
||||
if python_path == nil then
|
||||
python_path, _ = vim.fn.expand(require("core.util").get_python_venv_bin(client.config.root_dir))
|
||||
end
|
||||
client.config.settings.python = {} or client.config.settings.python
|
||||
client.config.settings.python.pythonPath = python_path
|
||||
end,
|
||||
})
|
||||
|
||||
-- set up arduino with the help of arduino.nvim plugin
|
||||
if require("core.util").is_available("arduino") then
|
||||
lspconfig.arduino_language_server.setup({
|
||||
on_new_config = require("arduino").on_new_config,
|
||||
})
|
||||
end
|
||||
|
||||
-- attach ltex for fitting ft only when spell checking becomes enabled
|
||||
vim.api.nvim_create_autocmd("User", {
|
||||
pattern = "SpellEnable",
|
||||
callback = function()
|
||||
lspconfig.ltex.setup({
|
||||
on_attach = function(client, bufnr)
|
||||
on_attach(client, bufnr)
|
||||
if require("core.util").is_available("ltex_extra") then
|
||||
require("ltex_extra").setup()
|
||||
end
|
||||
end,
|
||||
settings = {
|
||||
ltex = {
|
||||
language = vim.opt.spelllang:get(),
|
||||
},
|
||||
},
|
||||
})
|
||||
vim.cmd("LspStart ltex")
|
||||
end,
|
||||
})
|
|
@ -15,6 +15,7 @@ return {
|
|||
dependencies = {
|
||||
"jmbuhr/otter.nvim",
|
||||
"neovim/nvim-lspconfig",
|
||||
"vim-pandoc/vim-pandoc-syntax",
|
||||
"hrsh7th/nvim-cmp",
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
{ "benlubas/molten-nvim", optional = true },
|
||||
|
|
|
@ -1,103 +0,0 @@
|
|||
local formatters = {
|
||||
angular = { "prettier" },
|
||||
astro = { "prettier" },
|
||||
bash = { "shfmt" },
|
||||
bib = { "bibtex-tidy" },
|
||||
css = { "prettier", "rustywind" },
|
||||
graphql = { "prettier" },
|
||||
html = { "prettier", "rustywind" },
|
||||
javascript = { "prettier" },
|
||||
javascriptreact = { "prettier" },
|
||||
json = { "jq" },
|
||||
liquid = { "prettier" },
|
||||
lua = { "stylua" },
|
||||
markdown = { "prettier", "injected" },
|
||||
python = { "ruff_fix", "ruff_format", "ruff_organize_imports" },
|
||||
quarto = { "prettier", "injected" },
|
||||
sh = { "shfmt" },
|
||||
sql = { "sleek" },
|
||||
svelte = { "prettier" },
|
||||
typescript = { "prettier" },
|
||||
typescriptreact = { "prettier" },
|
||||
vue = { "prettier", "rustywind" },
|
||||
yaml = { "prettier" },
|
||||
zsh = { "shfmt" },
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
-- formatting setup
|
||||
{
|
||||
"zapling/mason-conform.nvim",
|
||||
dependencies = {
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
config = function()
|
||||
require("conform").setup({
|
||||
formatters_by_ft = formatters,
|
||||
lsp_format = "fallback",
|
||||
format_after_save = function(bufnr)
|
||||
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
|
||||
return
|
||||
end
|
||||
return { lsp_fallback = true }
|
||||
end,
|
||||
})
|
||||
require("conform").formatters.prettier = {
|
||||
options = {
|
||||
ext_parsers = {
|
||||
qmd = "markdown",
|
||||
},
|
||||
},
|
||||
}
|
||||
vim.api.nvim_create_user_command("FormatDisable", function(args)
|
||||
if args.bang then
|
||||
vim.g.disable_autoformat = true
|
||||
else
|
||||
-- FormatDisable! will disable formatting globally
|
||||
vim.b.disable_autoformat = true
|
||||
end
|
||||
end, {
|
||||
desc = "Disable formatting on save",
|
||||
bang = true,
|
||||
})
|
||||
vim.api.nvim_create_user_command("FormatEnable", function()
|
||||
vim.b.disable_autoformat = false
|
||||
vim.g.disable_autoformat = false
|
||||
end, {
|
||||
desc = "Enable formatting on save",
|
||||
})
|
||||
end,
|
||||
cmd = { "ConformInfo" },
|
||||
keys = {
|
||||
{
|
||||
"<localleader>ll",
|
||||
function()
|
||||
require("conform").format({ async = true, lsp_fallback = true })
|
||||
end,
|
||||
mode = { "n", "v" },
|
||||
desc = "Format buffer",
|
||||
},
|
||||
{
|
||||
"<localleader>lL",
|
||||
function()
|
||||
vim.g.disable_autoformat = not vim.g.disable_autoformat
|
||||
end,
|
||||
desc = "Toggle AutoFormat",
|
||||
},
|
||||
{
|
||||
"<leader>vf",
|
||||
":ConformInfo<cr>",
|
||||
desc = "ConformInfo",
|
||||
},
|
||||
},
|
||||
init = function()
|
||||
-- If you want the formatexpr, here is the place to set it
|
||||
vim.o.formatexpr = "v:lua.require'conform'.formatexpr()"
|
||||
end,
|
||||
},
|
||||
},
|
||||
event = { "BufWritePre" },
|
||||
opts = {},
|
||||
},
|
||||
}
|
372
nvim/.config/nvim/lua/plugins/ide.lua
Normal file
372
nvim/.config/nvim/lua/plugins/ide.lua
Normal file
|
@ -0,0 +1,372 @@
|
|||
local linters = {
|
||||
astro = { "eslint_d" },
|
||||
bash = { "shellcheck" },
|
||||
javascript = { "eslint_d" },
|
||||
javascriptreact = { "eslint_d" },
|
||||
markdown = { "markdownlint" },
|
||||
quarto = { "markdownlint" },
|
||||
sh = { "shellcheck" },
|
||||
svelte = { "eslint_d" },
|
||||
text = {},
|
||||
typescript = { "eslint_d" },
|
||||
typescriptreact = { "eslint_d" },
|
||||
}
|
||||
local formatters = {
|
||||
angular = { { "prettierd", "prettier" } },
|
||||
astro = { { "prettierd", "prettier" } },
|
||||
bash = { "shfmt" },
|
||||
bib = { "bibtex-tidy" },
|
||||
css = { { "prettierd", "prettier" }, "rustywind" },
|
||||
graphql = { { "prettierd", "prettier" } },
|
||||
html = { { "prettierd", "prettier" }, "rustywind" },
|
||||
javascript = { { "prettierd", "prettier" } },
|
||||
javascriptreact = { { "prettierd", "prettier" } },
|
||||
json = { "jq" },
|
||||
liquid = { { "prettierd", "prettier" } },
|
||||
lua = { "stylua" },
|
||||
markdown = { { "prettierd", "prettier" } },
|
||||
python = { "ruff_fix", "ruff_format", "ruff_organize_imports" },
|
||||
sh = { "shfmt" },
|
||||
svelte = { { "prettierd", "prettier" } },
|
||||
typescript = { { "prettierd", "prettier" } },
|
||||
typescriptreact = { { "prettierd", "prettier" } },
|
||||
vue = { { "prettierd", "prettier" }, "rustywind" },
|
||||
yaml = { { "prettierd", "prettier" } },
|
||||
zsh = { "shfmt" },
|
||||
}
|
||||
|
||||
return {
|
||||
-- vista-like outline view for code
|
||||
{
|
||||
"stevearc/aerial.nvim",
|
||||
config = true,
|
||||
-- Optional dependencies
|
||||
dependencies = {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
cmd = {
|
||||
"AerialToggle",
|
||||
"AerialOpen",
|
||||
"AerialOpenAll",
|
||||
"AerialClose",
|
||||
"AerialCloseAll",
|
||||
"AerialNext",
|
||||
"AerialPrev",
|
||||
"AerialGo",
|
||||
"AerialInfo",
|
||||
"AerialNavToggle",
|
||||
"AerialNavOpen",
|
||||
"AerialNavClose",
|
||||
},
|
||||
opts = {
|
||||
backends = { "treesitter", "lsp", "markdown", "man" },
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>so", "<cmd>AerialNavToggle<cr>", silent = true, desc = "symbol navigator" },
|
||||
{ "<leader>sO", "<cmd>AerialToggle<cr>", silent = true, desc = "symbol outline" },
|
||||
},
|
||||
},
|
||||
|
||||
-- lsp setup
|
||||
{
|
||||
"junnplus/lsp-setup.nvim",
|
||||
dependencies = {
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
-- will sometimes not keep up with lsp changes if set to stable
|
||||
version = false,
|
||||
},
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
cmd = {
|
||||
"Mason",
|
||||
"MasonInstall",
|
||||
"MasonUninstall",
|
||||
"MasonUninstallAll",
|
||||
"MasonLog",
|
||||
"MasonUpdate",
|
||||
},
|
||||
build = ":MasonUpdate",
|
||||
keys = {
|
||||
{ "<leader>vm", ":Mason<cr>", desc = "Mason" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
cmd = { "LspInstall", "LspUninstall" },
|
||||
},
|
||||
},
|
||||
event = { "BufReadPost", "BufNewFile", "BufWritePre" },
|
||||
config = function()
|
||||
require("plugins.config.lsp")
|
||||
end,
|
||||
keys = { { "<leader>vs", ":LspInfo<cr>", desc = "LspInfo" } },
|
||||
},
|
||||
-- pretty lsp 'peek' menus
|
||||
{
|
||||
"DNLHC/glance.nvim",
|
||||
opts = { border = { enable = true }, theme = { enable = true, mode = "auto" } },
|
||||
cmd = { "Glance" },
|
||||
},
|
||||
|
||||
-- linting setup
|
||||
{
|
||||
"rshkarin/mason-nvim-lint",
|
||||
dependencies = {
|
||||
{
|
||||
"mfussenegger/nvim-lint",
|
||||
config = function()
|
||||
require("lint").linters_by_ft = linters
|
||||
vim.api.nvim_create_autocmd({ "BufWritePost", "InsertLeave" }, {
|
||||
callback = function()
|
||||
if not vim.g.disable_autolint then
|
||||
require("lint").try_lint()
|
||||
end
|
||||
end,
|
||||
})
|
||||
end,
|
||||
dependencies = { "williamboman/mason.nvim" },
|
||||
},
|
||||
},
|
||||
event = { "BufReadPost", "BufNewFile", "BufWritePre" },
|
||||
opts = {},
|
||||
},
|
||||
|
||||
-- formatting setup
|
||||
{
|
||||
"zapling/mason-conform.nvim",
|
||||
dependencies = {
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
config = function()
|
||||
require("conform").setup({
|
||||
|
||||
lsp_format = "fallback",
|
||||
|
||||
format_after_save = function(bufnr)
|
||||
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
|
||||
return
|
||||
end
|
||||
return { lsp_fallback = true }
|
||||
end,
|
||||
formatters_by_ft = formatters,
|
||||
})
|
||||
vim.api.nvim_create_user_command("FormatDisable", function(args)
|
||||
if args.bang then
|
||||
vim.g.disable_autoformat = true
|
||||
else
|
||||
-- FormatDisable! will disable formatting globally
|
||||
vim.b.disable_autoformat = true
|
||||
end
|
||||
end, {
|
||||
desc = "Disable formatting on save",
|
||||
bang = true,
|
||||
})
|
||||
vim.api.nvim_create_user_command("FormatEnable", function()
|
||||
vim.b.disable_autoformat = false
|
||||
vim.g.disable_autoformat = false
|
||||
end, {
|
||||
desc = "Enable formatting on save",
|
||||
})
|
||||
end,
|
||||
cmd = { "ConformInfo" },
|
||||
keys = {
|
||||
{
|
||||
"<localleader>ll",
|
||||
function()
|
||||
require("conform").format({ async = true, lsp_fallback = true })
|
||||
end,
|
||||
desc = "Format buffer",
|
||||
},
|
||||
{
|
||||
"<localleader>lL",
|
||||
function()
|
||||
vim.g.disable_autoformat = not vim.g.disable_autoformat
|
||||
end,
|
||||
desc = "Toggle AutoFormat",
|
||||
},
|
||||
{
|
||||
"<leader>vf",
|
||||
":ConformInfo<cr>",
|
||||
desc = "ConformInfo",
|
||||
},
|
||||
},
|
||||
init = function()
|
||||
-- If you want the formatexpr, here is the place to set it
|
||||
vim.o.formatexpr = "v:lua.require'conform'.formatexpr()"
|
||||
end,
|
||||
},
|
||||
},
|
||||
event = { "BufWritePre" },
|
||||
opts = {},
|
||||
},
|
||||
|
||||
-- useful quickfix-like buffer
|
||||
{
|
||||
"folke/trouble.nvim",
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
opts = {},
|
||||
cmd = {
|
||||
"Trouble",
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>sd", "<cmd>Trouble diagnostics toggle<cr>", silent = true, desc = "diagnostics workspace" },
|
||||
{
|
||||
"<leader>sD",
|
||||
"<cmd>Trouble diagnostics toggle filter.buf=0<cr>",
|
||||
silent = true,
|
||||
desc = "diagnostics document",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- automatic docstring creation for a variety of languages
|
||||
{
|
||||
"danymat/neogen",
|
||||
dependencies = "nvim-treesitter/nvim-treesitter",
|
||||
opts = {
|
||||
snippet_engine = "luasnip",
|
||||
},
|
||||
cmd = {
|
||||
"Neogen",
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<localleader>lg",
|
||||
function()
|
||||
require("neogen").generate()
|
||||
end,
|
||||
silent = true,
|
||||
desc = "generate docstring",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- testing setup
|
||||
{
|
||||
"nvim-neotest/neotest",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-neotest/nvim-nio",
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
"antoinemadec/FixCursorHold.nvim",
|
||||
|
||||
"nvim-neotest/neotest-python",
|
||||
},
|
||||
config = function()
|
||||
require("neotest").setup({
|
||||
adapters = {
|
||||
require("neotest-python")({
|
||||
-- with coverage requires coverage.py and pytest-cov installed
|
||||
args = { "--cov" },
|
||||
}),
|
||||
},
|
||||
})
|
||||
if require("core.util").is_available("which-key") then
|
||||
require("which-key").add({ "<localleader>t", group = "test" })
|
||||
end
|
||||
end,
|
||||
ft = { "python" },
|
||||
keys = {
|
||||
{
|
||||
"<leader>st",
|
||||
[[<cmd>lua require('neotest').summary.toggle()<cr>]],
|
||||
desc = "toggle test list",
|
||||
silent = true,
|
||||
},
|
||||
{
|
||||
"<leader>sT",
|
||||
[[<cmd>lua require('neotest').output_panel.toggle()<cr>]],
|
||||
desc = "toggle test output",
|
||||
silent = true,
|
||||
},
|
||||
{
|
||||
"<localleader>to",
|
||||
[[<cmd>lua require('neotest').output.open()<cr>]],
|
||||
desc = "toggle test output",
|
||||
silent = true,
|
||||
},
|
||||
{
|
||||
"<localleader>tt",
|
||||
[[<cmd>lua require('neotest').run.run()<cr>]],
|
||||
desc = "run nearest test",
|
||||
silent = true,
|
||||
},
|
||||
{
|
||||
"<localleader>td",
|
||||
[[<cmd>lua require('neotest').run.run({strategy = "dap"})<cr>]],
|
||||
desc = "debug nearest test",
|
||||
silent = true,
|
||||
}, -- REQUIRES DAP
|
||||
{
|
||||
"<localleader>tT",
|
||||
[[<cmd>lua require('neotest').run.run(vim.fn.expand("%"))<cr>]],
|
||||
desc = "test current file",
|
||||
silent = true,
|
||||
},
|
||||
{
|
||||
"<localleader>tr",
|
||||
[[<cmd>lua require('neotest').run.run_last()<cr>]],
|
||||
desc = "re-run last test",
|
||||
silent = true,
|
||||
},
|
||||
{
|
||||
"<localleader>tw",
|
||||
[[<cmd>lua require('neotest').watch.toggle()<cr>]],
|
||||
desc = "watch current test",
|
||||
silent = true,
|
||||
},
|
||||
{
|
||||
"<localleader>tW",
|
||||
[[<cmd>lua require('neotest').watch.toggle(vim.fn.expand("%"))<cr>]],
|
||||
desc = "watch current file",
|
||||
silent = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
-- TODO needs to pick up poetry env for python,
|
||||
-- currently just hard-codes running through poetry
|
||||
{
|
||||
"andythigpen/nvim-coverage",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
},
|
||||
config = function()
|
||||
require("coverage").setup({
|
||||
lang = { python = { coverage_command = "poetry run coverage json -q -o -" } },
|
||||
})
|
||||
end,
|
||||
ft = { "python" },
|
||||
cmd = {
|
||||
"Coverage",
|
||||
"CoverageLoad",
|
||||
"CoverageLoadLcov",
|
||||
"CoverageShow",
|
||||
"CoverageHide",
|
||||
"CoverageToggle",
|
||||
"CoverageClear",
|
||||
"CoverageSummary",
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<localleader>tp",
|
||||
[[<cmd>Coverage<cr>]],
|
||||
desc = "show coverage report",
|
||||
silent = true,
|
||||
},
|
||||
{
|
||||
"<localleader>tP",
|
||||
[[<cmd>CoverageToggle<cr>]],
|
||||
desc = "toggle coverage gutter",
|
||||
silent = true,
|
||||
},
|
||||
{
|
||||
"<localleader>ts",
|
||||
[[<cmd>CoverageSummary<cr>]],
|
||||
desc = "show coverage summary",
|
||||
silent = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
|
@ -1,28 +1,5 @@
|
|||
return {
|
||||
{ "edKotinsky/Arduino.nvim", ft = "arduino", config = true }, -- statusline
|
||||
{ "euclidianAce/BetterLua.vim", ft = "lua" }, -- better syntax highlighting for lua
|
||||
{ "aliou/bats.vim", ft = { "bash", "sh", "zsh", "bats" } }, -- enable syntax for bats shell-code testing library
|
||||
{
|
||||
"folke/lazydev.nvim",
|
||||
ft = "lua",
|
||||
opts = {
|
||||
library = {
|
||||
-- Load luvit types when the `vim.uv` word is found
|
||||
{ path = "luvit-meta/library", words = { "vim%.uv" } },
|
||||
},
|
||||
},
|
||||
dependencies = {
|
||||
{ "Bilal2453/luvit-meta" }, -- optional `vim.uv` typings
|
||||
{ -- optional completion source for require statements and module annotations
|
||||
"hrsh7th/nvim-cmp",
|
||||
opts = function(_, opts)
|
||||
opts.sources = opts.sources or {}
|
||||
table.insert(opts.sources, {
|
||||
name = "lazydev",
|
||||
group_index = 0, -- set group index to 0 to skip loading LuaLS completions
|
||||
})
|
||||
end,
|
||||
optional = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,38 +0,0 @@
|
|||
local linters = {
|
||||
astro = { "eslint_d" },
|
||||
bash = { "shellcheck" },
|
||||
javascript = { "eslint_d" },
|
||||
javascriptreact = { "eslint_d" },
|
||||
markdown = { "markdownlint" },
|
||||
quarto = { "markdownlint" },
|
||||
sh = { "shellcheck" },
|
||||
svelte = { "eslint_d" },
|
||||
text = {},
|
||||
typescript = { "eslint_d" },
|
||||
typescriptreact = { "eslint_d" },
|
||||
}
|
||||
|
||||
return {
|
||||
-- linting setup
|
||||
{
|
||||
"rshkarin/mason-nvim-lint",
|
||||
dependencies = {
|
||||
{
|
||||
"mfussenegger/nvim-lint",
|
||||
config = function()
|
||||
require("lint").linters_by_ft = linters
|
||||
vim.api.nvim_create_autocmd({ "BufWritePost", "InsertLeave" }, {
|
||||
callback = function()
|
||||
if not vim.g.disable_autolint then
|
||||
require("lint").try_lint()
|
||||
end
|
||||
end,
|
||||
})
|
||||
end,
|
||||
dependencies = { "williamboman/mason.nvim" },
|
||||
},
|
||||
},
|
||||
event = { "BufReadPost", "BufNewFile", "BufWritePre" },
|
||||
opts = {},
|
||||
},
|
||||
}
|
|
@ -1,334 +0,0 @@
|
|||
local servers = {
|
||||
ansiblels = {},
|
||||
arduino_language_server = {},
|
||||
astro = {},
|
||||
bashls = {},
|
||||
beancount = {},
|
||||
clangd = {},
|
||||
cssls = {},
|
||||
docker_compose_language_service = {},
|
||||
dockerls = {},
|
||||
emmet_ls = {},
|
||||
eslint = {},
|
||||
gopls = {},
|
||||
julials = {},
|
||||
jsonls = {},
|
||||
ltex = { autostart = false },
|
||||
lua_ls = {
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = { globals = { "vim" } },
|
||||
-- enable when working on neovim stuff. Takes *long* to load
|
||||
-- workspace = { library = vim.api.nvim_get_runtime_file("", true) },
|
||||
telemetry = { enable = false },
|
||||
hint = {
|
||||
enable = true,
|
||||
setType = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
marksman = {},
|
||||
basedpyright = {},
|
||||
ruff = {},
|
||||
serve_d = {},
|
||||
taplo = {},
|
||||
texlab = {},
|
||||
tsserver = {},
|
||||
yamlls = {},
|
||||
}
|
||||
|
||||
return {
|
||||
-- lsp setup
|
||||
{
|
||||
"junnplus/lsp-setup.nvim",
|
||||
dependencies = {
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
-- will sometimes not keep up with lsp changes if set to stable
|
||||
version = false,
|
||||
},
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
cmd = {
|
||||
"Mason",
|
||||
"MasonInstall",
|
||||
"MasonUninstall",
|
||||
"MasonUninstallAll",
|
||||
"MasonLog",
|
||||
"MasonUpdate",
|
||||
},
|
||||
build = ":MasonUpdate",
|
||||
keys = {
|
||||
{ "<leader>vm", ":Mason<cr>", desc = "Mason" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
cmd = { "LspInstall", "LspUninstall" },
|
||||
},
|
||||
},
|
||||
event = { "BufReadPost", "BufNewFile", "BufWritePre" },
|
||||
config = function()
|
||||
vim.diagnostic.config({ virtual_text = true })
|
||||
vim.fn.sign_define("DiagnosticSignError", { text = "✘", texthl = "DiagnosticSignError" })
|
||||
vim.fn.sign_define("DiagnosticSignWarn", { text = "", texthl = "DiagnosticSignWarn" })
|
||||
vim.fn.sign_define("DiagnosticSignInfo", { text = "", texthl = "DiagnosticSignInfo" })
|
||||
vim.fn.sign_define("DiagnosticSignHint", { text = "", texthl = "DiagnosticSignHint" })
|
||||
|
||||
local lsp = require("lsp-setup")
|
||||
|
||||
local function on_attach(_, bufnr)
|
||||
local map = vim.keymap.set
|
||||
map(
|
||||
"n",
|
||||
"[d",
|
||||
"<cmd>lua vim.diagnostic.goto_prev()<cr>",
|
||||
{ buffer = bufnr, desc = "Previous diagnostic" }
|
||||
)
|
||||
map("n", "]d", "<cmd>lua vim.diagnostic.goto_next()<cr>", { buffer = bufnr, desc = "Next diagnostic" })
|
||||
map(
|
||||
"n",
|
||||
"[D",
|
||||
"<cmd>lua vim.diagnostic.goto_prev({severity = vim.diagnostic.severity.ERROR})<cr>",
|
||||
{ buffer = bufnr, desc = "Previous error" }
|
||||
)
|
||||
map(
|
||||
"n",
|
||||
"]D",
|
||||
"<cmd>lua vim.diagnostic.goto_next({severity = vim.diagnostic.severity.ERROR})<cr>",
|
||||
{ buffer = bufnr, desc = "Next error" }
|
||||
)
|
||||
|
||||
if require("core.util").is_available("which-key") then
|
||||
require("which-key").add({ "<localleader>l", group = "language" })
|
||||
end
|
||||
map(
|
||||
"n",
|
||||
"<localleader>ld",
|
||||
"<cmd>lua vim.diagnostic.open_float()<cr>",
|
||||
{ buffer = bufnr, desc = "Line diagnostics" }
|
||||
)
|
||||
map("n", "<localleader>li", function()
|
||||
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled())
|
||||
end, { buffer = bufnr, desc = "Inlay hints" })
|
||||
map(
|
||||
"n",
|
||||
"<localleader>la",
|
||||
"<cmd>lua vim.lsp.buf.code_action()<cr>",
|
||||
{ buffer = bufnr, desc = "Codeactions" }
|
||||
)
|
||||
map(
|
||||
"n",
|
||||
"<localleader>ln",
|
||||
"<cmd>lua vim.lsp.buf.rename()<cr>",
|
||||
{ buffer = bufnr, desc = "Rename element" }
|
||||
)
|
||||
if vim.fn.exists(":Glance") then
|
||||
map("n", "<localleader>lr", "<cmd>Glance references<cr>", { buffer = bufnr, desc = "References" })
|
||||
map("n", "<localleader>lf", "<cmd>Glance definitions<cr>", { buffer = bufnr, desc = "Definition" })
|
||||
map(
|
||||
"n",
|
||||
"<localleader>lt",
|
||||
"<cmd>Glance type_definitions<cr>",
|
||||
{ buffer = bufnr, desc = "Type definition" }
|
||||
)
|
||||
map(
|
||||
"n",
|
||||
"<localleader>lm",
|
||||
"<cmd>Glance implementations<cr>",
|
||||
{ buffer = bufnr, desc = "Implementation" }
|
||||
)
|
||||
elseif vim.fn.exists(":Telescope") then
|
||||
map(
|
||||
"n",
|
||||
"<localleader>lr",
|
||||
"<cmd>Telescope lsp_references<cr>",
|
||||
{ buffer = bufnr, desc = "References" }
|
||||
)
|
||||
map(
|
||||
"n",
|
||||
"<localleader>lf",
|
||||
"<cmd>Telescope lsp_definitions<cr>",
|
||||
{ buffer = bufnr, desc = "Definition" }
|
||||
)
|
||||
map(
|
||||
"n",
|
||||
"<localleader>lt",
|
||||
"<cmd>Telescope lsp_type_definitions<cr>",
|
||||
{ buffer = bufnr, desc = "Type definition" }
|
||||
)
|
||||
map(
|
||||
"n",
|
||||
"<localleader>lm",
|
||||
"<cmd>Telescope lsp_implementations<cr>",
|
||||
{ buffer = bufnr, desc = "Implementation" }
|
||||
)
|
||||
else
|
||||
map(
|
||||
"n",
|
||||
"<localleader>lr",
|
||||
"<cmd>lua vim.lsp.buf.references()<cr>",
|
||||
{ buffer = bufnr, desc = "References" }
|
||||
)
|
||||
map(
|
||||
"n",
|
||||
"<localleader>lf",
|
||||
"<cmd>lua vim.lsp.buf.definition()<cr>",
|
||||
{ buffer = bufnr, desc = "Definition" }
|
||||
)
|
||||
map(
|
||||
"n",
|
||||
"<localleader>lt",
|
||||
"<cmd>lua vim.lsp.buf.type_definition()<cr>",
|
||||
{ buffer = bufnr, desc = "Type definition" }
|
||||
)
|
||||
map(
|
||||
"n",
|
||||
"<localleader>lm",
|
||||
"<cmd>lua vim.lsp.buf.implementation()<cr>",
|
||||
{ buffer = bufnr, desc = "Implementation" }
|
||||
)
|
||||
end
|
||||
map("n", "K", "<cmd>lua vim.lsp.buf.hover()<cr>", { buffer = bufnr, desc = "Hover definition" })
|
||||
map(
|
||||
"n",
|
||||
"<localleader>lc",
|
||||
"<cmd>lua vim.lsp.buf.declaration()<cr>",
|
||||
{ buffer = bufnr, desc = "Declaration" }
|
||||
)
|
||||
map(
|
||||
"n",
|
||||
"<localleader>ls",
|
||||
"<cmd>lua vim.lsp.buf.signature_help()<cr>",
|
||||
{ buffer = bufnr, desc = "Signature help" }
|
||||
)
|
||||
map("n", "<localleader>lo", function()
|
||||
if vim.diagnostic.is_disabled(0) then
|
||||
vim.diagnostic.enable(0)
|
||||
else
|
||||
vim.diagnostic.disable(0)
|
||||
end
|
||||
end, { buffer = bufnr, desc = "Toggle Diagnostics" })
|
||||
end
|
||||
|
||||
-- Display diagnostics as virtual text only if not in insert mode
|
||||
-- /r/neovim/comments/12inp4c/disable_diagnostics_virtual_text_when_in_insert/jqqifwk/
|
||||
vim.api.nvim_create_autocmd("InsertEnter", {
|
||||
callback = function()
|
||||
vim.diagnostic.config({ virtual_text = false })
|
||||
end,
|
||||
})
|
||||
vim.api.nvim_create_autocmd("InsertLeave", {
|
||||
callback = function()
|
||||
vim.diagnostic.config({ virtual_text = true })
|
||||
end,
|
||||
})
|
||||
|
||||
lsp.setup({
|
||||
default_mappings = false,
|
||||
servers = servers,
|
||||
on_attach = on_attach,
|
||||
inlay_hints = {
|
||||
enabled = vim.fn.has("nvim-0.10") == true and true or false,
|
||||
},
|
||||
})
|
||||
|
||||
local lspconfig = require("lspconfig")
|
||||
lspconfig.nushell.setup({})
|
||||
|
||||
lspconfig.marksman.setup({
|
||||
filetypes = { "markdown", "quarto" },
|
||||
on_attach = function(client, bufnr)
|
||||
-- TODO: for some reason this stays true even after rootdir switch?
|
||||
if client.config.in_zk_notebook then
|
||||
vim.defer_fn(function()
|
||||
vim.lsp.buf_detach_client(bufnr, client.id)
|
||||
end, 1000)
|
||||
end
|
||||
on_attach(client, bufnr)
|
||||
end,
|
||||
on_new_config = function(conf, new_root)
|
||||
if require("lspconfig.util").root_pattern(".zk")(new_root) then
|
||||
conf.in_zk_notebook = true
|
||||
else
|
||||
conf.in_zk_notebook = false
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
local python_path
|
||||
-- ensure python virtualenv is determined automatically on lsp start
|
||||
lspconfig.basedpyright.setup({
|
||||
on_attach = function(client, bufnr)
|
||||
on_attach(client, bufnr)
|
||||
require("core.util").set_python_env()
|
||||
if python_path == nil then
|
||||
python_path, _ = vim.fn.expand(require("core.util").get_python_venv_bin(client.config.root_dir))
|
||||
end
|
||||
-- print(string.format("[PYTHON VENV]: %s", vim.inspect(python_path)))
|
||||
client.config.settings.python = {} or client.config.settings.python
|
||||
client.config.settings.python.pythonPath = python_path
|
||||
end,
|
||||
settings = {
|
||||
-- disable imports and linting since, we use ruff for that
|
||||
pyright = {
|
||||
disableOrganizeImports = true,
|
||||
},
|
||||
python = {
|
||||
analysis = {
|
||||
ignore = { "*" },
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
lspconfig.ruff.setup({
|
||||
on_attach = function(client, bufnr)
|
||||
on_attach(client, bufnr)
|
||||
require("core.util").set_python_env()
|
||||
client.server_capabilities.hoverProvider = false -- we use pyright for hover info
|
||||
if python_path == nil then
|
||||
python_path, _ = vim.fn.expand(require("core.util").get_python_venv_bin(client.config.root_dir))
|
||||
end
|
||||
client.config.settings.python = {} or client.config.settings.python
|
||||
client.config.settings.python.pythonPath = python_path
|
||||
end,
|
||||
})
|
||||
|
||||
-- set up arduino with the help of arduino.nvim plugin
|
||||
if require("core.util").is_available("arduino") then
|
||||
lspconfig.arduino_language_server.setup({
|
||||
on_new_config = require("arduino").on_new_config,
|
||||
})
|
||||
end
|
||||
|
||||
-- attach ltex for fitting ft only when spell checking becomes enabled
|
||||
vim.api.nvim_create_autocmd("User", {
|
||||
pattern = "SpellEnable",
|
||||
callback = function()
|
||||
lspconfig.ltex.setup({
|
||||
on_attach = function(client, bufnr)
|
||||
on_attach(client, bufnr)
|
||||
if require("core.util").is_available("ltex_extra") then
|
||||
require("ltex_extra").setup()
|
||||
end
|
||||
end,
|
||||
settings = {
|
||||
ltex = {
|
||||
language = vim.opt.spelllang:get(),
|
||||
},
|
||||
},
|
||||
})
|
||||
vim.cmd("LspStart ltex")
|
||||
end,
|
||||
})
|
||||
end,
|
||||
keys = { { "<leader>vs", ":LspInfo<cr>", desc = "LspInfo" } },
|
||||
},
|
||||
-- pretty lsp 'peek' menus
|
||||
{
|
||||
"DNLHC/glance.nvim",
|
||||
opts = { border = { enable = true }, theme = { enable = true, mode = "auto" } },
|
||||
cmd = { "Glance" },
|
||||
},
|
||||
}
|
|
@ -1,51 +0,0 @@
|
|||
return {
|
||||
-- vista-like outline view for code
|
||||
{
|
||||
"stevearc/aerial.nvim",
|
||||
config = true,
|
||||
-- Optional dependencies
|
||||
dependencies = {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
cmd = {
|
||||
"AerialToggle",
|
||||
"AerialOpen",
|
||||
"AerialOpenAll",
|
||||
"AerialClose",
|
||||
"AerialCloseAll",
|
||||
"AerialNext",
|
||||
"AerialPrev",
|
||||
"AerialGo",
|
||||
"AerialInfo",
|
||||
"AerialNavToggle",
|
||||
"AerialNavOpen",
|
||||
"AerialNavClose",
|
||||
},
|
||||
opts = {
|
||||
backends = { "treesitter", "lsp", "markdown", "man" },
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>so", "<cmd>AerialNavToggle<cr>", silent = true, desc = "symbol navigator" },
|
||||
{ "<leader>sO", "<cmd>AerialToggle<cr>", silent = true, desc = "symbol outline" },
|
||||
},
|
||||
},
|
||||
-- useful quickfix-like buffer
|
||||
{
|
||||
"folke/trouble.nvim",
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
opts = {},
|
||||
cmd = {
|
||||
"Trouble",
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>sd", "<cmd>Trouble diagnostics toggle<cr>", silent = true, desc = "diagnostics workspace" },
|
||||
{
|
||||
"<leader>sD",
|
||||
"<cmd>Trouble diagnostics toggle filter.buf=0<cr>",
|
||||
silent = true,
|
||||
desc = "diagnostics document",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
local writing_ft = { "quarto", "pandoc", "markdown", "text", "tex", "typst", "bib", "context", "rst", "vimwiki" }
|
||||
local writing_ft = { "quarto", "pandoc", "markdown", "text", "tex", "typst", "bib", "context", "rst" }
|
||||
|
||||
local prose_plugs = {
|
||||
-- UI improvements
|
||||
|
@ -40,34 +40,12 @@ local prose_plugs = {
|
|||
},
|
||||
},
|
||||
},
|
||||
-- displays prettier md rendering
|
||||
-- displays prettier headlines mimicking the ones in emacs orgmode
|
||||
{
|
||||
"MeanderingProgrammer/markdown.nvim",
|
||||
main = "render-markdown",
|
||||
opts = {
|
||||
file_types = { "markdown", "quarto", "pandoc", "vimwiki" },
|
||||
win_options = {
|
||||
conceallevel = {
|
||||
rendered = 2,
|
||||
},
|
||||
},
|
||||
heading = {
|
||||
width = "block",
|
||||
},
|
||||
},
|
||||
name = "render-markdown", -- Only needed if you have another plugin named markdown.nvim
|
||||
dependencies = { "nvim-treesitter/nvim-treesitter", "nvim-tree/nvim-web-devicons" }, -- if you prefer nvim-web-devicons
|
||||
"lukas-reineke/headlines.nvim",
|
||||
dependencies = "nvim-treesitter/nvim-treesitter",
|
||||
config = true,
|
||||
ft = writing_ft,
|
||||
keys = {
|
||||
{
|
||||
"<leader>pp",
|
||||
function()
|
||||
require("render-markdown").toggle()
|
||||
end,
|
||||
silent = true,
|
||||
desc = "toggle md rendering",
|
||||
},
|
||||
},
|
||||
},
|
||||
-- generate an auto-updating html preview for md files
|
||||
-- uses the very nice peek if deno is available, otherwise falls back to markdown-preview
|
||||
|
@ -106,7 +84,7 @@ local prose_plugs = {
|
|||
},
|
||||
cmd = { "PasteImage" },
|
||||
keys = {
|
||||
{ "<leader>pi", "<cmd>PasteImage<cr>", desc = "Paste image from system clipboard" },
|
||||
{ "<leader>pp", "<cmd>PasteImage<cr>", desc = "Paste image from system clipboard" },
|
||||
},
|
||||
ft = writing_ft,
|
||||
},
|
||||
|
@ -206,7 +184,6 @@ local prose_plugs = {
|
|||
"barreiroleo/ltex_extra.nvim",
|
||||
branch = "dev",
|
||||
},
|
||||
{ "let-def/texpresso.vim", ft = { "tex" } },
|
||||
}
|
||||
|
||||
return prose_plugs
|
||||
|
|
|
@ -1,150 +0,0 @@
|
|||
return {
|
||||
-- automatic docstring creation for a variety of languages
|
||||
{
|
||||
"danymat/neogen",
|
||||
dependencies = "nvim-treesitter/nvim-treesitter",
|
||||
opts = {
|
||||
snippet_engine = "luasnip",
|
||||
},
|
||||
cmd = {
|
||||
"Neogen",
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<localleader>lg",
|
||||
function()
|
||||
require("neogen").generate()
|
||||
end,
|
||||
silent = true,
|
||||
desc = "generate docstring",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- testing setup
|
||||
{
|
||||
"nvim-neotest/neotest",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-neotest/nvim-nio",
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
"antoinemadec/FixCursorHold.nvim",
|
||||
|
||||
"nvim-neotest/neotest-python",
|
||||
},
|
||||
config = function()
|
||||
require("neotest").setup({
|
||||
adapters = {
|
||||
require("neotest-python")({
|
||||
-- with coverage requires coverage.py and pytest-cov installed
|
||||
args = { "--cov" },
|
||||
}),
|
||||
},
|
||||
})
|
||||
if require("core.util").is_available("which-key") then
|
||||
require("which-key").add({ "<localleader>t", group = "test" })
|
||||
end
|
||||
end,
|
||||
ft = { "python" },
|
||||
keys = {
|
||||
{
|
||||
"<leader>st",
|
||||
[[<cmd>lua require('neotest').summary.toggle()<cr>]],
|
||||
desc = "toggle test list",
|
||||
silent = true,
|
||||
},
|
||||
{
|
||||
"<leader>sT",
|
||||
[[<cmd>lua require('neotest').output_panel.toggle()<cr>]],
|
||||
desc = "toggle test output",
|
||||
silent = true,
|
||||
},
|
||||
{
|
||||
"<localleader>to",
|
||||
[[<cmd>lua require('neotest').output.open()<cr>]],
|
||||
desc = "toggle test output",
|
||||
silent = true,
|
||||
},
|
||||
{
|
||||
"<localleader>tt",
|
||||
[[<cmd>lua require('neotest').run.run()<cr>]],
|
||||
desc = "run nearest test",
|
||||
silent = true,
|
||||
},
|
||||
{
|
||||
"<localleader>td",
|
||||
[[<cmd>lua require('neotest').run.run({strategy = "dap"})<cr>]],
|
||||
desc = "debug nearest test",
|
||||
silent = true,
|
||||
}, -- REQUIRES DAP
|
||||
{
|
||||
"<localleader>tT",
|
||||
[[<cmd>lua require('neotest').run.run(vim.fn.expand("%"))<cr>]],
|
||||
desc = "test current file",
|
||||
silent = true,
|
||||
},
|
||||
{
|
||||
"<localleader>tr",
|
||||
[[<cmd>lua require('neotest').run.run_last()<cr>]],
|
||||
desc = "re-run last test",
|
||||
silent = true,
|
||||
},
|
||||
{
|
||||
"<localleader>tw",
|
||||
[[<cmd>lua require('neotest').watch.toggle()<cr>]],
|
||||
desc = "watch current test",
|
||||
silent = true,
|
||||
},
|
||||
{
|
||||
"<localleader>tW",
|
||||
[[<cmd>lua require('neotest').watch.toggle(vim.fn.expand("%"))<cr>]],
|
||||
desc = "watch current file",
|
||||
silent = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
-- TODO needs to pick up poetry env for python,
|
||||
-- currently just hard-codes running through poetry
|
||||
{
|
||||
"andythigpen/nvim-coverage",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
},
|
||||
config = function()
|
||||
require("coverage").setup({
|
||||
lang = { python = { coverage_command = "poetry run coverage json -q -o -" } },
|
||||
})
|
||||
end,
|
||||
ft = { "python" },
|
||||
cmd = {
|
||||
"Coverage",
|
||||
"CoverageLoad",
|
||||
"CoverageLoadLcov",
|
||||
"CoverageShow",
|
||||
"CoverageHide",
|
||||
"CoverageToggle",
|
||||
"CoverageClear",
|
||||
"CoverageSummary",
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<localleader>tp",
|
||||
[[<cmd>Coverage<cr>]],
|
||||
desc = "show coverage report",
|
||||
silent = true,
|
||||
},
|
||||
{
|
||||
"<localleader>tP",
|
||||
[[<cmd>CoverageToggle<cr>]],
|
||||
desc = "toggle coverage gutter",
|
||||
silent = true,
|
||||
},
|
||||
{
|
||||
"<localleader>ts",
|
||||
[[<cmd>CoverageSummary<cr>]],
|
||||
desc = "show coverage summary",
|
||||
silent = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
|
@ -8,32 +8,30 @@ return {
|
|||
-- if molten exists, is initialized and connected to a kernel
|
||||
-- show it in the statusline
|
||||
local function molten()
|
||||
-- we don't have access to python, disregard element
|
||||
local function checked_pynvim(_, exitcode)
|
||||
if exitcode == 0 then
|
||||
has_pynvim = 1
|
||||
else
|
||||
has_pynvim = 0
|
||||
end
|
||||
end
|
||||
if has_pynvim == 0 then
|
||||
return ""
|
||||
elseif has_pynvim == 1 then
|
||||
local status_ok, res = pcall(function()
|
||||
return require("molten.status").kernels() ~= ""
|
||||
end)
|
||||
if status_ok and res then
|
||||
return ""
|
||||
end
|
||||
return ""
|
||||
-- we don't know if we have python yet, start a check
|
||||
else
|
||||
vim.system({ "poetry", "env", "info", "-p" }, { text = true }, function(_, exitcode)
|
||||
if exitcode == 0 then
|
||||
has_pynvim = 1
|
||||
else
|
||||
has_pynvim = 0
|
||||
end
|
||||
end)
|
||||
has_pynvim = 0
|
||||
elseif has_pynvim == -1 then
|
||||
vim.fn.jobstart({ "python", "-c", "from neovim import VERSION" }, { on_exit = checked_pynvim })
|
||||
end
|
||||
if
|
||||
has_pynvim == 1
|
||||
and require("core.util").is_available("molten.status")
|
||||
and require("molten.status").kernels() ~= ""
|
||||
then
|
||||
return ""
|
||||
end
|
||||
return ""
|
||||
end
|
||||
|
||||
-- count number of selected lines and characters
|
||||
-- stolen: https://github.com/chrisgrieser/.config/blob/8af1841ba24f7c81c513e12f853b52f530ef5b37/nvim/lua/plugins/lualine.lua#L80C1-L87C4
|
||||
-- count number of selected lines and characters
|
||||
-- stolen: https://github.com/chrisgrieser/.config/blob/8af1841ba24f7c81c513e12f853b52f530ef5b37/nvim/lua/plugins/lualine.lua#L80C1-L87C4
|
||||
local function selectionCount()
|
||||
local isVisualMode = vim.fn.mode():find("[Vv]")
|
||||
if not isVisualMode then
|
||||
|
@ -151,12 +149,6 @@ return {
|
|||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"folke/todo-comments.nvim",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
opts = {},
|
||||
event = "VeryLazy",
|
||||
},
|
||||
{
|
||||
"jiaoshijie/undotree",
|
||||
dependencies = {
|
||||
|
|
|
@ -218,11 +218,3 @@ quantifiability
|
|||
seaborn
|
||||
matplotlib.
|
||||
polars
|
||||
UBI
|
||||
villagization
|
||||
automobiles
|
||||
automobile
|
||||
decarbonisation
|
||||
Oportunidades
|
||||
OECD
|
||||
NREGA
|
||||
|
|
|
@ -112,7 +112,6 @@ download() { # 1=url
|
|||
if ! _alreadyexists "$yt_dl_fname" || ! _should_archive; then
|
||||
_download_cmd "$*"
|
||||
file=$(_findfile "$TEMP_FOLDER" "$yt_dl_fname")
|
||||
printf "Moving file %s to dir: %s\n" "$file" "$DL_FOLDER"
|
||||
mv "$file" "$DL_FOLDER"
|
||||
|
||||
if _should_archive; then
|
||||
|
@ -125,7 +124,7 @@ download() { # 1=url
|
|||
elif _should_archive; then
|
||||
archive_file=$(_findfile "$ARCHIVE_FOLDER" "$yt_dl_fname")
|
||||
echo "$archive_file" | while read -r file; do
|
||||
printf "File %s exists, not downloading duplicate.\n" "$file"
|
||||
echo "file $file exists, not downloading duplicate"
|
||||
_call_archive "$file" "$DL_FOLDER"
|
||||
done
|
||||
fi
|
||||
|
@ -133,8 +132,8 @@ download() { # 1=url
|
|||
|
||||
setup() {
|
||||
TEMP_FOLDER="${TEMP_FOLDER:-${HOME}/downloads}"
|
||||
DL_FOLDER="${DL_FOLDER:-${XDG_VIDEOS_DIR:-$HOME/videos}/inbox}"
|
||||
ARCHIVE_FOLDER="${ARCHIVE_FOLDER:-${XDG_VIDEOS_DIR:-$HOME/videos}/archive}"
|
||||
DL_FOLDER="${DL_FOLDER:-${XDG_VIDEOS_DIR:-$HOME/media/videos}/inbox}"
|
||||
ARCHIVE_FOLDER="${ARCHIVE_FOLDER:-${XDG_VIDEOS_DIR:-$HOME/media/videos}/archive}"
|
||||
YT_DL_CMD="${YT_DL_CMD:-yt-dlp}"
|
||||
yt_default_opts=(-f "best[height\<=1080]" --retries 15 --embed-chapters --embed-subs --sub-lang "en,de,es,fr")
|
||||
declare -a YT_DL_OPTS=${YT_DL_OPTS:-( "${yt_default_opts[@]}" )}
|
||||
|
@ -161,7 +160,6 @@ add_to_queue() { # 1=url
|
|||
}
|
||||
|
||||
remove_from_queue() { # 1=url
|
||||
printf "Removing url %s from queue.\n" "$1"
|
||||
sed -i.bak -e "\|$1|d" "$queue_file"
|
||||
}
|
||||
|
||||
|
@ -203,7 +201,7 @@ main() {
|
|||
exit
|
||||
fi
|
||||
|
||||
for url in "$@"; do
|
||||
for url in $*; do
|
||||
add_to_queue "$url"
|
||||
done
|
||||
if is_only_instance; then
|
||||
|
|
55
writing/.config/papis/scripts/test-journal.csv
Normal file
55
writing/.config/papis/scripts/test-journal.csv
Normal file
|
@ -0,0 +1,55 @@
|
|||
ID,Type,Colour,Title,Author,Date,Created,Updated,Starred,Latitude,Longitude,Address,City,State,Country,HasPhoto,PhotoDate,PhotoLatitude,PhotoLongitude,EntryText,HighlightText
|
||||
"48A3008B-7B60-4371-9FCB-EC79875E5255","2","0","Will My Cat Eat My Eyeballs?","Caitlin Doughty","2020-04-21T05:48:33Z","2020-04-21T05:48:33Z","2020-04-21T05:48:33Z","0","51.33312987755212","12.40349975672389","Lene-Voigt-Park, 04317 Leipzig, Germany","Leipzig","Saxony","Germany","0","","","","","In 2016, a zoo in the Gaza Strip had to be abandoned due to war and the Israeli blockade. As the animals died one by one, they mummified in the dry, hot air. Pictures from inside the ghost zoo show eerily preserved lions, tigers, hyenas, monkeys, and crocodiles."
|
||||
"B0F64CB1-CE3F-4120-A71B-73A4B42342A9","2","0","Will My Cat Eat My Eyeballs?","Caitlin Doughty","2020-04-21T06:04:00Z","2020-04-21T06:04:00Z","2020-04-21T06:04:00Z","0","51.33326651467173","12.40350059326559","Lene-Voigt-Park, 04317 Leipzig, Germany","Leipzig","Saxony","Germany","0","","","","","Livor mortis is the pooling of blood in lower areas of the corpse, usually a person’s back. (Again, thanks, gravity.) The pools tend to be purple in color. In Latin, the phrase means “the bluish color of death.”"
|
||||
"E7ED8055-408C-45D9-A337-EDF79FCDA1E4","2","0","Will My Cat Eat My Eyeballs?","Caitlin Doughty","2020-04-21T06:05:33Z","2020-04-21T06:05:33Z","2020-04-21T06:05:33Z","0","51.33313899677364","12.40373946824236","Lene-Voigt-Park, 04317 Leipzig, Germany","Leipzig","Saxony","Germany","0","","","","","If the livor mortis is bright cherry red, that might mean the person died in the cold, or by inhaling carbon monoxide (maybe smoke from a fire). If the livor mortis is deep purple or pink, that might mean the person suffocated, or died of heart failure. Finally, if a person has lost a lot of blood, you might not find any livor mortis at all."
|
||||
"4C32D32A-26D9-4A6B-B09D-10A6AF05373F","2","0","Will My Cat Eat My Eyeballs?","Caitlin Doughty","2020-04-21T06:07:06Z","2020-04-21T06:07:06Z","2020-04-21T06:07:06Z","0","51.33336017226236","12.40364873927894","Lene-Voigt-Park, 04317 Leipzig, Germany","Leipzig","Saxony","Germany","0","","","","","putrefaction. This is when the famous green color of death comes into its own. It’s more of a greenish-brown, actually. With some turquoise"
|
||||
"CE8B72C5-A72D-4409-B8AE-5AD66C092F8D","2","0","Will My Cat Eat My Eyeballs?","Caitlin Doughty","2020-04-21T06:07:13Z","2020-04-21T06:07:13Z","2020-04-21T06:07:13Z","0","51.33322495992609","12.40351477567372","Lene-Voigt-Park, 04317 Leipzig, Germany","Leipzig","Saxony","Germany","0","","","","","even after you die there are still fun things happening inside your flesh case? Well, bacteria are the most important guests at the party. Gut bacteria go wild, digesting you from the inside."
|
||||
"9D60E884-E395-44F9-8A8E-1B1EC6F88108","2","0","Will My Cat Eat My Eyeballs?","Caitlin Doughty","2020-04-21T06:10:14Z","2020-04-21T06:10:14Z","2020-04-21T06:10:14Z","0","51.33334809067811","12.40355910032729","Lene-Voigt-Park, 04317 Leipzig, Germany","Leipzig","Saxony","Germany","0","","","","","In a corpse, this marbling is the visible sign of blood vessels decaying and hemoglobin separating from the blood. The hemoglobin stains the skin, producing delicate color schemes in shades of red, dark purple, green, and black. The hemoglobin ring breaks down into bilirubin (turning you yellow) and biliverdin (turning you green)."
|
||||
"C2C62195-156F-45D3-A6DD-F93558CE2400","2","0","Will My Cat Eat My Eyeballs?","Caitlin Doughty","2020-04-21T06:16:02Z","2020-04-21T06:16:02Z","2020-04-21T06:16:02Z","0","51.33307523642424","12.40368739009483","Lene-Voigt-Park, 04317 Leipzig, Germany","Leipzig","Saxony","Germany","0","","","","","It’s more height than weight that determines how much ash is in that doves-and-roses urn. Women tend to be shorter—less bone—so their ashes usually weigh around four pounds. Men tend to be taller, and have ashes that weigh around six pounds"
|
||||
"DE2BC341-686E-426E-BC9D-40720FDF1960","2","0","Will My Cat Eat My Eyeballs?","Caitlin Doughty","2020-04-21T06:27:21Z","2020-04-21T06:27:21Z","2020-04-21T06:27:21Z","0","51.33315269318479","12.40353550840357","Lene-Voigt-Park, 04317 Leipzig, Germany","Leipzig","Saxony","Germany","0","","","","","The muscles in your body need ATP (adenosine triphosphate) in order to relax. But ATP requires oxygen. No more breathing means no more oxygen, which means no more ATP, which means the muscles seize up and can’t relax. This chemical change, collectively called rigor mortis, starts around your eyelids and jaw and spreads through every muscle in the body, even the organs"
|
||||
"15A77BF7-A426-483D-B872-1C6B31C0487D","2","0","Will My Cat Eat My Eyeballs?","Caitlin Doughty","2020-04-21T06:28:29Z","2020-04-21T06:28:29Z","2020-04-21T06:28:29Z","0","51.33320752344045","12.40346894462138","Lene-Voigt-Park, 04317 Leipzig, Germany","Leipzig","Saxony","Germany","0","","","","","Unfortunately, rigor mortis eventually goes away. Every dead body is different, and the environment plays a big role in the timing, but after about seventy-two hours your muscles will go all floppy again—along with your duck-face lips."
|
||||
"CAAB37BE-FBEC-40E9-9EBE-30446DA255C7","2","0","Will My Cat Eat My Eyeballs?","Caitlin Doughty","2020-04-21T06:28:56Z","2020-04-21T06:28:56Z","2020-04-21T06:28:56Z","0","51.33321627423378","12.40351308014501","Lene-Voigt-Park, 04317 Leipzig, Germany","Leipzig","Saxony","Germany","0","","","","","cadaveric spasm, also known as instantaneous rigor. Instantaneous rigor is exactly what it sounds like. When someone dies, they skip right over the floppy muscle relaxation stage and go straight into rigor mortis"
|
||||
"DFD27A7C-5989-4856-A1AF-3FB94441D4B2","2","0","Will My Cat Eat My Eyeballs?","Caitlin Doughty","2020-04-22T05:42:23Z","2020-04-22T05:42:23Z","2020-04-22T05:42:23Z","0","51.33315890745651","12.40386766229344","Lene-Voigt-Park, 04317 Leipzig, Germany","Leipzig","Saxony","Germany","0","","","","","extreme taphophobia, or the fear of being buried alive"
|
||||
"70630E8A-074E-4EF4-A90D-C09C904E1A30","2","0","Will My Cat Eat My Eyeballs?","Caitlin Doughty","2020-04-22T05:42:35Z","2020-04-22T05:42:35Z","2020-04-22T05:42:35Z","0","51.33347725283606","12.4038111028164","Lene-Voigt-Park, 04317 Leipzig, Germany","Leipzig","Saxony","Germany","0","","","","","Matthew Wall, a man living (yes, living) in Braughing, England, in the sixteenth century. Matthew was thought to be dead, but was lucky enough to have his pallbearers slip on wet leaves and drop the coffin on the way to his burial. As the story goes, when the coffin was dropped, Matthew awakened and knocked on the lid to be released. To this day, every October 2nd is celebrated as Old Man’s Day to commemorate Matthew’s revival. He lived, by the way, for twenty-four more years."
|
||||
"C263EF5F-6EE6-45A7-8636-ADF854F783E2","2","0","Will My Cat Eat My Eyeballs?","Caitlin Doughty","2020-04-22T05:44:16Z","2020-04-22T05:44:16Z","2020-04-22T05:44:16Z","0","51.33333234385331","12.40393275864894","Lene-Voigt-Park, 04317 Leipzig, Germany","Leipzig","Saxony","Germany","0","","","","","1937 is not quite Ye Olden Times, but at least it’s way before you were born—Angelo Hays of France was in a motorcycle accident. When doctors couldn’t find his pulse, he was pronounced dead. He was buried quickly and his own parents were not allowed to see his disfigured body. Angelo would have remained buried if it wasn’t for the life insurance company’s suspicions of foul play.
|
||||
Two days after Angelo was buried, he was exhumed for an investigation. Upon inspecting the “corpse,” examiners found that it was still warm, and that Angelo was alive.
|
||||
The theory is that Angelo had been in a very deep coma which slowed his breathing way, way down. It was that slow breathing that allowed him to stay alive while buried.*"
|
||||
"694640C9-8B5B-4A17-8CA5-F28A36154426","2","0","Will My Cat Eat My Eyeballs?","Caitlin Doughty","2020-04-22T06:04:37Z","2020-04-22T06:04:37Z","2020-04-22T06:04:37Z","0","51.3329970518616","12.40360202980954","Eilenburger Straße 19, 04317 Leipzig, Germany","Leipzig","Saxony","Germany","0","","","","","As the soldiers slowly decompose below ground, their bodies mix with the soil, releasing arsenic. As rain and floodwater move through the soil, concentrated clumps of arsenic are washed into the local water supply. Any amount of arsenic in your water is too much arsenic, frankly—but in trace amounts it’s safe to drink. Still, a study at a Civil War cemetery in Iowa City found that nearby water contained arsenic at three times the safe limit."
|
||||
"C74E1470-3A59-48E7-86D6-487A0CDD699D","2","0","Will My Cat Eat My Eyeballs?","Caitlin Doughty","2020-04-22T06:04:55Z","2020-04-22T06:04:55Z","2020-04-22T06:04:55Z","0","51.33303741650271","12.40377726073955","Lene-Voigt-Park, 04317 Leipzig, Germany","Leipzig","Saxony","Germany","0","","","","","most families couldn’t afford the expensive iron coffins that the train companies would allow. So enterprising men, called embalmers, started following the armies around, setting up tents, and chemically preserving the soldiers killed in battle so that they wouldn’t decompose on the journey back home. The embalmers, who were still experimenting with their craft, used everything from sawdust to arsenic. The problem with arsenic is that it’s toxic to living humans. Extremely, wildly toxic"
|
||||
"C6CED978-ACE6-4CA0-A049-BE020E554A8B","2","0","Will My Cat Eat My Eyeballs?","Caitlin Doughty","2020-04-22T06:28:23Z","2020-04-22T06:28:23Z","2020-04-22T06:28:23Z","0","51.33344123900376","12.40378955575635","Lene-Voigt-Park, 04317 Leipzig, Germany","Leipzig","Saxony","Germany","0","","","","","Eating a dead human may be horrifying to you, but humans throughout history have practiced mortuary cannibalism. Mortuary cannibalism is when the relatives, neighbors, or community members consume the flesh, or ashes, or both, of a dead person"
|
||||
"6F8A02E9-B3C1-43BC-A4E3-9F9C3800D065","2","0","Will My Cat Eat My Eyeballs?","Caitlin Doughty","2020-04-22T06:32:59Z","2020-04-22T06:32:59Z","2020-04-22T06:32:59Z","0","51.33306930550049","12.40362377979757","Lene-Voigt-Park, 04317 Leipzig, Germany","Leipzig","Saxony","Germany","0","","","","","cannibalism is not against the law. It’s not criminal to eat human flesh, but acquiring the human flesh (even if the dead person wanted you to eat them) is breaking the law. The laws you’re breaking are . . . wait for it. . . . remember these? Welcome back, abuse of corpse laws! It’s considered desecration and mutilation to eat a dead body"
|
||||
"D927ECD5-A0B4-4392-9FF9-CE2DFA411767","2","0","Will My Cat Eat My Eyeballs?","Caitlin Doughty","2020-04-22T06:33:47Z","2020-04-22T06:33:47Z","2020-04-22T06:33:47Z","0","51.33313436525666","12.40359640790111","Lene-Voigt-Park, 04317 Leipzig, Germany","Leipzig","Saxony","Germany","0","","","","","In 1945 and 1956, two researchers analyzed the donated bodies of four adult males, and estimated that the average male offers about 125,822 calories from protein and fat. That number is far below what other red meats like beef or boar can offer.
|
||||
(Yes, you heard me, humans are red meat.)"
|
||||
"67A56CE3-9EA9-4734-AD27-CB36E2C30B59","2","0","Will My Cat Eat My Eyeballs?","Caitlin Doughty","2020-04-22T06:34:55Z","2020-04-22T06:34:55Z","2020-04-22T06:34:55Z","0","51.33317946718154","12.4036723669615","Lene-Voigt-Park, 04317 Leipzig, Germany","Leipzig","Saxony","Germany","0","","","","","Neanderthals or Homo erectus, had cannibalistic tendencies. But if they ate their own kind, it was for ritual purposes, not dietary purposes. Again, humans just don’t provide enough calories to compete with something like a mammoth, which would have provided a (totally worth it) 3.6 million calories"
|
||||
"7CD9FA34-B80B-4A89-8711-CF6F920D89D5","2","0","Will My Cat Eat My Eyeballs?","Caitlin Doughty","2020-04-22T06:36:02Z","2020-04-22T06:36:02Z","2020-04-22T06:36:02Z","0","51.33311117236514","12.40366741139765","Lene-Voigt-Park, 04317 Leipzig, Germany","Leipzig","Saxony","Germany","0","","","","","hákarl or fermented shark, which is a beloved national dish in Iceland. The shark is buried, fermented, and hung to dry for months until its debut as a pungent, rotten treat.)"
|
||||
"7965FF25-0FC2-440D-BA14-5B5BD0F578C8","2","0","Will My Cat Eat My Eyeballs?","Caitlin Doughty","2020-04-22T06:37:07Z","2020-04-22T06:37:07Z","2020-04-22T06:37:07Z","0","51.33326414731066","12.40334296907688","Lene-Voigt-Park, 04317 Leipzig, Germany","Leipzig","Saxony","Germany","0","","","","","Even if the animal you ate had some sort of disease, most diseases are not zoonotic. That is to say, a human can’t get an animal disease by eating that animal. (Ebola is one of the rare exceptions.)
|
||||
But if you’re going to eat a human corpse it’s a different story. It is possible to contract blood-borne viruses such hepatitis B or HIV. Unlike when you eat animals, if you eat diseased human flesh, you could end up suffering from the same illness."
|
||||
"3C65AE85-D644-4FF8-AA39-876F39770A83","2","0","Will My Cat Eat My Eyeballs?","Caitlin Doughty","2020-04-22T06:38:16Z","2020-04-22T06:38:16Z","2020-04-22T06:38:16Z","0","51.33313684399542","12.40356420725142","Lene-Voigt-Park, 04317 Leipzig, Germany","Leipzig","Saxony","Germany","0","","","","","Humans can have abnormal proteins called prions. These proteins have lost their shape and proper function, and infect other, normal proteins. Unlike a virus or an infection, prions don’t have DNA or RNA, so they can’t be killed by heat or radiation. They’re tough little suckers that like to hang out in the brain and spinal column, spreading lesions and chaos.
|
||||
When talking about prions, scientists often point to the Fore people of Papua New Guinea. As late as the 1950s, anthropologists documented an epidemic of a neurological disease called kuru that was killing members of the tribe. Kuru is a disease caused by prions in the brain. The spread of kuru was traced to the tribe’s ritual of eating of human brains after death. The infected suffer from muscle spasms, dementia, and uncontrollable laughing or crying. The end result is a brain literally full of holes—and then death"
|
||||
"85C5809D-269E-4A79-A636-7CBCD399A026","2","0","Will My Cat Eat My Eyeballs?","Caitlin Doughty","2020-04-22T06:40:16Z","2020-04-22T06:40:16Z","2020-04-22T06:40:16Z","0","51.33324531314521","12.40348109026645","Lene-Voigt-Park, 04317 Leipzig, Germany","Leipzig","Saxony","Germany","0","","","","","The Yarkon Cemetery in Israel has started adding burial towers that will ultimately hold 250,000 graves. The towers even respect Jewish custom by filling the burial columns with dirt so that the graves are connected to the earth. At the moment, the world’s tallest cemetery is in Brazil. Memorial Necrópole Ecumênica III contains thirty-two stories of graves, and also has a restaurant, concert hall, and gardens filled with exotic birds. When I was in Tokyo, Japan, I visited a multistory building that houses thousands of cremated remains (delivered to personal visiting rooms by automatic conveyors that locate and fetch the correct urn)"
|
||||
"F514887D-EBBE-476A-A925-349956DBB1F8","2","0","Will My Cat Eat My Eyeballs?","Caitlin Doughty","2020-04-22T06:42:42Z","2020-04-22T06:42:42Z","2020-04-22T06:42:42Z","0","51.33321134404212","12.40346390338805","Lene-Voigt-Park, 04317 Leipzig, Germany","Leipzig","Saxony","Germany","0","","","","","In Singapore, for every square mile there are more than 18,000 people. Every. Square. Mile. 18,000. People. In the United States, for every square mile there are only 92 people."
|
||||
"485B0E2D-E873-49CA-AB58-F3E6E094D4AF","2","0","Will My Cat Eat My Eyeballs?","Caitlin Doughty","2020-04-22T06:44:44Z","2020-04-22T06:44:44Z","2020-04-22T06:44:44Z","0","51.3332780072871","12.40335988533181","Lene-Voigt-Park, 04317 Leipzig, Germany","Leipzig","Saxony","Germany","0","","","","","not all near-death experiences are created equal. Not everyone finds themselves walking into a sparkling white light while scenes of childhood pets and awkward job interviews pass before their eyes. In one study, about half of the people who had a near-death experience said they were fully aware they were dead (which could be good or bad, depending on how chill with death you are). One in four people said they had an out-of-body experience. Only one in three actually moved through the good ol’ tunnel. Also, some bad news: we imagine NDEs as being positive and blissful, but that was only true about half the time. Turns out they can be pretty terrifying, too."
|
||||
"48DF4E17-A72C-4932-A5E8-2404E40589E0","2","0","Will My Cat Eat My Eyeballs?","Caitlin Doughty","2020-04-22T06:49:59Z","2020-04-22T06:49:59Z","2020-04-22T06:49:59Z","0","51.33340826907205","12.40373781249704","Lene-Voigt-Park, 04317 Leipzig, Germany","Leipzig","Saxony","Germany","0","","","","","Religious folks may see the light as a supernatural gateway to the afterlife; scientists may see the light as caused by oxygen deprivation in the brain"
|
||||
"A4BF96D3-4D3E-4A05-9FA7-7C1431247092","2","0","Will My Cat Eat My Eyeballs?","Caitlin Doughty","2020-04-22T06:50:29Z","2020-04-22T06:50:29Z","2020-04-22T06:50:29Z","0","51.33313187386248","12.40360474920343","Lene-Voigt-Park, 04317 Leipzig, Germany","Leipzig","Saxony","Germany","0","","","","","Scientists believe that seeing this light at the end of the tunnel is the result of retinal ischemia, which happens when there isn’t enough blood reaching the eye. As less blood flows to the eyes, vision is reduced. Being in a state of extreme fear can also cause retinal ischemia. Both fear and decrease in oxygen are associated with dying. In this context, the extreme white tunnel vision characteristic of NDEs starts to make much more sense."
|
||||
"CCE34C40-F2A7-4B9D-8FB8-C6E680DC32AF","2","0","Will My Cat Eat My Eyeballs?","Caitlin Doughty","2020-04-22T06:51:35Z","2020-04-22T06:51:35Z","2020-04-22T06:51:35Z","0","51.33329482285431","12.40364259648123","Lene-Voigt-Park, 04317 Leipzig, Germany","Leipzig","Saxony","Germany","0","","","","","necrophages, the unsung heroes of the natural world. They are the death eaters, the organisms that fuel up by consuming dead and rotting things"
|
||||
"0CCE3637-107E-4D26-8464-91FF655F18FF","2","0","Will My Cat Eat My Eyeballs?","Caitlin Doughty","2020-04-22T06:54:31Z","2020-04-22T06:54:31Z","2020-04-22T06:54:31Z","0","51.33293946208754","12.40374112690689","Eilenburger Straße 19, 04317 Leipzig, Germany","Leipzig","Saxony","Germany","0","","","","","why don’t they eat bones, too? The simple answer is that eating bones is hard work. Not only that, but bones are not nutritionally useful to insects. Bones are mostly made of calcium, something insects just don’t need a lot of. Since they don’t need much calcium, insects like dermestids haven’t evolved to consume it or desire it"
|
||||
"D670B3E4-D54B-4E4E-B8A1-71C7801AD636","2","0","Will My Cat Eat My Eyeballs?","Caitlin Doughty","2020-04-22T06:55:35Z","2020-04-22T06:55:35Z","2020-04-22T06:55:35Z","0","51.33322607376345","12.40368501492717","Lene-Voigt-Park, 04317 Leipzig, Germany","Leipzig","Saxony","Germany","0","","","","","So, while dermestids and other flesh-eating bugs do not usually eat bone, if they get hungry enough, they will. Humans behave the same way. When Paris was under siege in the late sixteenth century, the city was starving. When people inside the city ran out of cats and dogs and rats to eat, they began disinterring bodies from the mass graves in the cemetery. They took the bones and ground them into flour to make what became known as Madame de Montpensier’s bread. Bone appetit! (Actually, maybe don’t bone appetit, as many who ate the bone bread died themselves.)"
|
||||
"88349039-88D4-454E-B8D9-94C65DC27E84","2","2","Will My Cat Eat My Eyeballs?","Caitlin Doughty","2020-04-22T06:56:52Z","2020-04-22T06:56:52Z","2020-04-22T06:56:52Z","0","51.33330624333909","12.40354514751025","Lene-Voigt-Park, 04317 Leipzig, Germany","Leipzig","Saxony","Germany","0","","","","","There is strong evidence that bone worms have been eating giant marine reptiles since the time of the dinosaurs. That means the whale eaters are older than whales themselves."
|
||||
"949FED16-150A-4200-8C75-BED6C1BB6E84","2","0","Will My Cat Eat My Eyeballs?","Caitlin Doughty","2020-04-22T06:59:55Z","2020-04-22T06:59:55Z","2020-04-22T06:59:55Z","0","51.33326913673976","12.40356814886445","Lene-Voigt-Park, 04317 Leipzig, Germany","Leipzig","Saxony","Germany","0","","","","","Other cultures gave up on burial entirely. High in the mountains of Tibet, where the ground is often too rocky and frozen for burial, and where not enough trees grow to perform cremations, a different kind of death ritual developed. To this day, bodies are laid out in an open area for a sky burial, a lovely name for the dead body being consumed by vultures. Your cat might eat you after you die, but a vulture can’t wait to rip you to pieces and carry you off into the sky."
|
||||
"F530E5B8-3E18-4089-898F-22C3756BBD34","2","0","Will My Cat Eat My Eyeballs?","Caitlin Doughty","2020-04-23T06:16:09Z","2020-04-23T06:16:09Z","2020-04-23T06:16:09Z","0","51.33337047680838","12.4034332761469","Lene-Voigt-Park, 04317 Leipzig, Germany","Leipzig","Saxony","Germany","0","","","","","As they break down their brand-new food source—your dead body—the microbes give off gas made of VOCs, or volatile organic compounds. The prime stinkers here tend to be sulfur-containing compounds, which makes sense if you’ve ever experienced an especially potent and sulfuric eggy fart. Sulfur is the culprit in many a stink."
|
||||
"85A7852B-FB64-4740-9F5E-E6663499F602","2","0","Will My Cat Eat My Eyeballs?","Caitlin Doughty","2020-04-23T06:33:14Z","2020-04-23T06:33:14Z","2020-04-23T06:33:14Z","0","51.33342240539643","12.40362916382752","Lene-Voigt-Park, 04317 Leipzig, Germany","Leipzig","Saxony","Germany","0","","","","","Sometimes, larger bones, like thigh bones, require two people to pick up the bone at once. And sometimes the family will pass bone fragments to one another, chopsticks to chopsticks. This is the only time passing something between chopsticks is not considered rude. If you were to do this in public, with, say, a pork sparerib at a restaurant, it would be like bringing a funeral ritual to the dinner table. Total faux pas."
|
||||
"ED307F41-88BE-411B-A557-1157CE856DE8","2","0","Babel","R. F. Kuang","2023-02-07T14:56:10Z","2023-02-07T14:56:10Z","2023-02-07T14:56:10Z","0","45.10420249850454","5.742597241511231","226 Chemin des Pérouses, 38560 Jarrie, France","Jarrie","Auvergne-Rhône-Alpes","France","0","","","","","The abolitionist movement you know is a load of pomp. Rhetoric only. Pitt first raised the motion because he saw the need to cut off the slave trade to France. And Parliament got on board with the abolitionists because they were so very afraid of Black insurrection in the West Indies.’
|
||||
‘So you think it’s purely risk and economics.’
|
||||
‘Well, not necessarily. You brother likes to argue that the Jamaican slave revolt, failed though it was, is what impelled the British to legislate abolition. He’s right, but only half right. See, the revolt won British sympathy because the leaders were part of the Baptist church, and when it failed, proslavery whites in Jamaica started destroying chapels and threatening missionaries. Those Baptists went back to England and drummed up support on the grounds of religion, not natural rights. My point being, abolition happened because white people found reasons to care – whether those be economic or religious. You just have to make them think they came up with the idea themselves. You can’t appeal to their inner goodness. I have never met an Englishman I trusted to do the right thing out of sympathy.’"
|
||||
"D5EC6BE7-58DB-4E7E-8717-31ECBE11F8FE","2","0","Babel","R. F. Kuang","2023-02-08T07:58:12Z","2023-02-08T07:58:12Z","2023-02-08T07:58:12Z","0","45.10420267773596","5.74259767871893","226 Chemin des Pérouses, 38560 Jarrie, France","Jarrie","Auvergne-Rhône-Alpes","France","0","","","","","Strikers in this country never won broad public support, for the public merely wanted all the conveniences of modern life without the guilt of knowing how those conveniences were procured."
|
||||
"70FC0FBF-8BF3-4C03-AD90-864B8CD028FE","2","0","Babel","R. F. Kuang","2023-02-08T08:27:23Z","2023-02-08T08:27:23Z","2023-02-08T08:27:23Z","0","45.10420148905155","5.742597357615256","226 Chemin des Pérouses, 38560 Jarrie, France","Jarrie","Auvergne-Rhône-Alpes","France","0","","","","","The tactics of revolt spread fast. The British textile workers picked up these techniques of barricade from the 1831 and 1834 Canut revolts by silk workers in Lyon. Those revolts had been brutally repressed – but, crucially, they did not hold the backbone of the entire nation hostage"
|
||||
"10E7ED24-7F91-4DF2-B852-4AE6D5336111","2","0","Babel","R. F. Kuang","2023-02-09T20:45:43Z","2023-02-09T20:45:43Z","2023-02-09T20:45:43Z","0","45.10420123431852","5.742597001332137","226 Chemin des Pérouses, 38560 Jarrie, France","Jarrie","Auvergne-Rhône-Alpes","France","0","","","","","‘It’s like I’ve known you forever.’
|
||||
‘Me too,’ Ramy said.
|
||||
‘And that makes no sense,’ said Robin, drunk already, though there was no alcohol in the cordial. ‘Because I’ve known you for less than a day, and yet . . .’
|
||||
‘I think,’ said Ramy, ‘it’s because when I speak, you listen.’
|
||||
‘Because you’re fascinating.’
|
||||
‘Because you’re a good translator.’ Ramy leaned back on his elbows. ‘That’s just what translation is, I think. That’s all speaking is. Listening to the other and trying to see past your own biases to glimpse what they’re trying to say. Showing yourself to the world, and hoping someone else understands"
|
||||
"DAFA053F-19A9-4AA5-9A7D-22CF569281DA","2","0","Babel","R. F. Kuang","2023-02-09T20:59:12Z","2023-02-09T20:59:12Z","2023-02-09T20:59:12Z","0","45.10418836497428","5.742602536574182","226 Chemin des Pérouses, 38560 Jarrie, France","Jarrie","Auvergne-Rhône-Alpes","France","0","","","","","Victoire knows better.
|
||||
Victory is not assured. Victory may be in the portents, but it must be urged there by violence, by suffering, by martyrs, by blood. Victory is wrought by ingenuity, persistence, and sacrifice. Victory is a game of inches, of historical contingencies where everything goes right because they have made it go right."
|
||||
"0EBECEC5-9E72-4625-922A-C068BD4EE6BC","2","0","Totalitarianism","Hannah Arendt","2023-02-11T10:12:17Z","2023-02-11T10:12:17Z","2023-02-11T10:12:17Z","0","45.10421600393487","5.742588003722739","226 Chemin des Pérouses, 38560 Jarrie, France","Jarrie","Auvergne-Rhône-Alpes","France","0","","","","","In other words, while it has always been known that official Soviet publications served propaganda purposes and were utterly unreliable, it now appears that reliable source and statistical material probably never existed anywhere"
|
||||
"A1AFD977-E93D-4760-AC61-7E8ACC568D96","2","0","Totalitarianism","Hannah Arendt","2023-02-11T10:21:12Z","2023-02-11T10:21:12Z","2023-02-11T10:21:12Z","0","45.10420096244634","5.742582390092738","226 Chemin des Pérouses, 38560 Jarrie, France","Jarrie","Auvergne-Rhône-Alpes","France","0","","","","","Absolute monarchy, no doubt, was a very different affair in Spain, in France, in England, in Prussia; still it was everywhere the same form of government. Decisive in our context is that totalitarian government is different from dictatorships and tyrannies; the ability to distinguish between them is by no means an academic issue which could be safely left to the ""theoreticians,"" for total domination is the only form of government with which coexistence is not possible"
|
|
Loading…
Reference in a new issue