Compare commits

...

6 commits

Author SHA1 Message Date
c10ff130ce new(bat): add config & install script for linux 2024-11-15 20:35:05 +09:00
297445343d new(nvim): add typst-preview.nvim
with customization to modify --root for typst
2024-11-15 20:33:56 +09:00
c67a385937 new(nix): Experimental nix config 2024-10-31 21:18:57 +09:00
df46ec7453 new(lf): config installation for linux 2024-10-28 22:12:42 +09:00
2a7d1d80c0 new(lf): lfrc 2024-10-28 17:20:55 +09:00
1f600a970a fix(julials): import FileWatching on Windows 2024-10-26 02:53:56 +09:00
8 changed files with 136 additions and 0 deletions

View file

@ -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

View file

@ -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)"

View file

@ -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"

4
dotfiles/bat/config Normal file
View file

@ -0,0 +1,4 @@
# use Catppuccin for bat
# https://github.com/catppuccin/bat
# Installation instruction on the readme
--theme="Catppuccin Latte"

23
dotfiles/lf/lfrc Normal file
View file

@ -0,0 +1,23 @@
cmap <tab> cmd-menu-complete
cmap <backtab> 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\""
#}}

View file

@ -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": "<option>","image": "<option>"}' will apply
-- your choice of color inversion to images and everything else
-- separately.
invert_colors = 'never',
-- Whether the preview will follow the cursor in the source file
follow_cursor = true,
-- Provide the path to binaries for dependencies.
-- Setting this will skip the download of the binary by the plugin.
-- Warning: Be aware that your version might be older than the one
-- required.
dependencies_bin = {
['tinymist'] = nil,
['websocat'] = nil
},
-- A list of extra arguments (or nil) to be passed to previewer.
-- For example, extra_args = { "--input=ver=draft", "--ignore-system-fonts" }
extra_args = nil,
-- This function will be called to determine the root of the typst project
get_root = function(path_of_main_file)
-- Use root of git repository as a --root for typst
local rootpath = vim.fs.root(path_of_main_file, '.git')
if rootpath then
return rootpath
else
return vim.fn.fnamemodify(path_of_main_file, ':p:h')
end
end,
-- This function will be called to determine the main file of the typst
-- project.
get_main_file = function(path_of_buffer)
return path_of_buffer
end,
}
end
},
})
-----------------------------------------------------------

14
nix/README.md Normal file
View file

@ -0,0 +1,14 @@
# Experimental Nix flake for general cli environment
- Basically for servers, not for my laptops.
# How to Install
```sh
$ nix flake build
$ nix profile install .#my-packages
```
# How to upgrade
```sh
$ nix flake upgrade
$ nix profile upgrade my-packages
```

25
nix/flake.nix Normal file
View file

@ -0,0 +1,25 @@
{
description = "A very basic flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
};
outputs = { self, nixpkgs }: {
packages.x86_64-linux.my-packages = nixpkgs.legacyPackages.x86_64-linux.buildEnv {
name = "my-packages-list";
paths = [
nixpkgs.legacyPackages.x86_64-linux.fish
nixpkgs.legacyPackages.x86_64-linux.git
nixpkgs.legacyPackages.x86_64-linux.curl
nixpkgs.legacyPackages.x86_64-linux.neovim
nixpkgs.legacyPackages.x86_64-linux.ripgrep
nixpkgs.legacyPackages.x86_64-linux.fzf
nixpkgs.legacyPackages.x86_64-linux.clang-tools
];
};
};
}