diff --git a/.config/nvim/install_lsps.sh b/.config/nvim/install_lsps.sh deleted file mode 100755 index 36ba9ac..0000000 --- a/.config/nvim/install_lsps.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -set -e - -paru -S --needed --noconfirm \ - bash-language-server \ - lua-language-server \ - rust-analyzer \ - taplo-lsp \ - vscode-langservers-extracted \ - yaml-language-server diff --git a/.config/nvim/lua/pluginconf/lspconf.lua b/.config/nvim/lua/pluginconf/lspconf.lua index 3b897e1..23ca049 100644 --- a/.config/nvim/lua/pluginconf/lspconf.lua +++ b/.config/nvim/lua/pluginconf/lspconf.lua @@ -13,8 +13,9 @@ lspc.cssls.setup { capabilities = caps } lspc.eslint.setup { capabilities = caps } lspc.html.setup { capabilities = caps } lspc.jsonls.setup { capabilities = caps } +lspc.ocamllsp.setup { capabilities = caps } lspc.rust_analyzer.setup { capabilities = caps } -lspc.sumneko_lua.setup { -- paru -S lua-language-server +lspc.sumneko_lua.setup { capabilities = caps, settings = { Lua = { diff --git a/justfile b/justfile index 19e9c1b..2d660e4 100644 --- a/justfile +++ b/justfile @@ -1,9 +1,32 @@ -install-scripts target="$HOME/.local/bin": - #!/bin/sh - zig build-exe \ +lsps := " +bash-language-server +lua-language-server +rust-analyzer +taplo-lsp +vscode-langservers-extracted +yaml-language-server +" + +install-scripts target=(`echo $HOME` + "/.local/bin"): + cd scripts && zig build-exe \ -lc -lX11 -lXinerama \ - scripts/randomwallpaper.zig \ + randomwallpaper.zig \ -femit-bin={{target}}/randomwallpaper + + opam install --yes clap + cd scripts/playtwitch && dune build + cp scripts/playtwitch/_build/default/playtwitch.exe {{target}}/playtwitch + ln -sf \ - `pwd`/scripts/{playtwitch,start-joshuto,withjava} \ + `pwd`/scripts/{start-joshuto,withjava} \ {{target}} + +install-lsps-paru: + #!/bin/sh + paru -S --needed --noconfirm {{replace(lsps, "\n", " ")}} + + if which opam &> /dev/null; then + opam install --yes \ + ocaml-lsp-server \ + ocamlformat + fi diff --git a/.gitignore b/scripts/.gitignore similarity index 100% rename from .gitignore rename to scripts/.gitignore diff --git a/scripts/playtwitch/.gitignore b/scripts/playtwitch/.gitignore new file mode 100644 index 0000000..4a11c3b --- /dev/null +++ b/scripts/playtwitch/.gitignore @@ -0,0 +1,2 @@ +_build/ +*.exe diff --git a/scripts/playtwitch/dune b/scripts/playtwitch/dune new file mode 100644 index 0000000..7000e34 --- /dev/null +++ b/scripts/playtwitch/dune @@ -0,0 +1,3 @@ +(executable + (name playtwitch) + (libraries clap)) diff --git a/scripts/playtwitch/dune-project b/scripts/playtwitch/dune-project new file mode 100644 index 0000000..c994249 --- /dev/null +++ b/scripts/playtwitch/dune-project @@ -0,0 +1 @@ +(lang dune 2.9) diff --git a/scripts/playtwitch b/scripts/playtwitch/playtwitch.ml old mode 100755 new mode 100644 similarity index 60% rename from scripts/playtwitch rename to scripts/playtwitch/playtwitch.ml index 38bd0e4..3f07ce9 --- a/scripts/playtwitch +++ b/scripts/playtwitch/playtwitch.ml @@ -1,16 +1,3 @@ -#!/usr/bin/env scriptisto - -(* - scriptisto-begin - script_src: playtwitch.ml - build_cmd: dune build playtwitch.exe - target_bin: ./_build/default/playtwitch.exe - files: - - path: dune - content: (executable (name playtwitch) (libraries clap)) - scriptisto-end -*) - Clap.description "play a twitch stream using streamlink"; let stream_name = Clap.mandatory_string ~placeholder:"stream_name" () in let quality = Clap.default_string ~placeholder:"quality" "best" in diff --git a/scripts/randomwallpaper.zig b/scripts/randomwallpaper.zig index e6702a5..8d8350e 100644 --- a/scripts/randomwallpaper.zig +++ b/scripts/randomwallpaper.zig @@ -1,4 +1,3 @@ -// zig build-exe -lc -lX11 -lXinerama randomwallpaper.zig -femit-bin=$HOME/.local/bin/randomwallpaper const std = @import("std"); const mem = std.mem; const c = @cImport({