diff --git a/fish/config.fish b/fish/config.fish index 1ba739b..d89057c 100644 --- a/fish/config.fish +++ b/fish/config.fish @@ -32,6 +32,8 @@ set -l GCR_SSH_SOCK $XDG_RUNTIME_DIR/gcr/ssh if test -S "$GCR_SSH_SOCK" set -gx SSH_AUTH_SOCK "$GCR_SSH_SOCK" end -if uwsm check may-start && uwsm select - exec uwsm start default +if status is-login && test -z "$DISPLAY" -a -z "$WAYLAND_DISPLAY" + if uwsm check may-start && uwsm select + exec uwsm start default + end end diff --git a/nvim/init.lua b/nvim/init.lua index fa9e181..4bc723c 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -17,6 +17,9 @@ require('mini.deps').setup() local add = MiniDeps.add +add({ + source = 'chomosuke/typst-preview.nvim' +}) add({ source = 'williamboman/mason.nvim' }) @@ -279,6 +282,72 @@ vim.keymap.set('n', 'l', 'wincmd l') vim.keymap.set('n', 'j', 'wincmd j') vim.keymap.set('n', 'k', 'wincmd k') +require 'typst-preview'.setup { + -- Setting this true will enable logging debug information to + -- `vim.fn.stdpath 'data' .. '/typst-preview/log.txt'` + debug = false, + + -- Custom format string to open the output link provided with %s + -- Example: open_cmd = 'firefox %s -P typst-preview --class typst-preview' + open_cmd = nil, + + -- Custom port to open the preview server. Default is random. + -- Example: port = 8000 + port = 0, + + -- Custom host to bind the preview server to. + -- Note that '0.0.0.0' is not supported and [won't be](https://github.com/Myriad-Dreamin/tinymist/issues/2105) + -- Example: host = '192.168.0.10' + host = '127.0.0.1', + + -- Setting this to 'always' will invert black and white in the preview + -- Setting this to 'auto' will invert depending if the browser has enable + -- dark mode + -- Setting this to '{"rest": "