Compare commits

..

4 commits

Author SHA1 Message Date
18ce017b8a
nvim: Add djot filetype to prose plugins
Since it is (basically) markdown, we add it to markdown-like filetypes.
2025-02-18 22:41:41 +01:00
395bf80abe
zk: Fix note dir location and add cd alias
The note dir is in fact our `$WIKIROOT` so we set it to that by default.
Also took the chance and added a small 'cd' command into the note dir,
using `ncd`
2025-02-18 22:41:40 +01:00
65bb7aa034
nvim: Add djot filetype detection 2025-02-18 22:41:39 +01:00
f3fb0998f5
vifm: Replace glow with bat markdown preview
For some reason (glow 2.0.0 release?) markdown preview with glow does
_not_ work anymore within my vifm. It regresses to showing errors all
over the place instead.
2025-02-18 22:41:39 +01:00
6 changed files with 17 additions and 44 deletions

View file

@ -78,6 +78,7 @@ social = "~"
"writing/sioyek/config" = "~/.config"
"writing/zathura/config" = "~/.config"
"writing/zk/config" = "~/.config"
"writing/zk/config/sh/alias.d/zk.sh" = { target = "~/.config/sh/alias.d/zk.sh", type = "symbolic" }
"writing/pandoc/local" = "~/.local"
writing = "~"

View file

@ -0,0 +1,7 @@
-- Set filetypes for 'djot' - an update markdown alternative
-- https://github.com/jgm/djot
vim.filetype.add({
extension = {
dj = "djot",
},
})

View file

@ -1,8 +1,10 @@
local md_like = {
"markdown",
"djot",
"pandoc",
"quarto",
"vimwiki",
"codecompanion",
}
local org_like = {
"norg",
@ -68,7 +70,6 @@ local prose_plugs = {
"MeanderingProgrammer/render-markdown.nvim",
main = "render-markdown",
opts = {
file_types = { unpack(md_like) },
render_modes = { "n", "c", "i" },
code = {
sign = false,

View file

@ -617,9 +617,10 @@ fileviewer */
\ tree -L 2,
" markdown text
fileviewer *.md
\ [ "$TERM_DARK" = "true" ] && glow --style=dark %c || glow --style=light %c,
\ bat --color=always --style=plain
fileviewer *.md,*.markdown,*.mkd,*.mdx,*.rmd,*.Rmd,*.quarto,*.mdwiki
\ bat --color=always --style=plain --language md | less -FRX
" glow has ceased to work w/ version 2.0.0
" \ [ "$TERM_DARK" = "true" ] && glow -p --style=dark %c || glow -p --style=light %c,
" use custom viewer script for rest
fileviewer * vifm-default-viewer %c
@ -627,45 +628,6 @@ fileviewer * vifm-default-viewer %c
" use our own custom opener
filetype * open
" Syntax highlighting in preview
"
" Explicitly set highlight type for some extensions
"
" 256-color terminal
" fileviewer *.[ch],*.[ch]pp highlight -O xterm256 -s dante --syntax c %c
" fileviewer Makefile,Makefile.* highlight -O xterm256 -s dante --syntax make %c
"
" 16-color terminal
" fileviewer *.c,*.h highlight -O ansi -s dante %c
"
" Or leave it for automatic detection
"
" fileviewer *[^/] pygmentize -O style=monokai -f console256 -g
" Displaying pictures in terminal
"
" fileviewer *.jpg,*.png shellpic %c
" Open all other files with default system programs (you can also remove all
" :file[x]type commands above to ensure they don't interfere with system-wide
" settings). By default all unknown files are opened with 'vi[x]cmd'
" uncommenting one of lines below will result in ignoring 'vi[x]cmd' option
" for unknown file types.
" For *nix:
" filetype * xdg-open
" For OS X:
" filetype * open
" For Windows:
" filetype * start, explorer
" }}}
" Various customization examples
" Add additional place to look for executables
"
" let $PATH = $HOME.'/bin/fuse:'.$PATH
" Block particular shortcut
"
" nnoremap <left> <nop>

View file

@ -15,3 +15,5 @@ n() {
if command -v nvim >/dev/null 2>&1; then
alias ni='nvim +"lua require \"zk.commands\".get(\"ZkCd\")()" +"edit $WIKIROOT/index.md"'
fi
alias ncd='pushd $WIKIROOT'

View file

@ -1,4 +1,4 @@
#!/usr/bin/env sh
#
export ZK_NOTEBOOK_DIR="${WIKIROOT:-~/documents/notes/}/pinky"
export ZK_NOTEBOOK_DIR="${WIKIROOT:-~/documents/notes/}"