Compare commits
51 commits
e5b3f029b2
...
3827ba15b3
Author | SHA1 | Date | |
---|---|---|---|
3827ba15b3 | |||
f1b218da95 | |||
b800d8f1eb | |||
2c0d41f4af | |||
6f3ac3d31f | |||
74fdc4bc8f | |||
382bcdba72 | |||
72514b2a5e | |||
954ccf5e89 | |||
09af447747 | |||
ec20d637c0 | |||
22341e7988 | |||
25d37d17b3 | |||
c13db186cc | |||
0447f652cb | |||
356d3ef3e6 | |||
88ab8c10a6 | |||
c92afad510 | |||
1c7d0a9835 | |||
051c0914ad | |||
2c4d5c483d | |||
7128edc57c | |||
c75b7636e0 | |||
a44cf1d509 | |||
72e7832dce | |||
e94eade3b3 | |||
56003fcccb | |||
e3f123c080 | |||
ea7fcd92f5 | |||
e1abc2972b | |||
8d40fd843e | |||
3d4199d743 | |||
1b69f57146 | |||
70ccf5fa55 | |||
693f8ba3f4 | |||
74bbaf4daf | |||
e6d7578198 | |||
0127a5db07 | |||
fd8b0b290c | |||
cd9d373dca | |||
f2cb2f5be9 | |||
5d2542db51 | |||
89ed4615a7 | |||
1ad0c382a9 | |||
28825adc5d | |||
1e84deff03 | |||
73ae033139 | |||
ad90cdce30 | |||
9a874b1a1b | |||
e87814ebcb | |||
9a8a14f85f |
45 changed files with 764 additions and 471 deletions
|
@ -7,7 +7,7 @@ alsa-utils Advanced Linux Sound Architecture - Utilities R
|
|||
anki Helps you remember facts (like words/phrases in a foreign language) efficiently A
|
||||
ansible Official assortment of Ansible collections R
|
||||
ansible-lint Checks playbooks for practices and behaviour that could potentially be improved. R
|
||||
arch-wiki-lite The wiki without html. 1/9 as big, easily searched and viewable on console. R
|
||||
arch-wiki-lite Arch Wiki without HTML. 1/9 as big, easily searched & viewable on console R
|
||||
arduino Arduino prototyping platform SDK R
|
||||
arduino-avr-core Arduino AVR core with upstream avr-gcc and avrdude R
|
||||
arduino-cli Arduino command line interface R
|
||||
|
@ -68,6 +68,7 @@ fasd Command-line productivity booster, offers quick access to files and directo
|
|||
fd Simple, fast and user-friendly alternative to find R
|
||||
ffmpegthumbnailer Lightweight video thumbnailer that can be used by file managers R
|
||||
firefox Standalone web browser from mozilla.org R
|
||||
flavours A simple and easy cli to build and use base16 schemes A
|
||||
fonts-cjk Linux 下的免费商用字体包 A
|
||||
freerdp Free implementation of the Remote Desktop Protocol (RDP) R
|
||||
fwupd Simple daemon to allow session software to update firmware R
|
||||
|
@ -120,6 +121,7 @@ kubo IPFS implementation in Go R
|
|||
lazygit Simple terminal UI for git commands R
|
||||
lib32-gamemode A daemon/lib combo that allows games to request a set of optimisations be temporarily applied to the host OS R
|
||||
libdvdcss Portable abstraction library for DVD decryption R
|
||||
libfido2 Library functionality for FIDO 2.0, including communication with a device over USB R
|
||||
libqalculate Multi-purpose desktop calculator R
|
||||
libreoffice-fresh LibreOffice branch which contains new features and program enhancements R
|
||||
libva-intel-driver VA-API implementation for Intel G45 and HD Graphics family R
|
||||
|
@ -295,7 +297,7 @@ transmission-qt Fast, easy, and free BitTorrent client (Qt GUI) R
|
|||
ttf-brill Brill Typeface by John Hudson for Brill Publishing House A
|
||||
ttf-comic-neue Comic Neue aspires to be the casual script choice for everyone including the typographically savvy. A
|
||||
ttf-heuristica A serif latin & cyrillic font, derived from the "Adobe Utopia" font by Apanov A
|
||||
ttf-iosevka-nerd Typeface family designed for coding, terminal use and technical documents (Nerd Fonts) R
|
||||
ttf-iosevka-nerd Patched font Iosevka from nerd fonts library R
|
||||
ttf-signika Sans-serif typeface from Google by Anna Giedryś A
|
||||
tuir Browse Reddit from your terminal A
|
||||
tut A TUI for Mastodon with vim inspired keys A
|
||||
|
@ -321,7 +323,7 @@ visidata Terminal spreadsheet multitool for discovering and arranging data R
|
|||
wallabag-client Command line client for the self hosted read-it-later app Wallabag A
|
||||
wavemon Ncurses-based monitoring application for wireless network devices R
|
||||
waybar Highly customizable Wayland bar for Sway and Wlroots based compositors R
|
||||
waylock-git A simple screenlocker for Wayland compositors A
|
||||
waylock A simple screenlocker for wayland compositors R
|
||||
wdisplays GUI display configurator for wlroots compositors A
|
||||
wev tool for debugging wayland events, similar to xev A
|
||||
wezterm A GPU-accelerated cross-platform terminal emulator and multiplexer R
|
||||
|
@ -336,6 +338,7 @@ xdg-user-dirs Manage user directories like ~/Desktop and ~/Music R
|
|||
xsv A CLI for indexing, slicing, analyzing, splitting and joining CSV files R
|
||||
yaml-language-server YAML Language Server R
|
||||
yarn Fast, reliable, and secure dependency management R
|
||||
yubikey-manager Python library and command line tool for configuring a YubiKey R
|
||||
yt-dlp A youtube-dl fork with additional features and fixes R
|
||||
ytfzf A POSIX script to find and watch youtube videos from the terminal R
|
||||
zathura-cb Adds comic book support to zathura R
|
||||
|
|
Can't render this file because it contains an unexpected character in line 299 and column 64.
|
|
@ -1,7 +1,6 @@
|
|||
Name Description Source Target
|
||||
ddrescue GNU data recovery tool R
|
||||
go-mtpfs-git Simple tool for viewing MTP devices as FUSE filesystems A
|
||||
libfido2 Library functionality for FIDO 2.0, including communication with a device over USB R
|
||||
most A terminal pager similar to 'more' and 'less' R
|
||||
netbird-bin A WireGuard-based mesh network that connects your devices into a single private network A
|
||||
odysseyra1n Bootstraps Procursus and install Sileo/libhooker on devices jailbroken with checkra1n. A
|
||||
|
@ -11,6 +10,3 @@ shadow-tech Desktop client for Shadow Tech cloud gaming service. A
|
|||
signal-desktop Signal Private Messenger for Linux R
|
||||
testdisk Checks and undeletes partitions + PhotoRec, signature based recovery tool R
|
||||
texlive-latexextra TeX Live - Large collection of add-on packages for LaTeX R
|
||||
ttf-iosevka-nerd Patched font Iosevka from nerd fonts library R
|
||||
vifm A file manager with curses interface, which provides Vi[m]-like environment R
|
||||
yubikey-manager Python library and command line tool for configuring a YubiKey R
|
||||
|
|
|
|
@ -0,0 +1,3 @@
|
|||
[Sleep]
|
||||
HibernateDelaySec=120min
|
||||
SuspendEstimationSec=30min
|
84
desktop/.config/flavours/config.toml
Normal file
84
desktop/.config/flavours/config.toml
Normal file
|
@ -0,0 +1,84 @@
|
|||
# Configuration for flavours
|
||||
# https://github.com/Misterio77/flavours
|
||||
#
|
||||
# This file should contain a [[items]] section for each application you want themed
|
||||
# You can also set a shell (outside items) on which to run hooks
|
||||
# Check flavours repository for more information and examples
|
||||
|
||||
|
||||
# Explanation and default values for keys:
|
||||
|
||||
# # Through which shell command hooks will run. The command will be replaced in '{}'
|
||||
shell = "bash -c '{}'"
|
||||
#
|
||||
# [[items]]
|
||||
# # File to inject to, supports tilde and env var expansion. required
|
||||
# file = "~/.config/example"
|
||||
# # Template to use. required
|
||||
# template = "example"
|
||||
#
|
||||
# # Subtemplate to use
|
||||
# subtemplate = "default"
|
||||
# # If not rewriting, on which line (usually a comment) to start replacing
|
||||
# start = "# Start flavours"
|
||||
# # If not rewriting, on which line (usually a comment) to stop replacing
|
||||
# end = "# End flavours"
|
||||
# # Should we rewrite the entire file, instead of using the above delimiters?
|
||||
# rewrite = false
|
||||
# # Command to execute after injecting (goes through shell)
|
||||
# hook = ""
|
||||
# # Whether this hook should be executed when flavours is ran with lightweight flag
|
||||
# light = true
|
||||
|
||||
[[items]]
|
||||
template = "waybar"
|
||||
file = "~/.local/state/waybar/colorscheme.css"
|
||||
rewrite = true
|
||||
light = false
|
||||
hook = "killall -SIGUSR2 waybar"
|
||||
|
||||
[[items]]
|
||||
# Uses custom nvim template to work together with
|
||||
# RRethy base16 neovim plugin
|
||||
template = "nvim"
|
||||
file = "~/.local/state/nvim/colorscheme.lua"
|
||||
rewrite = true
|
||||
|
||||
[[items]]
|
||||
# For newer wezterm versions (missing cursor= field)
|
||||
# make use of my custom wezterm template
|
||||
template = "wezterm"
|
||||
file = "~/.local/state/wezterm/colors.toml"
|
||||
rewrite = true
|
||||
|
||||
[[items]]
|
||||
template = "zathura"
|
||||
file = "~/.local/state/zathura/zathurarc"
|
||||
rewrite = true
|
||||
|
||||
[[items]]
|
||||
template = "qutebrowser"
|
||||
subtemplate = "minimal"
|
||||
file = "~/.local/state/qutebrowser/colorscheme.py"
|
||||
rewrite = true
|
||||
light = false
|
||||
hook = "pgrep -x qutebrowser && qutebrowser :config-source"
|
||||
|
||||
# CSS Webpage styling in qutebrowser
|
||||
[[item]]
|
||||
file = "~/.config/qutebrowser/stylesheets/stylesheet.css"
|
||||
template = "styles"
|
||||
subtemplate = "css-variables"
|
||||
rewrite = false
|
||||
start = "/* Start flavours */"
|
||||
end = "/* End flavours */"
|
||||
|
||||
[[items]]
|
||||
# MAKO DOES NOT SUPPORT INCLUDES YET
|
||||
template = "mako"
|
||||
file = "~/.config/mako/config"
|
||||
light = false
|
||||
rewrite = false
|
||||
start = "# Start flavours"
|
||||
end = "# End flavours"
|
||||
hook = "killall mako"
|
|
@ -0,0 +1,29 @@
|
|||
-- base16-nvim (https://github.com/wincent/base16-nvim)
|
||||
-- by Greg Hurrell (https://github.com/wincent)
|
||||
-- based on
|
||||
-- base16-vim (https://github.com/chriskempson/base16-vim)
|
||||
-- by Chris Kempson (https://github.com/chriskempson)
|
||||
-- using nvim-base16 neovim plugin
|
||||
-- by RRethy (https://github.com/RRethy/nvim-base16)
|
||||
-- {{scheme-name}} scheme by {{scheme-author}}
|
||||
|
||||
require('base16-colorscheme').setup({
|
||||
base00 = '#{{base00-hex}}',
|
||||
base01 = '#{{base01-hex}}',
|
||||
base02 = '#{{base02-hex}}',
|
||||
base03 = '#{{base03-hex}}',
|
||||
base04 = '#{{base04-hex}}',
|
||||
base05 = '#{{base05-hex}}',
|
||||
base06 = '#{{base06-hex}}',
|
||||
base07 = '#{{base07-hex}}',
|
||||
base08 = '#{{base08-hex}}',
|
||||
base09 = '#{{base09-hex}}',
|
||||
base0A = '#{{base0A-hex}}',
|
||||
base0B = '#{{base0B-hex}}',
|
||||
base0C = '#{{base0C-hex}}',
|
||||
base0D = '#{{base0D-hex}}',
|
||||
base0E = '#{{base0E-hex}}',
|
||||
base0F = '#{{base0F-hex}}'
|
||||
})
|
||||
|
||||
-- vim: filetype=lua
|
|
@ -0,0 +1,44 @@
|
|||
# Base16 {{scheme-name}} - wezterm color config
|
||||
# Scheme by {{scheme-author}}
|
||||
|
||||
[colors]
|
||||
foreground = "#{{base05-hex}}"
|
||||
background = "#{{base00-hex}}"
|
||||
cursor_bg = "#{{base05-hex}}"
|
||||
cursor_border = "#{{base05-hex}}"
|
||||
selection_bg = "#{{base05-hex}}"
|
||||
selection_fg = "#{{base00-hex}}"
|
||||
|
||||
ansi = [
|
||||
"#{{base00-hex}}",
|
||||
"#{{base08-hex}}",
|
||||
"#{{base0B-hex}}",
|
||||
"#{{base0A-hex}}",
|
||||
"#{{base0D-hex}}",
|
||||
"#{{base0E-hex}}",
|
||||
"#{{base0C-hex}}",
|
||||
"#{{base05-hex}}"
|
||||
]
|
||||
|
||||
brights = [
|
||||
"#{{base03-hex}}",
|
||||
"#{{base08-hex}}",
|
||||
"#{{base0B-hex}}",
|
||||
"#{{base0A-hex}}",
|
||||
"#{{base0D-hex}}",
|
||||
"#{{base0E-hex}}",
|
||||
"#{{base0C-hex}}",
|
||||
"#{{base07-hex}}"
|
||||
]
|
||||
|
||||
[colors.tab_bar]
|
||||
background = "#{{base00-hex}}"
|
||||
[colors.tab_bar.inactive_tab]
|
||||
bg_color = "#{{base05-hex}}"
|
||||
fg_color = "#{{base00-hex}}"
|
||||
[colors.tab_bar.active_tab]
|
||||
bg_color = "#{{base00-hex}}"
|
||||
fg_color = "#{{base05-hex}}"
|
||||
[colors.tab_bar.new_tab]
|
||||
bg_color = "#{{base05-hex}}"
|
||||
fg_color = "#{{base00-hex}}"
|
|
@ -1,15 +1,15 @@
|
|||
profile docked {
|
||||
output eDP-1 disable
|
||||
output "LG Electronics W2442 0x000075FD" position 1920,0
|
||||
output "LG Electronics W2442 0x000075E1" position 0,0
|
||||
exec notify-send "💻 Display changed" "Applying docked profile"
|
||||
output eDP-1 disable
|
||||
exec notify-send "💻 Display changed" "Applying docked LG profile"
|
||||
}
|
||||
|
||||
profile docked {
|
||||
output eDP-1 disable
|
||||
output "Goldstar Company Ltd W2442 0x000075FD" position 1920,0
|
||||
output "Goldstar Company Ltd W2442 0x000075E1" position 0,0
|
||||
exec notify-send "💻 Display changed" "Applying docked profile"
|
||||
output eDP-1 disable
|
||||
exec notify-send "💻 Display changed" "Applying docked Goldstar profile"
|
||||
}
|
||||
|
||||
profile portable {
|
||||
|
|
|
@ -1,25 +1,18 @@
|
|||
sort=-time
|
||||
layer=overlay
|
||||
background-color=#2e3440
|
||||
width=300
|
||||
height=110
|
||||
border-size=2
|
||||
border-color=#88c0d0
|
||||
border-radius=15
|
||||
max-icon-size=64
|
||||
default-timeout=5000
|
||||
ignore-timeout=1
|
||||
font=monospace 14
|
||||
|
||||
[urgency=low]
|
||||
border-color=#cccccc
|
||||
|
||||
[urgency=normal]
|
||||
border-color=#d08770
|
||||
|
||||
[urgency=critical]
|
||||
#on-notify=exec mpv /usr/share/sounds/freedesktop/stereo/message.oga
|
||||
border-color=#bf616a
|
||||
default-timeout=0
|
||||
|
||||
[mode=do-not-disturb]
|
||||
|
|
|
@ -71,7 +71,7 @@ riverctl map normal $mod+Shift T spawn "bemenu-translate"
|
|||
|
||||
# Desktop theming
|
||||
# shellcheck disable=SC2016
|
||||
riverctl map normal $mod+Shift S spawn 'styler set $(styler list themes | bemenu)'
|
||||
riverctl map normal $mod+Shift S spawn 'flavours list -l | bemenu | xargs flavours apply'
|
||||
|
||||
# Password dropdown frontend
|
||||
riverctl map normal $mod+Shift P spawn "pass-pick"
|
||||
|
@ -235,16 +235,17 @@ for pad in $(riverctl list-inputs | grep -i touchscreen); do
|
|||
done
|
||||
|
||||
setxkbmap -option "compose:menu"
|
||||
|
||||
# set a nice wallpaper
|
||||
if exist wlopm && exist swww; then
|
||||
if exist swww; then
|
||||
riverctl spawn "swww init"
|
||||
if [ -e "$HOME/pictures/wall.jpg" ]; then
|
||||
outputs=$(swww query | cut -d':' -f1)
|
||||
if [ "$(echo "$outputs" | grep -c -e '^DP')" -eq 2 ] && [ -e "$HOME/pictures/wall_r.jpg" ]; then
|
||||
swww img -o "$(echo "$outputs" | tail -n1)" "$HOME/pictures/wall_l.jpg"
|
||||
swww img -o "$(echo "$outputs" | head -n1)" "$HOME/pictures/wall_r.jpg"
|
||||
elif [ -e "$HOME/pictures/wall.jpg" ]; then
|
||||
swww img "$HOME/pictures/wall.jpg"
|
||||
fi
|
||||
if wlopm | grep -q DP-5 && wlopm | grep -q DP-3 && [ -e "$HOME/pictures/wall_l.jpg" ] && [ -e "$HOME/pictures/wall_r.jpg" ]; then
|
||||
swww img -o DP-5 "$HOME/pictures/wall_l.jpg"
|
||||
swww img -o DP-3 "$HOME/pictures/wall_r.jpg"
|
||||
fi
|
||||
fi
|
||||
|
||||
# start status bar
|
||||
|
@ -268,7 +269,6 @@ unset loc
|
|||
# start screen idle locking/dimming/sleep tool
|
||||
killall swayidle
|
||||
riverctl spawn "swayidle \
|
||||
timeout ${time_to_suspend} \"systemctl suspend-then-hibernate\" \
|
||||
timeout ${time_to_suspend} \"[ $(cat /sys/class/power_supply/AC/online) -eq 0 ] && systemctl suspend-then-hibernate\"
|
||||
timeout ${time_to_screendim} \"wlopm --off '*'\" \
|
||||
resume \"wlopm --on '*'\" \
|
||||
|
|
|
@ -149,4 +149,4 @@ window#waybar.hidden {
|
|||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
@import "/home/marty/.local/share/waybar/colorscheme.css";
|
||||
@import "/home/marty/.local/state/waybar/colorscheme.css";
|
||||
|
|
|
@ -48,8 +48,6 @@ item_fields:
|
|||
|
||||
musicbrainz:
|
||||
extra_tags: [year, catalognum, country, media, label]
|
||||
user: martyo
|
||||
pass: u^a<7YKULz\#CKX\-Fm]K%Up0
|
||||
auto: yes
|
||||
remove: yes
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ def_key "P"
|
|||
move_selected_items_to
|
||||
def_key "f"
|
||||
seek_forward
|
||||
def_key "b"
|
||||
def_key "F"
|
||||
seek_backward
|
||||
def_key "'"
|
||||
jump_to_playing_song
|
||||
|
|
5
nvim/.config/nvim/after/ftplugin/gitcommit.lua
Normal file
5
nvim/.config/nvim/after/ftplugin/gitcommit.lua
Normal file
|
@ -0,0 +1,5 @@
|
|||
local ns = vim.api.nvim_create_namespace('gitcommit')
|
||||
vim.api.nvim_set_hl(ns, 'ColorColumn', { bg = '#a33a3a', blend = 90 })
|
||||
vim.api.nvim_win_set_hl_ns(0, ns)
|
||||
vim.bo.textwidth = 72
|
||||
vim.wo.colorcolumn = '+0'
|
94
nvim/.config/nvim/after/ftplugin/quarto.lua
Normal file
94
nvim/.config/nvim/after/ftplugin/quarto.lua
Normal file
|
@ -0,0 +1,94 @@
|
|||
-- Start quarto session
|
||||
local startsession = function(file, args)
|
||||
file = file or "/tmp/jupyter-magma-session.json"
|
||||
if args then file = args[0] end
|
||||
vim.fn.jobstart({ "jupyter", "console", "-f", file }, {
|
||||
on_stdout = function(_)
|
||||
vim.cmd("MagmaInit " .. file)
|
||||
vim.cmd("JupyterAttach " .. file)
|
||||
end,
|
||||
on_exit = function(_)
|
||||
vim.notify(string.format("jupyter kernel stopped: %s", file), vim.log.levels.INFO)
|
||||
end,
|
||||
stdin = nil
|
||||
})
|
||||
end
|
||||
vim.api.nvim_create_user_command("JupyterStart", function() startsession() end,
|
||||
{})
|
||||
|
||||
local map = vim.keymap.set
|
||||
-- filetype mappings
|
||||
-- PLUGIN: magma-nvim
|
||||
-- Operate jupyter notebooks from within vim
|
||||
map('n', '<localleader>cc', ':MagmaEvaluateLine<cr>', { silent = true })
|
||||
map('n', '<localleader>C', '?^```{<cr>jV/```<cr>k:<C-u>MagmaEvaluateVisual<cr>',
|
||||
{ silent = true, desc = 'Evaluate current code cell' })
|
||||
map('x', '<localleader>c', ':<C-u>MagmaEvaluateVisual<cr>', { silent = true })
|
||||
map('n', '<localleader>c', "nvim_exec('MagmaEvaluateOperator', v:true)",
|
||||
{ expr = true, silent = true, desc = '+code-evaluation' })
|
||||
map('n', '<localleader>cr', ':MagmaReevaluateCell<cr>', { silent = true })
|
||||
map('n', '<localleader>cu', ':MagmaShowOutput<cr>', { silent = true })
|
||||
map('n', '<localleader>cU', ':noautocmd :MagmaEnterOutput<cr>',
|
||||
{ silent = true, desc = 'MagmaEnterOutput' })
|
||||
map('n', '<localleader>cd', ':MagmaDelete<cr>', { silent = true })
|
||||
map('n', '<localleader>cs', ':MagmaInterrupt<cr>')
|
||||
map('n', '<localleader>ci', ':MagmaInit ')
|
||||
map('n', '<localleader>cD', ':MagmaDeinit<cr>')
|
||||
map('n', '<localleader>cR', ':MagmaRestart<cr>')
|
||||
|
||||
-- jump to beginning of previous/ next cell code
|
||||
map('n', ']c', '/^```{<cr>}:nohl<cr>', { desc = 'Next quarto cell' })
|
||||
map('n', '[c', '?^```<cr>n}:nohl<cr>', { desc = 'Previous quarto cell' })
|
||||
-- insert cell header above/below
|
||||
map('n', '<localleader>co', 'o```{python}<cr><cr>```<esc>k',
|
||||
{ desc = 'Insert quarto cell below' })
|
||||
map('n', '<localleader>cO', 'O```{python}<cr><cr>```<esc>k',
|
||||
{ desc = 'Insert quarto cell above' })
|
||||
|
||||
local bufnr = 0
|
||||
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', '[e',
|
||||
'<cmd>lua vim.diagnostic.goto_prev({severity = vim.diagnostic.severity.ERROR})<cr>',
|
||||
{ buffer = bufnr, desc = 'Previous error' })
|
||||
map('n', ']e',
|
||||
'<cmd>lua vim.diagnostic.goto_next({severity = vim.diagnostic.severity.ERROR})<cr>',
|
||||
{ buffer = bufnr, desc = 'Next error' })
|
||||
|
||||
-- TODO find better way to enable lsp key mappings for quarto buffers
|
||||
local prefix = require('which-key').register
|
||||
prefix({ ['<localleader>l'] = { name = "+lsp" } })
|
||||
map('n', '<localleader>li', '<cmd>LspInfo<cr>',
|
||||
{ buffer = bufnr, desc = 'Lsp Info' })
|
||||
map('n', '<localleader>ld', '<cmd>lua vim.diagnostic.open_float()<cr>',
|
||||
{ buffer = bufnr, desc = 'Line diagnostics' })
|
||||
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' })
|
||||
map('n', '<localleader>lr', '<cmd>lua vim.lsp.buf.references()<cr>',
|
||||
{ buffer = bufnr, desc = 'References' })
|
||||
if client and client.server_capabilities.document_formatting then
|
||||
map('n', '<localleader>lf', "<cmd>lua vim.lsp.buf.formatting()<CR>",
|
||||
{ buffer = bufnr, desc = 'Format document' })
|
||||
end
|
||||
|
||||
map('n', 'K', '<cmd>lua vim.lsp.buf.hover()<cr>',
|
||||
{ buffer = bufnr, desc = 'Hover definition' })
|
||||
map('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<cr>',
|
||||
{ buffer = bufnr, desc = 'Definition' })
|
||||
map('n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<cr>',
|
||||
{ buffer = bufnr, desc = 'Declaration' })
|
||||
map('n', 'gs', '<cmd>lua vim.lsp.buf.signature_help()<cr>',
|
||||
{ buffer = bufnr, desc = 'Signature help' })
|
||||
map('n', 'gI', '<cmd>lua vim.lsp.buf.implementation()<cr>',
|
||||
{ buffer = bufnr, desc = 'Implementation' })
|
||||
map('n', 'gt', '<cmd>lua vim.lsp.buf.type_definition()<cr>',
|
||||
{ buffer = bufnr, desc = 'Type definition' })
|
||||
|
||||
if vim.b['sessionfile'] == nil then
|
||||
vim.b['sessionfile'] = vim.fn.tempname() .. '.json'
|
||||
startsession(vim.b['sessionfile'])
|
||||
end
|
|
@ -2,45 +2,14 @@
|
|||
-- https://github.com/elianiva/dotfiles/ - with much gratitude
|
||||
local api = vim.api
|
||||
|
||||
-- Highlight whatever is being yanked
|
||||
vim.api.nvim_create_autocmd({ "TextYankPost" }, {
|
||||
command = 'silent! lua require"vim.highlight".on_yank{timeout=500}',
|
||||
desc = "Highlight yanked text whenevery yanking something",
|
||||
group = vim.api.nvim_create_augroup('highlightyanks', { clear = true })
|
||||
})
|
||||
|
||||
-- Special setting for editing gopass files - make sure nothing leaks outside the directories it is supposed to
|
||||
vim.api.nvim_create_autocmd({ "BufNewFile", "BufRead" }, {
|
||||
pattern = {
|
||||
"/dev/shm/gopass.*", "/dev/shm/pass.?*/?*.txt",
|
||||
"$TMPDIR/pass.?*/?*.txt", "/tmp/pass.?*/?*.txt"
|
||||
},
|
||||
command = 'setlocal noswapfile nobackup noundofile nowritebackup viminfo=',
|
||||
desc = "Don't leak any information when editing potential password files",
|
||||
group = vim.api.nvim_create_augroup('passnoleak', { clear = true })
|
||||
})
|
||||
|
||||
api.nvim_exec('runtime abbrev.vim', false)
|
||||
|
||||
-- fixing neovim opening up at same moment as alacritty (see https://github.com/neovim/neovim/issues/11330)
|
||||
vim.api.nvim_create_autocmd({ "VimEnter" }, {
|
||||
callback = function()
|
||||
local pid, WINCH = vim.fn.getpid(), vim.loop.constants.SIGWINCH
|
||||
vim.defer_fn(function() vim.loop.kill(pid, WINCH) end, 20)
|
||||
end,
|
||||
desc = "Fix neovim sizing issues if opening same time as alacritty",
|
||||
group = vim.api.nvim_create_augroup('alacritty_fixsize', { clear = true })
|
||||
})
|
||||
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
vim.fn.system({
|
||||
"git",
|
||||
"clone",
|
||||
"--filter=blob:none",
|
||||
"https://github.com/folke/lazy.nvim.git",
|
||||
"--branch=stable", -- latest stable release
|
||||
lazypath,
|
||||
"git", "clone", "--filter=blob:none",
|
||||
"https://github.com/folke/lazy.nvim.git", "--branch=stable", -- latest stable release
|
||||
lazypath
|
||||
})
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
@ -50,7 +19,11 @@ vim.opt.rtp:prepend(lazypath)
|
|||
vim.g.mapleader = " "
|
||||
|
||||
require('settings')
|
||||
require("lazy").setup("plugins")
|
||||
require('autocmds')
|
||||
require("lazy").setup("plugins", {
|
||||
defaults = { version = "*" },
|
||||
performance = { rtp = { disabled_plugins = { "netrw", "netrwPlugin" } } }
|
||||
})
|
||||
require('look')
|
||||
require('maps')
|
||||
|
||||
|
|
|
@ -4,70 +4,71 @@
|
|||
"Navigator.nvim": { "branch": "master", "commit": "91d86506ac2a039504d5205d32a1d4bc7aa57072" },
|
||||
"bats.vim": { "branch": "master", "commit": "6a5d2ef22b0ede503d867770afd02ebb1f97b709" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||
"cmp-cmdline": { "branch": "main", "commit": "23c51b2a3c00f6abc4e922dbd7c3b9aca6992063" },
|
||||
"cmp-cmdline": { "branch": "main", "commit": "8fcc934a52af96120fe26358985c10c035984b53" },
|
||||
"cmp-latex-symbols": { "branch": "main", "commit": "165fb66afdbd016eaa1570e41672c4c557b57124" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "0e6b2ed705ddcff9738ec4ea838141654f12eeef" },
|
||||
"cmp-nvim-lua": { "branch": "main", "commit": "f3491638d123cfd2c8048aefaf66d246ff250ca6" },
|
||||
"cmp-pandoc.nvim": { "branch": "main", "commit": "cb2980263e14fb3c1b776edbd2c7a312b67c65ae" },
|
||||
"cmp-pandoc-references": { "branch": "master", "commit": "2c808dff631a783ddd2c554c4c6033907589baf6" },
|
||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||
"cmp-spell": { "branch": "master", "commit": "60584cb75e5e8bba5a0c9e4c3ab0791e0698bffa" },
|
||||
"cmp-tmux": { "branch": "main", "commit": "984772716f66d8ee88535a6bf3f94c4b4e1301f5" },
|
||||
"cmp-treesitter": { "branch": "master", "commit": "b40178b780d547bcf131c684bc5fd41af17d05f2" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" },
|
||||
"completion-vcard": { "branch": "master", "commit": "2220fd517a985ececed1adcf0e5be8f2815564c7" },
|
||||
"dial.nvim": { "branch": "master", "commit": "5020da900cc5dfd7067f181ee2ebd872ca7c84e8" },
|
||||
"formatter.nvim": { "branch": "master", "commit": "8a4c961330cc4688087f23d18fa7d2f1af9a4902" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "a6f7a1609addb4e57daa6bedc300f77f8d225ab7" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "ec4742a7eebf68bec663041d359b95637242b5c3" },
|
||||
"guihua.lua": { "branch": "master", "commit": "d3f6d01639b52e6a83ea98dd6ca244c9aa98b79b" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "273081443471cbc52c327bcb99614c32f247998d" },
|
||||
"dial.nvim": { "branch": "master", "commit": "54b503f906bc9e5ab85288414840a1b86d40769f" },
|
||||
"dressing.nvim": { "branch": "master", "commit": "5f44f829481640be0f96759c965ae22a3bcaf7ce" },
|
||||
"formatter.nvim": { "branch": "master", "commit": "ed949c13e1a942db29ababa35e8c7864ced90eb6" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "009887b76f15d16f69ae1341f86a7862f61cf2a1" },
|
||||
"fwatch.nvim": { "branch": "main", "commit": "a691f7349dc66285cd75a1a698dd28bca45f2bf8" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "bb808fc7376ed7bac0fbe8f47b83d4bf01738167" },
|
||||
"jupyter-kernel.nvim": { "branch": "main", "commit": "92eee2a9fcff65aedaba8f0544b87db44981673b" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "14075657131b9a19883a8845c47f1ab65461cd6f" },
|
||||
"lightspeed.nvim": { "branch": "main", "commit": "299eefa6a9e2d881f1194587c573dad619fdb96f" },
|
||||
"lsp-format.nvim": { "branch": "master", "commit": "ca0df5c8544e51517209ea7b86ecc522c98d4f0a" },
|
||||
"lsp-zero.nvim": { "branch": "main", "commit": "42bc5a1081666098a7154532e6ff5e3edc483b39" },
|
||||
"lsp_signature.nvim": { "branch": "master", "commit": "6f6252f63b0baf0f2224c4caea33819a27f3f550" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "0050b308552e45f7128f399886c86afefc3eb988" },
|
||||
"magma-nvim-goose": { "branch": "main", "commit": "94370733757d550594fe4a1d65643949d7485989" },
|
||||
"markdown-preview.nvim": { "branch": "master", "commit": "02cc3874738bc0f86e4b91f09b8a0ac88aef8e96" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "7a97a77eee486ae152d2c559a459eda7c8aa12aa" },
|
||||
"mason.nvim": { "branch": "main", "commit": "14ae1ca58440b158a0a35cf90773013caddf788a" },
|
||||
"mini.nvim": { "branch": "main", "commit": "dc0ccf1b0499d649a6177d2a406babcfe73b97de" },
|
||||
"nabla.nvim": { "branch": "master", "commit": "ddbfc6e244e79db9280c535ee85c81388c5d1b46" },
|
||||
"navigator.lua": { "branch": "master", "commit": "66d84151e94052f710b1dfb0d1fce2faaca6dced" },
|
||||
"neorg": { "branch": "main", "commit": "36cc15300c0dfc19d483b0a4176cb89e94f4730a" },
|
||||
"nui.nvim": { "branch": "main", "commit": "d147222a1300901656f3ebd5b95f91732785a329" },
|
||||
"nvim-base16.lua": { "branch": "master", "commit": "b336f40462b3ca1ad16a17c195b83731a2942d9a" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "cfafe0a1ca8933f7b7968a287d39904156f2c57d" },
|
||||
"lsp-zero.nvim": { "branch": "main", "commit": "79d2091809a295aba94f9ea72cd622bca198d046" },
|
||||
"lsp_signature.nvim": { "branch": "master", "commit": "4665921ff8e30601c7c1328625b3abc1427a6143" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "e99d733e0213ceb8f548ae6551b04ae32e590c80" },
|
||||
"magma-nvim-goose": { "branch": "main", "commit": "d54719dad7771061678a77dace5bef43b4462be8" },
|
||||
"markdown-preview.nvim": { "branch": "master", "commit": "9becceee5740b7db6914da87358a183ad11b2049" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "a31e011135a79d63c71254c250c9158e1056a1cb" },
|
||||
"mason.nvim": { "branch": "main", "commit": "3ee3174e30e33c9d58fa07b0a73a6e180474b59c" },
|
||||
"mini.nvim": { "branch": "main", "commit": "427751024313e2270ca723eb16af7b218c83a7fc" },
|
||||
"neural": { "branch": "main", "commit": "155618730b87a67655bdde373ee27bfce8b07ac9" },
|
||||
"nui.nvim": { "branch": "main", "commit": "0dc148c6ec06577fcf06cbab3b7dac96d48ba6be" },
|
||||
"nvim-base16": { "branch": "master", "commit": "0cab02bac9ca02a70db9e1d07e25fdb630b18a21" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "feed47fd1da7a1bad2c7dca456ea19c8a5a9823a" },
|
||||
"nvim-colorizer.lua": { "branch": "master", "commit": "36c610a9717cc9ec426a07c8e6bf3b3abcb139d6" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "aeb76066212b09c7c01a3abb42fe82f0130ef402" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "1a2d5f5224c65b0709bf5da0ccd9cad29272083a" },
|
||||
"nvim-notify": { "branch": "master", "commit": "bdd647f61a05c9b8a57c83b78341a0690e9c29d7" },
|
||||
"nvim-surround": { "branch": "main", "commit": "a06dea11e7fdcf338776fa51fa5277163ffb048d" },
|
||||
"nvim-toggleterm.lua": { "branch": "main", "commit": "19aad0f41f47affbba1274f05e3c067e6d718e1e" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "f6df07be122de665fb363476cc3680c90f5bdf05" },
|
||||
"nvim-treesitter-context": { "branch": "master", "commit": "cacee4828152dd3a83736169ae61bbcd29a3d213" },
|
||||
"nvim-treesitter-textsubjects": { "branch": "master", "commit": "bc047b20768845fd54340eb76272b2cf2f6fa3f3" },
|
||||
"nvim-ts-context-commentstring": { "branch": "main", "commit": "a0f89563ba36b3bacd62cf967b46beb4c2c29e52" },
|
||||
"nvim-ts-rainbow": { "branch": "master", "commit": "ef95c15a935f97c65a80e48e12fe72d49aacf9b9" },
|
||||
"otter.nvim": { "branch": "main", "commit": "e32e432988fddc7fc96f08300e56750a838f0893" },
|
||||
"papis.nvim": { "branch": "main", "commit": "4023d30b336c147b12a249ce103561d03fbedef8" },
|
||||
"playground": { "branch": "master", "commit": "c481c660fa903a0e295902b1765ecfbd6e76a556" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "9a0d3bf7b832818c042aaf30f692b081ddd58bd9" },
|
||||
"nvim-toggleterm.lua": { "branch": "main", "commit": "a5638b2206c3930a16a24e5c184dddd572f8cd34" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "c38646edf2bdfac157ca619697ecad9ea87fd469" },
|
||||
"nvim-treesitter-context": { "branch": "master", "commit": "895ec44f5c89bc67ba5440aef3d1f2efa3d59a41" },
|
||||
"nvim-treesitter-textsubjects": { "branch": "master", "commit": "b913508f503527ff540f7fe2dcf1bf1d1f259887" },
|
||||
"nvim-ts-context-commentstring": { "branch": "main", "commit": "729d83ecb990dc2b30272833c213cc6d49ed5214" },
|
||||
"nvim-ts-rainbow2": { "branch": "master", "commit": "b2d1f4f51b1bd20de419ffb6f5d0876c4f20d9db" },
|
||||
"otter.nvim": { "branch": "main", "commit": "8b46caf113918c26a9247031d6482709078ec907" },
|
||||
"playground": { "branch": "master", "commit": "4044b53c4d4fcd7a78eae20b8627f78ce7dc6f56" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "253d34830709d690f013daf2853a9d21ad7accab" },
|
||||
"popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" },
|
||||
"quarto-nvim": { "branch": "main", "commit": "a30db854054973ab8f140adf3e6b565bf2febf0f" },
|
||||
"quarto-nvim": { "branch": "main", "commit": "b44f8772686241e563c7d0f200748fd71766b64e" },
|
||||
"significant.nvim": { "branch": "main", "commit": "5450e9d5917dc6aa9afb0fcbe32355799b8303fb" },
|
||||
"spellsitter.nvim": { "branch": "master", "commit": "4af8640d9d706447e78c13150ef7475ea2c16b30" },
|
||||
"sqlite.lua": { "branch": "master", "commit": "93ff5824682ecc874200e338fd8ca9ccd08508f8" },
|
||||
"symbols-outline.nvim": { "branch": "master", "commit": "512791925d57a61c545bc303356e8a8f7869763c" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "580b6c48651cabb63455e97d7e131ed557b8c7e2" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "203bf5609137600d73e8ed82703d6b0e320a5f36" },
|
||||
"twilight.nvim": { "branch": "main", "commit": "9410252bed96887ca5a86bf16435a3a51a0e6ce5" },
|
||||
"vifm.vim": { "branch": "master", "commit": "199af91d6b1b4997450da2098e7e756627c6583b" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "c1a2af0af69e80e14e6b226d3957a064cd080805" },
|
||||
"twilight.nvim": { "branch": "main", "commit": "8bb7fa7b918baab1ca81b977102ddb54afa63512" },
|
||||
"vifm.vim": { "branch": "master", "commit": "6898b7fcbc36324c127ba42cabe488ab15c785f4" },
|
||||
"vim-criticmarkup": { "branch": "master", "commit": "d15dc134eb177a170c79f6377f81eb02a9d20b02" },
|
||||
"vim-easy-align": { "branch": "master", "commit": "12dd6316974f71ce333e360c0260b4e1f81169c3" },
|
||||
"vim-easy-align": { "branch": "master", "commit": "0db4ea6132110631ec678a99a82aa49a0686ae65" },
|
||||
"vim-exchange": { "branch": "master", "commit": "784d63083ad7d613aa96f00021cd0dfb126a781a" },
|
||||
"vim-numbertoggle": { "branch": "main", "commit": "075b7478777e694fbac330ee34a74590dad0fee1" },
|
||||
"vim-oscyank": { "branch": "main", "commit": "e6298736a7835bcb365dd45a8e8bfe86d935c1f8" },
|
||||
"vim-pandoc": { "branch": "master", "commit": "9f406d964ca70d959b7867f1b5cee3d4884d4d3c" },
|
||||
"vim-numbertoggle": { "branch": "main", "commit": "df9b1fe616507340718716204ba7f434125bdf7a" },
|
||||
"vim-oscyank": { "branch": "main", "commit": "ffe827a27dae98aa826e2295336c650c9a434da0" },
|
||||
"vim-pandoc-syntax": { "branch": "master", "commit": "4268535e1d33117a680a91160d845cd3833dfe28" },
|
||||
"vim-spellsync": { "branch": "master", "commit": "27e103f2d283a1f6e24cc99dbdcd624713aff277" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "684e96c5e8477f1ee9b3f2e9a12d802fd12c5531" },
|
||||
"zen-mode.nvim": { "branch": "main", "commit": "3c92f503823088862ca2a7809d1c7edc90fb92fa" },
|
||||
"zettelkasten.nvim": { "branch": "main", "commit": "0e77624689b470410f5355b613d45219c9350264" }
|
||||
"vim-spellsync": { "branch": "master", "commit": "3d6dd50de9c4d953cc16638112a6ae196df41463" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "2a0c2d80c0a60f041afb1b789cfedbd510e2b2b6" },
|
||||
"wrapping.nvim": { "branch": "master", "commit": "a4013c377e2ffa3be00fb67791d3605ae3115acb" },
|
||||
"zen-mode.nvim": { "branch": "main", "commit": "4bd28fb3a44317c6258cebc7d92243d4b11dfe2c" },
|
||||
"zettelkasten.nvim": { "branch": "main", "commit": "0e77624689b470410f5355b613d45219c9350264" },
|
||||
"zk-nvim": { "branch": "main", "commit": "0413c52500cd0133b0cd8e7e7d43084855ac1760" }
|
||||
}
|
33
nvim/.config/nvim/lua/autocmds.lua
Normal file
33
nvim/.config/nvim/lua/autocmds.lua
Normal file
|
@ -0,0 +1,33 @@
|
|||
-- Highlight whatever is being yanked
|
||||
vim.api.nvim_create_autocmd({ "TextYankPost" }, {
|
||||
command = 'silent! lua require"vim.highlight".on_yank{timeout=500}',
|
||||
desc = "Highlight yanked text whenevery yanking something",
|
||||
group = vim.api.nvim_create_augroup('highlightyanks', { clear = true })
|
||||
})
|
||||
|
||||
-- Special setting for editing gopass files - make sure nothing leaks outside the directories it is supposed to
|
||||
vim.api.nvim_create_autocmd({ "BufNewFile", "BufRead" }, {
|
||||
pattern = {
|
||||
"/dev/shm/gopass.*", "/dev/shm/pass.?*/?*.txt",
|
||||
"$TMPDIR/pass.?*/?*.txt", "/tmp/pass.?*/?*.txt"
|
||||
},
|
||||
command = 'setlocal noswapfile nobackup noundofile nowritebackup viminfo=',
|
||||
desc = "Don't leak any information when editing potential password files",
|
||||
group = vim.api.nvim_create_augroup('passnoleak', { clear = true })
|
||||
})
|
||||
|
||||
-- fixing neovim opening up at same moment as alacritty (see https://github.com/neovim/neovim/issues/11330)
|
||||
vim.api.nvim_create_autocmd({ "VimEnter" }, {
|
||||
callback = function()
|
||||
local pid, WINCH = vim.fn.getpid(), vim.loop.constants.SIGWINCH
|
||||
vim.defer_fn(function() vim.loop.kill(pid, WINCH) end, 20)
|
||||
end,
|
||||
desc = "Fix neovim sizing issues if opening same time as alacritty",
|
||||
group = vim.api.nvim_create_augroup('alacritty_fixsize', { clear = true })
|
||||
})
|
||||
|
||||
-- remove line numbers from terminal buffers
|
||||
vim.api.nvim_create_autocmd({ "TermOpen" }, {
|
||||
pattern = '*',
|
||||
command = 'setlocal nonumber norelativenumber'
|
||||
})
|
|
@ -1,27 +0,0 @@
|
|||
-- augroup utility function
|
||||
--
|
||||
-- Let's you create and use autogroups through lua
|
||||
-- which (as of now) is not possible through official nvim api
|
||||
--
|
||||
-- Cribbed from the very helpful https://icyphox.sh/blog/nvim-lua - Thank you!
|
||||
--
|
||||
-- Example usage settings.lua
|
||||
-- local cmd = vim.cmd
|
||||
-- local u = require('utils')
|
||||
-- u.create_augroup({
|
||||
-- { 'BufRead,BufNewFile', '/tmp/nail-*', 'setlocal', 'ft=mail' },
|
||||
-- { 'BufRead,BufNewFile', '*s-nail-*', 'setlocal', 'ft=mail' },
|
||||
-- }, 'ftmail')
|
||||
-- cmd('au BufNewFile,BufRead * if &ft == "" | set ft=text | endif')
|
||||
|
||||
local cmd = vim.cmd
|
||||
|
||||
|
||||
return function(cmds, groupname)
|
||||
cmd('augroup ' .. groupname)
|
||||
cmd('autocmd!')
|
||||
for _, autocmd in ipairs(cmds) do
|
||||
cmd('autocmd ' .. table.concat(autocmd, ' '))
|
||||
end
|
||||
cmd('augroup END')
|
||||
end
|
|
@ -1,16 +1,15 @@
|
|||
local b = require('base16')
|
||||
|
||||
-- italic comments if supported
|
||||
local set_hl = require("helpers.highlight")
|
||||
set_hl("Comment", {gui = "italic"})
|
||||
vim.api.nvim_set_var('gruvbox_italic', 1)
|
||||
vim.api.nvim_set_var('one_allow_italics', 1)
|
||||
vim.api.nvim_set_var('pencil_terminal_italics', 1)
|
||||
|
||||
function B16theme(theme)
|
||||
local base16scheme = b.themes[theme]
|
||||
b(base16scheme, true)
|
||||
local colorsfile = vim.fn.stdpath('state') .. '/colorscheme.lua'
|
||||
local function source_colors()
|
||||
if vim.fn.filereadable(colorsfile) == 1 then
|
||||
vim.cmd("source " .. colorsfile)
|
||||
end
|
||||
end
|
||||
|
||||
-- set the default colorscheme
|
||||
B16theme('eighties')
|
||||
-- set on startup
|
||||
source_colors()
|
||||
|
||||
-- continuously watch colors file for changes
|
||||
local fwatch = require('fwatch')
|
||||
fwatch.watch(colorsfile, {
|
||||
on_event = vim.schedule_wrap(function() source_colors() end)
|
||||
})
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
local map = vim.keymap.set
|
||||
local prefix = require('which-key').register
|
||||
|
||||
-- The general ideas behind these mappings:
|
||||
--
|
||||
|
@ -50,6 +51,11 @@ map('n', '<Tab>', '%')
|
|||
map('i', '<C-u>', '<esc>gUiw`]a')
|
||||
map('i', '<C-y>', '<esc>guiw`]a')
|
||||
|
||||
-- Add undo break-points at punctuations for plaintext editing
|
||||
for _, char in pairs({ ",", ".", ";", "?", "!" }) do
|
||||
map("i", char, string.format("%s<c-g>u", char))
|
||||
end
|
||||
|
||||
-- yank current filename/filepath to f buffer
|
||||
map('n', 'yp', ':let @p = expand("%")<Cr>', { desc = 'yank filename' })
|
||||
map('n', 'yP', ':let @p = expand("%:p")<Cr>', { desc = 'yank filepath' })
|
||||
|
@ -114,49 +120,55 @@ map('n', '<leader>e', ':Vifm<cr>', { desc = 'browse files' })
|
|||
-- open current file tree with current file directory
|
||||
map('n', '<leader>E', ':Vifm getcwd()<cr>', { desc = 'browse project' })
|
||||
|
||||
-- set 'v'im-related options
|
||||
prefix({ ['<leader>v'] = { name = "+vim" } })
|
||||
map('n', '<leader>vc', ':Vifm ' .. vim.fn.stdpath('config') .. '/lua<cr>',
|
||||
{ desc = 'open config' })
|
||||
map('n', '<leader>vh', ":lua require 'telescope.builtin'.help_tags()<cr>",
|
||||
{ desc = 'help tags' })
|
||||
map('n', '<leader>vH', ":lua require 'telescope.builtin'.man_pages()<cr>",
|
||||
{ desc = 'man pages' })
|
||||
map('n', '<leader>vC',
|
||||
":lua require 'telescope.builtin'.colorscheme(require 'telescope.themes'.get_ivy())<cr>",
|
||||
{ desc = 'colorschemes' })
|
||||
map('n', '<leader>vl', ":Lazy<cr>", { desc = 'Lazy' })
|
||||
map('n', '<leader>vm', ":Mason<cr>", { desc = 'Mason' })
|
||||
-- Set vim to distraction free prose mode with F11
|
||||
map('n', '<leader>vz', ':ZenMode<cr>', { silent = true })
|
||||
|
||||
|
||||
-- PLUGIN: Telescope GLOBAL FUZZY FINDING
|
||||
-- buffers and files in current workdir
|
||||
map('n', '<leader>s',
|
||||
prefix({ ['<leader>f'] = { name = '+find' } })
|
||||
map('n', '<leader>fb',
|
||||
":lua require 'telescope.builtin'.buffers(require 'telescope.themes'.get_ivy())<cr>",
|
||||
{ desc = 'list buffers' })
|
||||
-- most recently used / MRU, bound to S since it is essentially a larger
|
||||
-- go-back intention than just buffers
|
||||
map('n', '<leader>S',
|
||||
map('n', '<leader>fo',
|
||||
":lua require 'telescope.builtin'.oldfiles(require 'telescope.themes'.get_ivy())<cr>",
|
||||
{ desc = 'list old files' })
|
||||
-- fuzzy find files in cwd
|
||||
map('n', '<leader>f', ":lua require 'telescope.builtin'.find_files()<cr>",
|
||||
map('n', '<leader>ff', ":lua require 'telescope.builtin'.find_files()<cr>",
|
||||
{ desc = 'find files' })
|
||||
-- fuzzy find hidden files in cwd
|
||||
map('n', '<leader><c-f>',
|
||||
map('n', '<leader>fh',
|
||||
":lua require 'telescope.builtin'.find_files({hidden=true})<cr>",
|
||||
{ desc = 'find hidden files' })
|
||||
-- general full-text search in cwd with rg
|
||||
map('n', '<leader>F', ":lua require 'telescope.builtin'.live_grep()<cr>",
|
||||
map('n', '<leader>fF', ":lua require 'telescope.builtin'.live_grep()<cr>",
|
||||
{ desc = 'grep search' })
|
||||
|
||||
-- git status
|
||||
map('n', '<leader>gs', ":lua require 'telescope.builtin'.git_status()<cr>",
|
||||
map('n', '<leader>fg', ":lua require 'telescope.builtin'.git_status()<cr>",
|
||||
{ desc = 'git status' })
|
||||
-- git buffercommits
|
||||
map('n', '<leader>gb', ":lua require 'telescope.builtin'.git_bcommits()<cr>",
|
||||
map('n', '<leader>fc', ":lua require 'telescope.builtin'.git_bcommits()<cr>",
|
||||
{ desc = 'git buffer commits' })
|
||||
-- git commitlog
|
||||
map('n', '<leader>gl', ":lua require 'telescope.builtin'.git_commits()<cr>",
|
||||
map('n', '<leader>fl', ":lua require 'telescope.builtin'.git_commits()<cr>",
|
||||
{ desc = 'git commit log' })
|
||||
|
||||
-- helptags
|
||||
map('n', '<leader><F1>', ":lua require 'telescope.builtin'.help_tags()<cr>",
|
||||
{ desc = 'help tags' })
|
||||
-- manpages
|
||||
map('n', '<leader><F2>', ":lua require 'telescope.builtin'.man_pages()<cr>",
|
||||
{ desc = 'man pages' })
|
||||
|
||||
-- colorschemes
|
||||
map('n', '<leader><F8>',
|
||||
":lua require 'telescope.builtin'.colorscheme(require 'telescope.themes'.get_ivy())<cr>",
|
||||
{ desc = 'colorschemes' })
|
||||
|
||||
-- spell suggestions
|
||||
map('n', 'z=',
|
||||
":lua require 'telescope.builtin'.spell_suggest(require 'telescope.themes'.get_ivy())<cr>")
|
||||
|
@ -176,12 +188,10 @@ map('n', '<localleader>mp', '<Plug>MarkdownPreviewToggle',
|
|||
map('n', '<localleader>f', ':FormatLock<cr>')
|
||||
map('n', '<localleader>F', ':FormatWriteLock<cr>')
|
||||
|
||||
-- Enter distraction free prose mode with F11
|
||||
map('n', '<F11>', ':ZenMode<cr>', { silent = true })
|
||||
|
||||
-- SPELL CHECKING
|
||||
-- Move to the prev/next spelling error with [S ]S
|
||||
-- Move to the prev/next spelling error or suggestion with [s ]s
|
||||
prefix({ ['<localleader>Z'] = { name = '+Spelling' } })
|
||||
map('n', '<localleader>ZZ', ':setlocal spell! spelllang=en_us,de_de<cr>',
|
||||
{ desc = 'Toggle spellcheck' })
|
||||
map('n', '<localleader>ZE', ':setlocal spell! spelllang=en_us<cr>',
|
||||
|
@ -193,7 +203,14 @@ map('i', '<c-s>', '<C-G>u<Esc>[s1z=`]a<C-G>u')
|
|||
map('n', '<localleader>s', 'ms[s1z=`s', { desc = 'Fix last spell error' })
|
||||
|
||||
-- PLUGIN: mini.nvim
|
||||
map('n', '<leader>m', ':lua MiniMap.toggle()<cr>', { silent = true })
|
||||
prefix({ ['<leader>s'] = { name = '+show' } })
|
||||
map('n', '<leader>sm', ':lua MiniMap.toggle()<cr>',
|
||||
{ silent = true, desc = 'toggle minimap' })
|
||||
map('n', '<leader>ss', ":lua MiniStarter.open()<cr>", { desc = 'show startpage' })
|
||||
|
||||
-- PLUGIN: symbols-outline.nvim
|
||||
map('n', '<leader>so', '<cmd>SymbolsOutline<cr>',
|
||||
{ silent = true, desc = 'toggle symbol outline' })
|
||||
|
||||
-- PLUGIN: easy-align
|
||||
-- Start interactive EasyAlign in visual mode (e.g. vipga)
|
||||
|
@ -201,17 +218,6 @@ map('x', 'ga', '<Plug>(EasyAlign)')
|
|||
-- Start interactive EasyAlign for a motion/text object (e.g. gaip)
|
||||
map('n', 'ga', '<Plug>(EasyAlign)')
|
||||
|
||||
-- PLUGIN: vnsip
|
||||
-- jump around in snippets
|
||||
map('i', '<Tab>', [[vsnip#jumpable(1) ? '<Plug>(vsnip-jump-next)' : '<Tab>']],
|
||||
{ expr = true })
|
||||
map('i', '<S-Tab>',
|
||||
[[vsnip#jumpable(-1) ? '<Plug>(vsnip-jump-next)' : '<S-Tab>']],
|
||||
{ expr = true })
|
||||
|
||||
-- PLUGIN: symbols-outline.nvim
|
||||
map('n', '<leader>o', '<cmd>SymbolsOutline<cr>', { silent = true })
|
||||
|
||||
-- trim trailing whitespaces with mini.nvim trailspace
|
||||
map("n", "<localleader>w", function() require("mini.trailspace").trim() end,
|
||||
{ noremap = true })
|
||||
|
@ -227,35 +233,10 @@ map("v", "g<C-x>", 'g<Plug>(dial-increment)')
|
|||
-- PLUGIN: zettelkasten.nvim
|
||||
map('n', '<cr>', [[:silent lua require 'zettelkasten'.link_follow()<cr>]])
|
||||
map('v', '<cr>', [[:lua require 'zettelkasten'.link_follow(true)<cr>]])
|
||||
map('n', '<leader>ww', [[:lua require 'zettelkasten'.index_open()<cr> ]])
|
||||
prefix({ ['<leader>w'] = { name = '+wiki' } })
|
||||
map('n', '<leader>ww', [[:lua require 'zettelkasten'.index_open()<cr> ]],
|
||||
{ desc = "open wiki" })
|
||||
|
||||
-- PLUGIN: toggleterm.nvim
|
||||
-- create a lazygit window, set up in toggleterm settings
|
||||
map('n', '<leader>G', ':Lazygit<cr>')
|
||||
|
||||
-- PLUGIN: magma-nvim
|
||||
-- Operate jupyter notebooks from within vim
|
||||
map('n', '<localleader>mm', ':MagmaEvaluateLine<cr>', { silent = true })
|
||||
map('n', '<localleader>M', '?^```{<cr>jV/```<cr>k:<C-u>MagmaEvaluateVisual<cr>',
|
||||
{ silent = true, desc = 'Evaluate current quarto cell' })
|
||||
map('x', '<localleader>m', ':<C-u>MagmaEvaluateVisual<cr>', { silent = true })
|
||||
map('n', '<localleader>m', "nvim_exec('MagmaEvaluateOperator', v:true)",
|
||||
{ expr = true, silent = true })
|
||||
map('n', '<localleader>mr', ':MagmaReevaluateCell<cr>', { silent = true })
|
||||
map('n', '<localleader>ma', ':MagmaShowOutput<cr>', { silent = true })
|
||||
map('n', '<localleader>mq', ':noautocmd :MagmaEnterOutput<cr>',
|
||||
{ silent = true, desc = 'MagmaEnterOutput' })
|
||||
map('n', '<localleader>md', ':MagmaDelete<cr>', { silent = true })
|
||||
map('n', '<localleader>ms', ':MagmaInterrupt<cr>')
|
||||
map('n', '<localleader>mI', ':MagmaInit ')
|
||||
map('n', '<localleader>mD', ':MagmaDeinit<cr>')
|
||||
map('n', '<localleader>mR', ':MagmaRestart<cr>')
|
||||
|
||||
-- jump to beginning of previous/ next cell code
|
||||
map('n', ']c', '/^```{<cr>}:nohl<cr>', { desc = 'Next quarto cell' })
|
||||
map('n', '[c', '?^```<cr>n}:nohl<cr>', { desc = 'Previous quarto cell' })
|
||||
-- insert cell header above/below
|
||||
map('n', '<localleader>mo', 'o```{python}<cr><cr>```<esc>k',
|
||||
{ desc = 'Insert quarto cell below' })
|
||||
map('n', '<localleader>mO', 'O```{python}<cr><cr>```<esc>k',
|
||||
{ desc = 'Insert quarto cell above' })
|
||||
|
|
|
@ -1,40 +0,0 @@
|
|||
local lsp = require("lsp-zero")
|
||||
lsp.preset("recommended")
|
||||
lsp.on_attach(function(client, bufnr)
|
||||
require("lsp-format").on_attach(client, bufnr)
|
||||
end)
|
||||
lsp.nvim_workspace()
|
||||
lsp.setup_nvim_cmp({
|
||||
sources = {
|
||||
{ name = 'path' }, { name = 'nvim_lsp', keyword_length = 2 },
|
||||
{ name = 'buffer', keyword_length = 3 },
|
||||
{ name = 'luasnip', keyword_length = 2 }, { name = 'tmux' },
|
||||
{ name = 'otter' }, { name = 'latex_symbols' }, { name = 'vCard' },
|
||||
{ name = 'nvim_lua' }, { name = 'buffer' }, { name = 'spell' }
|
||||
},
|
||||
documentation = {
|
||||
max_height = 50,
|
||||
max_width = 90,
|
||||
border = 'rounded',
|
||||
col_offset = 0,
|
||||
side_padding = 1,
|
||||
winhighlight = 'Normal:Normal,FloatBorder:Normal,CursorLine:Visual,Search:None',
|
||||
zindex = 1001
|
||||
}
|
||||
})
|
||||
lsp.setup()
|
||||
vim.diagnostic.config { virtual_text = true }
|
||||
|
||||
local cmp = require 'cmp'
|
||||
-- `/` cmdline setup.
|
||||
cmp.setup.cmdline('/', {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = { { name = 'buffer' } }
|
||||
})
|
||||
-- `:` cmdline setup.
|
||||
cmp.setup.cmdline(':', {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = cmp.config.sources({ { name = 'path' } }, {
|
||||
{ name = 'cmdline', option = { ignore_cmds = { 'Man', '!' } } }
|
||||
})
|
||||
})
|
|
@ -1,3 +1,96 @@
|
|||
-- The arch package defaults to the following directory
|
||||
require'navigator'.setup()
|
||||
require"lsp_signature".setup()
|
||||
local lsp = require("lsp-zero")
|
||||
|
||||
vim.diagnostic.config { virtual_text = true }
|
||||
|
||||
lsp.preset({
|
||||
name = "recommended",
|
||||
set_lsp_keymaps = false,
|
||||
suggest_lsp_servers = true
|
||||
})
|
||||
lsp.on_attach(function(client, bufnr)
|
||||
require("lsp-format").on_attach(client, 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', '[e',
|
||||
'<cmd>lua vim.diagnostic.goto_prev({severity = vim.diagnostic.severity.ERROR})<cr>',
|
||||
{ buffer = bufnr, desc = 'Previous error' })
|
||||
map('n', ']e',
|
||||
'<cmd>lua vim.diagnostic.goto_next({severity = vim.diagnostic.severity.ERROR})<cr>',
|
||||
{ buffer = bufnr, desc = 'Next error' })
|
||||
|
||||
local prefix = require('which-key').register
|
||||
prefix({ ['<localleader>l'] = { name = "+lsp" } })
|
||||
map('n', '<localleader>li', '<cmd>LspInfo<cr>',
|
||||
{ buffer = bufnr, desc = 'Lsp Info' })
|
||||
map('n', '<localleader>ld', '<cmd>lua vim.diagnostic.open_float()<cr>',
|
||||
{ buffer = bufnr, desc = 'Line diagnostics' })
|
||||
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' })
|
||||
map('n', '<localleader>lr', '<cmd>lua vim.lsp.buf.references()<cr>',
|
||||
{ buffer = bufnr, desc = 'References' })
|
||||
if client.server_capabilities.document_formatting then
|
||||
map('n', '<localleader>lf', "<cmd>lua vim.lsp.buf.formatting()<CR>",
|
||||
{ buffer = bufnr, desc = 'Format document' })
|
||||
end
|
||||
|
||||
map('n', 'K', '<cmd>lua vim.lsp.buf.hover()<cr>',
|
||||
{ buffer = bufnr, desc = 'Hover definition' })
|
||||
map('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<cr>',
|
||||
{ buffer = bufnr, desc = 'Definition' })
|
||||
map('n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<cr>',
|
||||
{ buffer = bufnr, desc = 'Declaration' })
|
||||
map('n', 'gs', '<cmd>lua vim.lsp.buf.signature_help()<cr>',
|
||||
{ buffer = bufnr, desc = 'Signature help' })
|
||||
map('n', 'gI', '<cmd>lua vim.lsp.buf.implementation()<cr>',
|
||||
{ buffer = bufnr, desc = 'Implementation' })
|
||||
map('n', 'gt', '<cmd>lua vim.lsp.buf.type_definition()<cr>',
|
||||
{ buffer = bufnr, desc = 'Type definition' })
|
||||
end)
|
||||
lsp.nvim_workspace()
|
||||
-- ensure python virtualenv is determined automatically on lsp start
|
||||
lsp.configure("pyright", {
|
||||
on_attach = function(client, _)
|
||||
local python_path, msg = require('util.pyenv').get_path(client.config
|
||||
.root_dir)
|
||||
vim.notify(string.format('%s\n%s', msg, python_path))
|
||||
client.config.settings.python.pythonPath = python_path
|
||||
end
|
||||
})
|
||||
lsp.setup_nvim_cmp({
|
||||
sources = {
|
||||
{ name = 'path' }, { name = 'nvim_lsp', keyword_length = 2 },
|
||||
{ name = 'pandoc_references' }, { name = 'buffer', keyword_length = 3 },
|
||||
{ name = 'luasnip', keyword_length = 2 }, { name = 'tmux' },
|
||||
{ name = 'otter' }, { name = 'latex_symbols' }, { name = 'vCard' },
|
||||
{ name = 'nvim_lua' }, { name = 'buffer' }, { name = 'spell' }
|
||||
},
|
||||
documentation = {
|
||||
max_height = 50,
|
||||
max_width = 90,
|
||||
border = 'rounded',
|
||||
col_offset = 0,
|
||||
side_padding = 1,
|
||||
winhighlight = 'Normal:Normal,FloatBorder:Normal,CursorLine:Visual,Search:None',
|
||||
zindex = 1001
|
||||
}
|
||||
})
|
||||
lsp.setup()
|
||||
|
||||
local cmp = require 'cmp'
|
||||
-- `/` cmdline setup.
|
||||
cmp.setup.cmdline('/', {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = { { name = 'buffer' } }
|
||||
})
|
||||
-- `:` cmdline setup.
|
||||
cmp.setup.cmdline(':', {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = cmp.config.sources({ { name = 'path' } }, {
|
||||
{ name = 'cmdline', option = { ignore_cmds = { 'Man', '!' } } }
|
||||
})
|
||||
})
|
||||
|
|
|
@ -1,11 +1,17 @@
|
|||
require('mini.ai').setup()
|
||||
require('mini.comment').setup()
|
||||
require('mini.cursorword').setup({delay = 500})
|
||||
require('mini.comment').setup({
|
||||
hooks = {
|
||||
pre = function()
|
||||
require('ts_context_commentstring.internal').update_commentstring()
|
||||
end
|
||||
}
|
||||
})
|
||||
require('mini.cursorword').setup({ delay = 500 })
|
||||
require('mini.fuzzy').setup()
|
||||
require('mini.indentscope').setup({
|
||||
symbol = "│",
|
||||
draw = {animation = require('mini.indentscope').gen_animation('none')},
|
||||
options = {indent_at_cursor = false}
|
||||
draw = { animation = require('mini.indentscope').gen_animation.none() },
|
||||
options = { indent_at_cursor = false }
|
||||
})
|
||||
require('mini.map').setup()
|
||||
-- require('mini.move').setup() -- has not hit stable yet
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
require("neorg").setup {
|
||||
load = {
|
||||
["core.defaults"] = {},
|
||||
["core.norg.concealer"] = {},
|
||||
["core.norg.completion"] = { config = { engine = "nvim-cmp" } },
|
||||
["core.norg.qol.toc"] = {}
|
||||
}
|
||||
}
|
|
@ -1,14 +1,21 @@
|
|||
require'nvim-treesitter.configs'.setup {
|
||||
local rainbow = require('ts-rainbow')
|
||||
require 'nvim-treesitter.configs'.setup {
|
||||
-- one of "all", "maintained" (parsers with maintainers), or a list of languages
|
||||
ensure_installed = "all",
|
||||
highlight = {enable = true},
|
||||
incremental_selection = {enable = true},
|
||||
textobjects = {enable = true},
|
||||
indent = {enable = true},
|
||||
highlight = { enable = true },
|
||||
incremental_selection = { enable = true },
|
||||
textobjects = { enable = true },
|
||||
indent = { enable = true },
|
||||
|
||||
-- enable rainbow brackets, needs p00f/nvim-ts-rainbow
|
||||
rainbow = {enable = true},
|
||||
rainbow = {
|
||||
enable = true,
|
||||
strategy = { rainbow.strategy.global }
|
||||
},
|
||||
|
||||
-- for improved commentstrings, needs corresponding plugin
|
||||
context_commentstring = {enable = true}
|
||||
context_commentstring = {
|
||||
enable = true,
|
||||
enable_autocmd = false -- since we run it as a hook from the mini.comment plugin
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ local writing_ft = { "quarto", "pandoc", "markdown", "text", "tex" }
|
|||
return {
|
||||
-- vim plugs
|
||||
-- essential
|
||||
{ 'numToStr/Navigator.nvim', config = true }, -- allow seamless navigation between vim buffers and tmux/wezterm splits
|
||||
{ 'numToStr/Navigator.nvim', branch = "master", config = true }, -- allow seamless navigation between vim buffers and tmux/wezterm splits
|
||||
{ 'jeffkreeftmeijer/vim-numbertoggle', event = "BufEnter" }, -- toggles numbers to absolute for all buffers but the current which is relative
|
||||
{ 'ojroques/vim-oscyank', event = "VeryLazy" }, -- yank from *anywhere* (even ssh session) to clipboard, using :OSCYank
|
||||
{ 'ggandor/lightspeed.nvim', event = "VeryLazy" }, -- jump between letters with improved fFtT quicksearch, mimics sneak
|
||||
|
@ -11,9 +11,11 @@ return {
|
|||
{ 'vifm/vifm.vim' }, -- integrate file manager
|
||||
{
|
||||
'lewis6991/gitsigns.nvim', -- show vcs changes on left-hand gutter
|
||||
config = true,
|
||||
opts = { numhl = true, signcolumn = false },
|
||||
event = "BufRead"
|
||||
}, {
|
||||
},
|
||||
{ 'RRethy/nvim-base16', event = "BufWinEnter",
|
||||
dependencies = { 'rktjmp/fwatch.nvim' } }, {
|
||||
'norcalli/nvim-colorizer.lua', -- color hex, named colors in the correct preview scheme
|
||||
config = true,
|
||||
event = "VeryLazy"
|
||||
|
@ -22,7 +24,7 @@ return {
|
|||
config = function() require('plug._format') end,
|
||||
event = "VeryLazy"
|
||||
}, -- editing
|
||||
{ 'kylechui/nvim-surround', version = '*', config = true, event = "VeryLazy" }, -- surround things with other things using ys/cs/ds
|
||||
{ 'kylechui/nvim-surround', version = '*', config = true, event = "VeryLazy" }, -- surround things with other things using ys/cs/ds
|
||||
{
|
||||
'monaqa/dial.nvim', -- extend the ^a / ^x possibilities to dates, hex, alphabets, markdown headers
|
||||
config = function()
|
||||
|
@ -59,19 +61,21 @@ return {
|
|||
}, {
|
||||
'junegunn/vim-easy-align', -- Align tables and other alignable things
|
||||
event = "VeryLazy"
|
||||
}, -- colorschemes
|
||||
{ 'norcalli/nvim-base16.lua' }, --
|
||||
-- statusline
|
||||
}, -- statusline
|
||||
{
|
||||
'nvim-lualine/lualine.nvim',
|
||||
requires = { 'kyazdani42/nvim-web-devicons', opt = true },
|
||||
config = function() require('plug._lualine') end
|
||||
}, -- writing
|
||||
{ 'vim-pandoc/vim-pandoc-syntax', ft = writing_ft },
|
||||
{ 'vim-pandoc/vim-pandoc', ft = writing_ft },
|
||||
{ 'vim-pandoc/vim-criticmarkup', ft = writing_ft }, {
|
||||
{ 'vim-pandoc/vim-criticmarkup', ft = writing_ft }, {
|
||||
'mickael-menu/zk-nvim',
|
||||
config = function() require('zk').setup({ picker = "telescope" }) end
|
||||
}, { 'andrewferrier/wrapping.nvim', config = true }, {
|
||||
'quarto-dev/quarto-nvim',
|
||||
dependencies = { 'jmbuhr/otter.nvim', 'neovim/nvim-lspconfig' },
|
||||
dependencies = {
|
||||
'jmbuhr/otter.nvim', 'neovim/nvim-lspconfig',
|
||||
'vim-pandoc/vim-pandoc-syntax'
|
||||
},
|
||||
config = function()
|
||||
require 'quarto'.setup {
|
||||
lspFeatures = {
|
||||
|
@ -82,7 +86,19 @@ return {
|
|||
}
|
||||
}
|
||||
end,
|
||||
ft = writing_ft
|
||||
ft = "quarto"
|
||||
}, {
|
||||
"lkhphuc/jupyter-kernel.nvim",
|
||||
config = true,
|
||||
cmd = "JupyterAttach",
|
||||
build = ":UpdateRemotePlugins",
|
||||
keys = {
|
||||
{
|
||||
"<localleader>ck",
|
||||
"<Cmd>JupyterInspect<CR>",
|
||||
desc = "Inspect object in kernel"
|
||||
}
|
||||
}
|
||||
}, { 'micarmst/vim-spellsync', event = "VeryLazy" }, -- personal dict improvements for git sync
|
||||
{ 'folke/zen-mode.nvim', config = true, event = "VeryLazy" }, -- provide distraction free writing
|
||||
{ 'folke/twilight.nvim', event = "VeryLazy" }, -- provide even distraction free-er writing (lowlight paragraphs)
|
||||
|
@ -110,31 +126,40 @@ return {
|
|||
config = function() require('plug._mini') end
|
||||
}, {
|
||||
"akinsho/nvim-toggleterm.lua", -- simpler, programmable and multiple terminal toggling for nvim
|
||||
config = function() require('plug._toggleterm') end,
|
||||
event = "BufWinEnter"
|
||||
config = function() require('plug._toggleterm') end
|
||||
},
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
config = function() require("which-key").setup {} end
|
||||
}, {
|
||||
"nvim-neorg/neorg",
|
||||
config = function() require("plug._neorg") end,
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
version = "*",
|
||||
ft = "norg"
|
||||
}, -- extensive organization plugin mimicking orgmode
|
||||
-- fuzzy matching
|
||||
}, -- fuzzy matching
|
||||
{ "nvim-telescope/telescope-fzf-native.nvim", build = 'make' }, {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
dependencies = { "nvim-lua/popup.nvim", "nvim-lua/plenary.nvim" },
|
||||
config = function() require('plug._telescope') end
|
||||
}, {
|
||||
"dense-analysis/neural",
|
||||
dependencies = { "MunifTanjim/nui.nvim", "elpiloto/significant.nvim" },
|
||||
config = function()
|
||||
require('neural').setup({
|
||||
source = { openai = { api_key = vim.env.OPENAI_API_KEY } }
|
||||
})
|
||||
end
|
||||
}, -- treesitter
|
||||
{
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
build = ':TSUpdate',
|
||||
config = function() require('plug._treesitter') end
|
||||
}, { 'nvim-treesitter/playground', cmd = "TSPlaygroundToggle" }, -- interactively view and query the treesitter tree
|
||||
{ 'romgrk/nvim-treesitter-context', event = "BufReadPre", config = true }, -- show current cursor context at top of buffer
|
||||
config = function() require('plug._treesitter') end,
|
||||
event = "BufReadPre",
|
||||
-- rainbow brackets using treesitter
|
||||
-- show current cursor context at top of buffer
|
||||
-- improves commenting plugin above by using ts
|
||||
dependencies = {
|
||||
'https://gitlab.com/HiPhish/nvim-ts-rainbow2.git',
|
||||
{ 'romgrk/nvim-treesitter-context', config = true },
|
||||
'JoosepAlviste/nvim-ts-context-commentstring'
|
||||
}
|
||||
},
|
||||
{ 'nvim-treesitter/playground', cmd = "TSPlaygroundToggle" }, -- interactively view and query the treesitter tree
|
||||
{
|
||||
'RRethy/nvim-treesitter-textsubjects', -- allows using . and ; to target treesitter branches
|
||||
config = function()
|
||||
|
@ -149,47 +174,54 @@ return {
|
|||
}
|
||||
end,
|
||||
event = "BufReadPre"
|
||||
}, { 'p00f/nvim-ts-rainbow', event = "BufReadPre" }, -- rainbow brackets using treesitter
|
||||
{ 'JoosepAlviste/nvim-ts-context-commentstring', event = "BufReadPre" }, -- improves commenting plugin above by using ts
|
||||
{
|
||||
'lewis6991/spellsitter.nvim', -- uses treesitter to highlight spelling errors
|
||||
config = function() require('spellsitter').setup() end,
|
||||
event = "BufReadPre"
|
||||
}, -- lsp
|
||||
}, {
|
||||
'lewis6991/spellsitter.nvim', -- uses treesitter to highlight spelling errors
|
||||
config = function() require('spellsitter').setup() end,
|
||||
event = "BufReadPre"
|
||||
}, -- lsp
|
||||
{
|
||||
"VonHeikemen/lsp-zero.nvim",
|
||||
dependencies = {
|
||||
"neovim/nvim-lspconfig", "williamboman/mason.nvim",
|
||||
"williamboman/mason-lspconfig.nvim", "hrsh7th/nvim-cmp",
|
||||
"hrsh7th/cmp-buffer", "hrsh7th/cmp-path",
|
||||
"saadparwaiz1/cmp_luasnip", "hrsh7th/cmp-nvim-lsp",
|
||||
"hrsh7th/cmp-nvim-lua", "L3MON4D3/LuaSnip",
|
||||
"rafamadriz/friendly-snippets", "andersevenrud/cmp-tmux",
|
||||
"hrsh7th/cmp-nvim-lsp", "kdheepak/cmp-latex-symbols",
|
||||
"ray-x/cmp-treesitter", "f3fora/cmp-spell", "hrsh7th/cmp-cmdline",
|
||||
"cbarrete/completion-vcard", {
|
||||
'aspeddro/cmp-pandoc.nvim',
|
||||
dependencies = { 'nvim-lua/plenary.nvim', 'jbyuki/nabla.nvim' },
|
||||
event = "InsertEnter"
|
||||
}, { "lukas-reineke/lsp-format.nvim", config = true }
|
||||
{ "neovim/nvim-lspconfig", branch = "master" },
|
||||
"williamboman/mason.nvim", "williamboman/mason-lspconfig.nvim", {
|
||||
"hrsh7th/nvim-cmp",
|
||||
branch = "main",
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-buffer", "hrsh7th/cmp-path",
|
||||
"saadparwaiz1/cmp_luasnip", "hrsh7th/cmp-nvim-lsp",
|
||||
"hrsh7th/cmp-nvim-lua", "andersevenrud/cmp-tmux",
|
||||
"hrsh7th/cmp-nvim-lsp", "kdheepak/cmp-latex-symbols",
|
||||
"ray-x/cmp-treesitter", "f3fora/cmp-spell",
|
||||
"hrsh7th/cmp-cmdline", "cbarrete/completion-vcard",
|
||||
"jc-doyle/cmp-pandoc-references",
|
||||
}
|
||||
}, "L3MON4D3/LuaSnip", "rafamadriz/friendly-snippets",
|
||||
{ "lukas-reineke/lsp-format.nvim", config = true }
|
||||
},
|
||||
config = function() require('plug._cmp') end
|
||||
}, { 'simrat39/symbols-outline.nvim', config = true, event = "VeryLazy" }, -- vista-like outline view for code
|
||||
{ 'ray-x/lsp_signature.nvim', event = "VeryLazy" },
|
||||
{ 'ray-x/guihua.lua', build = 'cd lua/fzy && make', event = "VeryLazy" }, {
|
||||
'ray-x/navigator.lua',
|
||||
config = function() require('plug._lsp') end,
|
||||
event = "VeryLazy"
|
||||
}, -- and completion
|
||||
{
|
||||
"jghauser/papis.nvim",
|
||||
after = { "telescope.nvim", "nvim-cmp" },
|
||||
dependencies = {
|
||||
"kkharji/sqlite.lua", "nvim-lua/plenary.nvim",
|
||||
"MunifTanjim/nui.nvim", "nvim-treesitter/nvim-treesitter"
|
||||
},
|
||||
ft = writing_ft,
|
||||
rocks = { "lyaml" },
|
||||
config = true
|
||||
}
|
||||
config = function() require('plug._lsp') end
|
||||
}, { 'simrat39/symbols-outline.nvim', config = true, event = "VeryLazy" }, -- vista-like outline view for code
|
||||
{ 'ray-x/lsp_signature.nvim', config = true }, -- UI improvements
|
||||
{ 'stevearc/dressing.nvim', config = true }, {
|
||||
'rcarriga/nvim-notify',
|
||||
config = function() vim.notify = require("notify") end
|
||||
}
|
||||
-- { -- REQUIRES custom `yay -S --asdeps lua51-lyaml invocation` AND is suuper slow
|
||||
-- "jghauser/papis.nvim",
|
||||
-- after = { "telescope.nvim", "nvim-cmp" },
|
||||
-- dependencies = {
|
||||
-- "kkharji/sqlite.lua", "nvim-lua/plenary.nvim",
|
||||
-- "MunifTanjim/nui.nvim", "nvim-treesitter/nvim-treesitter"
|
||||
-- },
|
||||
-- ft = writing_ft,
|
||||
-- rocks = { "lyaml" },
|
||||
-- config = function()
|
||||
-- require('papis').setup({
|
||||
-- papis_python = {
|
||||
-- dir = "/home/marty/documents/library/academia",
|
||||
-- info_name = "info.yaml",
|
||||
-- notes_name = [[notes.qmd]]
|
||||
-- }
|
||||
-- })
|
||||
-- end
|
||||
-- }
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
local default_builtins_disabled = {"netrw", "netrwPlugin"}
|
||||
local default_builtins_disabled = { "netrw", "netrwPlugin" }
|
||||
local disable_builtins = function(builtins)
|
||||
for _, plugin in pairs(builtins) do vim.g["loaded_" .. plugin] = 1 end
|
||||
end
|
||||
|
@ -12,23 +12,19 @@ local o = {
|
|||
shiftwidth = 4,
|
||||
softtabstop = 4,
|
||||
expandtab = true,
|
||||
|
||||
-- make jumplist behave more like browser, when jumping back
|
||||
-- and then adding a new jump discards all the previous
|
||||
-- 'future-jump' tree, making more sense for wiki-like movement
|
||||
jumpoptions = 'stack',
|
||||
|
||||
-- set cursor line highlighting, esp useful when using with bracket
|
||||
-- highlighting and you don't know which side of the brace the cursor is on
|
||||
cursorline = true,
|
||||
|
||||
-- shows linenumbers relative to the one you are on, for easy movement and
|
||||
-- dNUMBERd deletions
|
||||
number = true,
|
||||
relativenumber = true,
|
||||
-- puts the numbers into the signcolumn so when git/lsp show signs there's no jump
|
||||
signcolumn = 'number',
|
||||
|
||||
-- keeps an undofile next to files so that you can even undo if vim is closed
|
||||
-- in between
|
||||
undofile = true,
|
||||
|
@ -38,32 +34,30 @@ local o = {
|
|||
-- all lowercased
|
||||
ignorecase = true,
|
||||
smartcase = true,
|
||||
|
||||
-- shows previews of what substitute command will do (and a couple others)
|
||||
inccommand = 'split',
|
||||
|
||||
-- disables showing us the current mode in the command line since airline takes
|
||||
-- care of it
|
||||
showmode = false,
|
||||
-- turn off modeline, to ensure security observation
|
||||
modeline = false,
|
||||
|
||||
-- i feel foldlevel 2 is generally pretty usable, for headlines and similar
|
||||
-- set to use treesitter in treesitter config
|
||||
foldlevel = 2,
|
||||
conceallevel = 2,
|
||||
|
||||
-- enable mouse, doesn't bug me and might come in useful at some point
|
||||
mouse = 'a',
|
||||
|
||||
-- pump all clippings into the system clipboard
|
||||
clipboard = 'unnamedplus',
|
||||
|
||||
-- turn of automatic resizing of individual splits
|
||||
equalalways = false,
|
||||
|
||||
-- make sure there's always *some* context below cursor
|
||||
scrolloff = 4
|
||||
|
||||
scrolloff = 4,
|
||||
-- open new buffers bottomright
|
||||
splitright = true,
|
||||
splitbelow = true,
|
||||
-- remove command line if no command is currently present
|
||||
cmdheight = 0,
|
||||
}
|
||||
|
||||
for k, v in pairs(o) do
|
||||
|
|
45
nvim/.config/nvim/lua/util/pyenv.lua
Normal file
45
nvim/.config/nvim/lua/util/pyenv.lua
Normal file
|
@ -0,0 +1,45 @@
|
|||
local util = require('lspconfig/util')
|
||||
local path = util.path
|
||||
local T = {}
|
||||
local exepath = vim.fn.exepath
|
||||
|
||||
local path_sep = function()
|
||||
local is_win = vim.loop.os_uname().sysname:find('Windows')
|
||||
if is_win then
|
||||
return '\\'
|
||||
else
|
||||
return '/'
|
||||
end
|
||||
end
|
||||
|
||||
-- from https://github.com/ray-x/navigator.lua/issues/247#issue-1465308677
|
||||
T.get_path = function(workspace)
|
||||
-- Use activated virtualenv.
|
||||
if vim.env.VIRTUAL_ENV then
|
||||
return path.join(vim.env.VIRTUAL_ENV, 'bin', 'python'), 'virtual env'
|
||||
end
|
||||
|
||||
-- Find and use virtualenv in workspace directory.
|
||||
for _, pattern in ipairs({ '*', '.*' }) do
|
||||
local match = vim.fn.glob(path.join(workspace, pattern, 'pyvenv.cfg'))
|
||||
local sep = path_sep()
|
||||
local py = 'bin' .. sep .. 'python'
|
||||
if match ~= '' then
|
||||
match = string.gsub(match, 'pyvenv.cfg', py)
|
||||
return match, string.format('venv base folder: %s', match)
|
||||
end
|
||||
match = vim.fn.glob(path.join(workspace, pattern, 'poetry.lock'))
|
||||
if match ~= '' then
|
||||
local venv_base_folder = vim.fn.trim(vim.fn.system(
|
||||
'poetry env info -p'))
|
||||
return path.join(venv_base_folder, 'bin', 'python'),
|
||||
string.format('venv base folder: %s', venv_base_folder)
|
||||
end
|
||||
end
|
||||
|
||||
-- Fallback to system Python.
|
||||
return exepath('python3') or exepath('python') or 'python',
|
||||
'fallback to system python path'
|
||||
end
|
||||
|
||||
return T
|
|
@ -1,8 +0,0 @@
|
|||
" PLUGIN: notational-fzf-vim
|
||||
" Configure notational-fzf-vim
|
||||
if $WIKIROOT ==? ""
|
||||
let g:nv_search_paths = [ expand('~/documents/notes') ]
|
||||
else
|
||||
let g:nv_search_paths = [ $WIKIROOT ]
|
||||
endif
|
||||
let g:nv_wrap_preview_text=1
|
|
@ -1,34 +0,0 @@
|
|||
" PLUGIN: vim-pandoc
|
||||
" handle markdown files with pandoc (and pandoc syntax!)
|
||||
let g:pandoc#modules#disabled = [ "keyboard", "folding" ]
|
||||
let g:pandoc#filetypes#pandoc_markdown = 0
|
||||
let g:pandoc#filetypes#handled = [ "extra", "latex", "markdown", "pandoc", "rst", "textile"]
|
||||
" disable all default keymaps
|
||||
let g:pandoc#keyboard#use_default_mappings=0
|
||||
" needs to be set for wrapping and unwrapping of lines to work when doing j/k
|
||||
" or gj/gk respectively, to allow precise relative cursor jumping
|
||||
let g:pandoc#keyboard#display_motions=0
|
||||
let g:pandoc#hypertext#use_default_mappings=0
|
||||
" if there's a pdf and an html or similar, open the pdf
|
||||
let g:pandoc#command#prefer_pdf=1
|
||||
" look for bibtex files w/ same name as edited one, then .bib in current dir, yaml frontmatter, and finally the globally set bibs file
|
||||
let g:pandoc#biblio#sources="bcyg"
|
||||
" the globally set bibs file
|
||||
if $BIBFILE ==? ""
|
||||
let g:pandoc#biblio#bibs=[expand("~/documents/library/academia/academia.bib")]
|
||||
else
|
||||
let g:pandoc#biblio#bibs=[expand($BIBFILE)]
|
||||
endif
|
||||
let g:pandoc#biblio#use_bibtool=1
|
||||
let g:pandoc#biblio#use_preview=1
|
||||
let g:pandoc#completion#bib#mode='citeproc'
|
||||
let g:pandoc#folding#fold_yaml=1
|
||||
let g:pandoc#folding#fastfolds=1
|
||||
" let g:pandoc#folding#level=1
|
||||
let g:pandoc#spell#default_langs=["en_us", "de_de"]
|
||||
let g:pandoc#hypertext#ausosave_on_edit_open_link=1
|
||||
let g:pandoc#hypertext#create_if_no_alternates_exists=1
|
||||
|
||||
" PLUGIN: vim-pandoc-syntax
|
||||
let g:pandoc#syntax#conceal#use = 1
|
||||
let g:pandoc#syntax#conceal#urls = 1
|
|
@ -1,9 +1,9 @@
|
|||
local accounts = {}
|
||||
|
||||
local status, gmailuser = pipe_from(
|
||||
'gpg2 --decrypt --no-tty --quiet --no-verbose --for-your-eyes-only --pinentry-mode ask ~/.local/share/pass/misc/aerc-gmail-app-password.gpg | grep username | cut -d: -f2')
|
||||
local status, gmailpass = pipe_from(
|
||||
'gpg2 --decrypt --no-tty --quiet --no-verbose --for-your-eyes-only --pinentry-mode ask ~/.local/share/pass/misc/aerc-gmail-app-password.gpg | head -n1')
|
||||
local _, gmailuser = pipe_from(
|
||||
'pass show misc/gmail-app-password | grep username | cut -d: -f2')
|
||||
local _, gmailpass = pipe_from(
|
||||
'pass show misc/gmail-app-password | head -n1')
|
||||
-- Setup an imap account called gmail
|
||||
accounts.gmail = IMAP {
|
||||
server = "imap.gmail.com",
|
||||
|
|
|
@ -30,11 +30,11 @@ function getSenderList(rollupfile)
|
|||
for line in file:lines() do table.insert(rollupSenders, line) end
|
||||
else
|
||||
print(
|
||||
"ERROR: rollup did not find rollup.txt file containing mail addresses at " ..
|
||||
rollupfile or "")
|
||||
"rollup did not find rollup.txt file containing mail addresses at " ..
|
||||
rollupfile or ". Skipping.")
|
||||
end
|
||||
return rollupSenders
|
||||
end
|
||||
|
||||
sendToFolder(accounts.gmail["Inbox"], accounts.gmail["Dump"],
|
||||
getSenderList(getRollupFile()))
|
||||
getSenderList(getRollupFile()))
|
||||
|
|
|
@ -25,6 +25,7 @@ alias tan="task annotate"
|
|||
|
||||
alias tn="task next +READY"
|
||||
alias tun="task next urgency \> 4"
|
||||
alias tod="task +TODAY or +OVERDUE"
|
||||
|
||||
if exist timew; then
|
||||
alias tra="task active && timew"
|
||||
|
|
|
@ -80,7 +80,7 @@ include task-sync.rc
|
|||
include contexts
|
||||
|
||||
# try to fix some color weirdness, especially in tmux
|
||||
# color.scheduled=on grey
|
||||
color.scheduled=on grey
|
||||
|
||||
# only ever show one result in the tasksh
|
||||
tasksh.autoclear=1
|
||||
|
|
|
@ -47,6 +47,7 @@ prehook() {
|
|||
eval "$MBSYNC_PRE"
|
||||
return 0
|
||||
fi
|
||||
checkwarnuser
|
||||
imapfilter -c "${XDG_CONFIG_HOME:-$HOME/.config}/imapfilter/config.lua"
|
||||
}
|
||||
|
||||
|
@ -142,7 +143,6 @@ elif [ -n "$1" ]; then
|
|||
fi
|
||||
|
||||
main() {
|
||||
checkwarnuser
|
||||
enablegpgagent
|
||||
prehook
|
||||
|
||||
|
|
|
@ -72,4 +72,7 @@ c.hints.selectors["code"] = [
|
|||
]
|
||||
|
||||
# give the browser nice theme colors
|
||||
config.source("colorscheme.py")
|
||||
state_dir=os.environ.get('XDG_STATE_HOME', f"{os.environ['HOME']}/.local/state")
|
||||
colorscheme=f"{state_dir}/qutebrowser/colorscheme.py"
|
||||
if os.path.isfile(colorscheme):
|
||||
config.source(colorscheme)
|
||||
|
|
|
@ -7,7 +7,6 @@ redirects = {
|
|||
"source": ["youtube.com"],
|
||||
"target": [
|
||||
"yt.oelrichsgarcia.de",
|
||||
"vid.priv.au",
|
||||
"invidious.weblibre.org",
|
||||
"invidious.dhusch.de",
|
||||
"iv.ggtyler.dev",
|
||||
|
@ -197,7 +196,7 @@ def rewrite(request: interceptor.Request):
|
|||
matched=True
|
||||
|
||||
if matched:
|
||||
target = service["target"][random.randint(0, len(service["target"]))]
|
||||
target = service["target"][random.randint(0, len(service["target"])-1)]
|
||||
if target is not None and url.setHost(target) is not False:
|
||||
try:
|
||||
request.redirect(url)
|
||||
|
|
|
@ -25,7 +25,8 @@ test "$XDG_DESKTOP_DIR" || export XDG_DESKTOP_DIR="$HOME/desktop"
|
|||
test "$XDG_DOCUMENTS_DIR" || export XDG_DOCUMENTS_DIR="$HOME/documents"
|
||||
test "$XDG_DOWNLOAD_DIR" || export XDG_DOWNLOAD_DIR="$HOME/downloads"
|
||||
|
||||
export XDG_MUSIC_DIR="$HOME/media/audio/music"
|
||||
export XDG_MEDIA_DIR="$HOME/media"
|
||||
export XDG_MUSIC_DIR="$XDG_MEDIA_DIR/audio/music"
|
||||
export XDG_PICTURES_DIR="$HOME/pictures"
|
||||
export XDG_VIDEOS_DIR="$HOME/videos"
|
||||
|
||||
|
@ -49,6 +50,11 @@ xdg_makeForUser() {
|
|||
chmod 0700 "$1"
|
||||
}
|
||||
|
||||
if [ -h "$XDG_MEDIA_DIR" ] && [ ! -e "$XDG_MEDIA_DIR" ]; then
|
||||
rm "$XDG_MEDIA_DIR"
|
||||
xdg_makeForUser "$XDG_MEDIA_DIR"
|
||||
fi
|
||||
|
||||
## ensure directories exist
|
||||
xdg_isThere "$XDG_BIN_HOME" || xdg_makeForUser "$XDG_BIN_HOME"
|
||||
xdg_isThere "$XDG_CACHE_HOME" || xdg_makeForUser "$XDG_CACHE_HOME"
|
||||
|
|
|
@ -469,7 +469,8 @@ filextype *.csv
|
|||
\ {Open with visidata}
|
||||
\ vd %f,
|
||||
fileviewer *.csv
|
||||
\ xsv sample 100 %c | xsv table -c8 -p1 -w1,
|
||||
\ tidy-viewer
|
||||
" \ xsv sample 100 %c | xsv table -c8 -p1 -w1,
|
||||
" \ {cat %c | sed -e 's/,,/, ,/g' | column -s, -t | less -#5 -N -S; }
|
||||
|
||||
" Mindmap
|
||||
|
|
|
@ -1,78 +1,47 @@
|
|||
local wezterm = require 'wezterm'
|
||||
local mux = wezterm.mux
|
||||
|
||||
local maps = require 'maps'
|
||||
|
||||
require 'statusbar'.setup()
|
||||
require 'events'.setup()
|
||||
|
||||
-- wezterm.on("set-up-dotfile-workspace", function(window, pane)
|
||||
-- -- Set a workspace for coding on a current project
|
||||
-- -- Top pane is for the editor, bottom pane is for the build tool
|
||||
-- local project_dir = wezterm.home_dir .. '/projects/test/quarto/quarto-test'
|
||||
-- local tab, build_pane, window = mux.spawn_window {
|
||||
-- workspace = 'coding',
|
||||
-- cwd = project_dir,
|
||||
-- args = args
|
||||
-- }
|
||||
-- local editor_pane = build_pane:split{
|
||||
-- direction = 'Top',
|
||||
-- size = 0.6,
|
||||
-- cwd = project_dir
|
||||
-- }
|
||||
-- build_pane:send_text 'quarto check'
|
||||
-- mux.set_active_workspace 'coding'
|
||||
-- end)
|
||||
--
|
||||
-- wezterm.on('gui-startup', function(cmd)
|
||||
-- -- allow `wezterm start -- something` to affect what we spawn
|
||||
-- -- in our initial window
|
||||
-- local args = {}
|
||||
-- if cmd then args = cmd.args end
|
||||
--
|
||||
-- -- Set a workspace for coding on a current project
|
||||
-- -- Top pane is for the editor, bottom pane is for the build tool
|
||||
-- local project_dir = wezterm.home_dir .. '/projects/test/quarto/quarto-test'
|
||||
-- local tab, build_pane, window = mux.spawn_window {
|
||||
-- workspace = 'coding',
|
||||
-- cwd = project_dir,
|
||||
-- args = args
|
||||
-- }
|
||||
-- local editor_pane = build_pane:split {
|
||||
-- direction = 'Top',
|
||||
-- size = 0.6,
|
||||
-- cwd = project_dir
|
||||
-- }
|
||||
-- build_pane:send_text 'quarto check'
|
||||
--
|
||||
-- -- A workspace for interacting with a local machine that
|
||||
-- -- runs some docker containners for home automation
|
||||
-- local tab, pane, window = mux.spawn_window {
|
||||
-- workspace = 'toppy',
|
||||
-- args = { 'top' }
|
||||
-- }
|
||||
--
|
||||
-- -- We want to startup in the coding workspace
|
||||
-- mux.set_active_workspace 'coding'
|
||||
-- end)
|
||||
local function file_exists(name)
|
||||
local f = io.open(name, "r")
|
||||
if f ~= nil then
|
||||
io.close(f)
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
-- automatically reload colors file
|
||||
local colorsfile = (os.getenv('XDG_STATE_HOME') or
|
||||
(os.getenv('HOME') .. '/.local/state')) ..
|
||||
'/wezterm/colors.toml'
|
||||
local colors = {}
|
||||
if file_exists(colorsfile) == true then
|
||||
wezterm.add_to_config_reload_watch_list(colorsfile)
|
||||
colors = wezterm.color.load_scheme(colorsfile)
|
||||
end
|
||||
|
||||
return {
|
||||
enable_wayland = true,
|
||||
|
||||
hide_tab_bar_if_only_one_tab = true,
|
||||
use_fancy_tab_bar = false,
|
||||
tab_bar_at_bottom = true,
|
||||
window_padding = { left = 0, right = 0, top = 0, bottom = 0 },
|
||||
|
||||
color_scheme = "Railscasts (base16)",
|
||||
|
||||
colors = colors,
|
||||
color_scheme = "Nord (base16)", -- will be overwritten by colors
|
||||
-- default_prog = {"nu"},
|
||||
scrollback_lines = 10000,
|
||||
|
||||
font = wezterm.font('Iosevka Nerd Font'),
|
||||
line_height = 1.0,
|
||||
|
||||
leader = { key = 'a', mods = 'CTRL', timeout_milliseconds = 1500 },
|
||||
keys = maps.keys,
|
||||
key_tables = maps.key_tables
|
||||
key_tables = maps.key_tables,
|
||||
inactive_pane_hsb = {
|
||||
saturation = 0.9,
|
||||
brightness = 0.9,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
#picktool = fzf
|
||||
default-library = master
|
||||
file-browser = vifm
|
||||
ref-format = {doc[author_list][0][surname]}{doc[year]}
|
||||
ref-format = {doc[author_list][0][family]}{doc[year]}
|
||||
|
||||
# edit info.yaml as new papers are added
|
||||
add-edit = True
|
||||
add-folder-name = {doc[ref]}-{doc[title]}
|
||||
add-folder-name = {doc[author_list][0][family]}-{doc[title]}
|
||||
add-file-name = {doc[author_list][0][family]}{doc[year]}
|
||||
header-format-file = ~/.config/papis/headerformat
|
||||
extra-bibtex-keys = ["tags", "readstatus"]
|
||||
|
@ -31,5 +31,8 @@ dir = ~/documents/library
|
|||
[academia]
|
||||
dir = ~/documents/library/academia
|
||||
|
||||
[personal]
|
||||
dir = ~/documents/library/personal
|
||||
|
||||
[cs]
|
||||
dir = ~/documents/library/cs
|
||||
|
|
10
writing/.config/sh/alias.d/zk.sh
Normal file
10
writing/.config/sh/alias.d/zk.sh
Normal file
|
@ -0,0 +1,10 @@
|
|||
#!/usr/bin/env sh
|
||||
#
|
||||
|
||||
n() {
|
||||
if [ $# -eq 0 ]; then
|
||||
zk edit -i
|
||||
else
|
||||
zk "${@}"
|
||||
fi
|
||||
}
|
4
writing/.config/sh/env.d/zk.sh
Normal file
4
writing/.config/sh/env.d/zk.sh
Normal file
|
@ -0,0 +1,4 @@
|
|||
#!/usr/bin/env sh
|
||||
#
|
||||
|
||||
export ZK_NOTEBOOK_DIR="${WIKIROOT:-~/documents/notes/}/pinky"
|
|
@ -1,4 +1,6 @@
|
|||
# overwritten by below colors
|
||||
include colorscheme
|
||||
include /home/marty/.local/state/zathura/zathurarc
|
||||
|
||||
set recolor "true"
|
||||
set selection-clipboard "clipboard"
|
||||
|
@ -7,4 +9,3 @@ set first-page-column 1
|
|||
map r reload
|
||||
map R rotate
|
||||
map p print
|
||||
|
||||
|
|
Loading…
Reference in a new issue