Added formatting enable/disable commands for nvim, rg and blockbench to the install script and set the regex engine for git fetches to PCRE2

master
Wynd 2024-10-28 22:14:36 +02:00
parent 56830262bf
commit 40d04ff874
4 changed files with 30 additions and 7 deletions

View File

@ -1,4 +1,4 @@
#? Config file for btop v. 1.3.2 #? Config file for btop v. 1.4.0
#* Name of a btop++/bpytop/bashtop formatted ".theme" file, "Default" and "TTY" for builtin themes. #* Name of a btop++/bpytop/bashtop formatted ".theme" file, "Default" and "TTY" for builtin themes.
#* Themes should be placed in "../share/btop/themes" relative to binary or "$HOME/.config/btop/themes" #* Themes should be placed in "../share/btop/themes" relative to binary or "$HOME/.config/btop/themes"
@ -47,7 +47,7 @@ graph_symbol_net = "default"
graph_symbol_proc = "default" graph_symbol_proc = "default"
#* Manually set which boxes to show. Available values are "cpu mem net proc" and "gpu0" through "gpu5", separate values with whitespace. #* Manually set which boxes to show. Available values are "cpu mem net proc" and "gpu0" through "gpu5", separate values with whitespace.
shown_boxes = "cpu mem proc net" shown_boxes = "cpu proc mem"
#* Update time in milliseconds, recommended 2000 ms or above for better sample times for graphs. #* Update time in milliseconds, recommended 2000 ms or above for better sample times for graphs.
update_ms = 1000 update_ms = 1000

View File

@ -33,3 +33,22 @@ user_command("CountWords", function()
local words = vim.fn.wordcount()["words"] local words = vim.fn.wordcount()["words"]
print("Words: " .. words) print("Words: " .. words)
end, {}) end, {})
user_command("FormatDisable", function(args)
if args.bang then
-- FormatDisable! will disable formatting just for this buffer
vim.b.disable_autoformat = true
else
vim.g.disable_autoformat = true
end
end, {
desc = "Disable autoformat-on-save",
bang = true,
})
user_command("FormatEnable", function()
vim.b.disable_autoformat = false
vim.g.disable_autoformat = false
end, {
desc = "Re-enable autoformat-on-save",
})

View File

@ -29,11 +29,13 @@ return {
toml = { "taplo" }, toml = { "taplo" },
c = { "clang-format" }, c = { "clang-format" },
}, },
format_on_save = { format_on_save = function(bufnr)
timeout_ms = 500, if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
lsp_fallback = true, return
end
-- quiet = true, -- quiet = true,
}, return { timeout_ms = 500, lsp_fallback = true }
end,
}, },
init = function() init = function()
vim.o.formatexpr = "v:lua.require('conform').formatexpr()" vim.o.formatexpr = "v:lua.require('conform').formatexpr()"

View File

@ -102,7 +102,7 @@ get_git_release_url() {
repo=$1 repo=$1
regex=$2 regex=$2
url=$(curl -s https://api.github.com/repos/$repo/releases/latest \ url=$(curl -s https://api.github.com/repos/$repo/releases/latest \
| grep "browser_download_url.*${regex}\"" \ | grep -P "browser_download_url.*${regex}\"" \
| cut -d : -f 2,3 \ | cut -d : -f 2,3 \
| tr -d \") | tr -d \")
} }
@ -183,6 +183,8 @@ deb_install OnlyOffice.deb "https://download.onlyoffice.com/install/desktop/edit
deb_install JDGUI.deb "https://github.com/java-decompiler/jd-gui/releases/download/v1.6.6/jd-gui-1.6.6.deb" deb_install JDGUI.deb "https://github.com/java-decompiler/jd-gui/releases/download/v1.6.6/jd-gui-1.6.6.deb"
deb_install Minecraft.deb "https://launcher.mojang.com/download/Minecraft.deb" deb_install Minecraft.deb "https://launcher.mojang.com/download/Minecraft.deb"
deb_git_install fastfetch.deb "fastfetch-cli/fastfetch" "fastfetch-linux-amd64.deb" deb_git_install fastfetch.deb "fastfetch-cli/fastfetch" "fastfetch-linux-amd64.deb"
deb_git_install rg.deb "BurntSushi/ripgrep" "ripgrep_\d+.\d+.\d+-\d+_amd64\.deb" #"ripgrep_\d+.\d+.\d+-\d+_amd64\.deb"
deb_git_install blockbench.deb "JannisX11/blockbench" "Blockbench_\d+.\d+.\d+.deb"
# TAR Installs # TAR Installs
# Zig's case is special mostly because they don't have the 0.13 builds on github so no tar_git_install for that sadly # Zig's case is special mostly because they don't have the 0.13 builds on github so no tar_git_install for that sadly