diff --git a/bin/install.ps1 b/bin/install.ps1 index 2991261..be17a41 100644 --- a/bin/install.ps1 +++ b/bin/install.ps1 @@ -77,4 +77,7 @@ New-Item -ItemType SymbolicLink -Path ~\.config\wezterm\wezterm.lua -Target (Res # julia mkdir ~\.config\julia\config New-Item -ItemType SymbolicLink -Path ~\.julia\config\startup.jl -Target (Resolve-Path .\dotfiles\startup_windows.jl) -Force +# lf +mkdir $env:LOCALAPPDATA\lf +New-Item -ItemType SymbolicLink -Path $env:LOCALAPPDATA\lf\lfrc -Target (Resolve-Path .\dotfiles\lf\lfrc) -Force diff --git a/bin/install.sh b/bin/install.sh index 905daea..4da1d01 100755 --- a/bin/install.sh +++ b/bin/install.sh @@ -45,3 +45,8 @@ ln -sf $(pwd)/dotfiles/neovim/luasnippets/satysfi/math.lua ~/.config/nvim/luasni mkdir -p ~/.julia/config ln -sf $(pwd)/dotfiles/startup_linux.jl ~/.julia/config/startup.jl + +mkdir -p ~/.config/lf +ln -sf $(pwd)/dotfiles/lf/lfrc ~/.config/lf/lfrc + +ln -sf $(pwd)/dotfiles/bat/config "$(bat --config-file)" diff --git a/bin/neovim/add_dependencies.jl b/bin/neovim/add_dependencies.jl index 19e6963..f4560c5 100644 --- a/bin/neovim/add_dependencies.jl +++ b/bin/neovim/add_dependencies.jl @@ -24,6 +24,9 @@ open(out_path, "w") do io println(io, "using LanguageServer") println(io, "using " * join(pkg_ls_deps, ", ")) println(io, "using " * join(pkg_extra, ", ")) + if Sys.iswindows() + println(io, "import FileWatching") + end end @info "finished writing precompile head file" diff --git a/dotfiles/bat/config b/dotfiles/bat/config new file mode 100644 index 0000000..7042fd2 --- /dev/null +++ b/dotfiles/bat/config @@ -0,0 +1,4 @@ +# use Catppuccin for bat +# https://github.com/catppuccin/bat +# Installation instruction on the readme +--theme="Catppuccin Latte" diff --git a/dotfiles/lf/lfrc b/dotfiles/lf/lfrc new file mode 100644 index 0000000..15b8558 --- /dev/null +++ b/dotfiles/lf/lfrc @@ -0,0 +1,23 @@ +cmap cmd-menu-complete +cmap cmd-menu-complete-back + +## https://github.com/gokcehan/lf/wiki/Integrations#eza +#cmd on-select &{{ +# lf -remote "send $id set statfmt \"$(eza -ld --color=always "$f" | sed 's/\\/\\\\/g;s/"/\\"/g')\"" +#}} +# +#cmd git_branch ${{ +# git branch | fzf | xargs git checkout +# pwd_shell="$(pwd | sed 's/\\/\\\\/g;s/"/\\"/g')" +# lf -remote "send $id updir; cd \"$pwd_shell\"" +#}} +#map gb :git_branch +#map gp $clear; git pull --rebase || true; echo "press ENTER"; read ENTER +#map gs $clear; git status; echo "press ENTER"; read ENTER +#map gl $clear; git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit +# +#cmd on-cd &{{ +# fmt="$(STARSHIP_SHELL= starship prompt | sed 's/\\/\\\\/g;s/"/\\"/g')" +# lf -remote "send $id set promptfmt \"$fmt\"" +#}} + diff --git a/dotfiles/neovim/init.lua b/dotfiles/neovim/init.lua index 24b870f..daf7440 100644 --- a/dotfiles/neovim/init.lua +++ b/dotfiles/neovim/init.lua @@ -279,6 +279,65 @@ require('lazy').setup({ }) end, }, + { + 'chomosuke/typst-preview.nvim', + ft = 'typst', + version = 'v1.*', + build = function() + require 'typst-preview'.update() + end, + config = function() + require 'typst-preview'.setup { + -- Setting this true will enable printing debug information with print() + 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, + + -- 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": "