Compare commits

..

6 Commits

14 changed files with 258 additions and 14 deletions

2
symlinks/bin/.gitignore vendored 100644
View File

@ -0,0 +1,2 @@
bundle
bundler

View File

@ -210,7 +210,7 @@ time_invoice () {
LAST_PWD="$PWD" LAST_PWD="$PWD"
echo "" >> "$TIMESHEET_LEDGER_HOME/invoices/$(date +%Y).journal" echo "" >> "$TIMESHEET_LEDGER_HOME/invoices/$(date +%Y).journal"
echo "$(date '+%Y-%m-%d') * $COMMENT" >> "$TIMESHEET_LEDGER_HOME/invoices/$(date +%Y).journal" echo "$(date '+%Y-%m-%d') $COMMENT" >> "$TIMESHEET_LEDGER_HOME/invoices/$(date +%Y).journal"
echo " ($PROJECT) -$(ledger -f "$TIMESHEET_LEDGER_HOME/main.journal" bal $PROJECT and @"$COMMENT" --format "%(total)")" >> "$TIMESHEET_LEDGER_HOME/invoices/$(date +%Y).journal" echo " ($PROJECT) -$(ledger -f "$TIMESHEET_LEDGER_HOME/main.journal" bal $PROJECT and @"$COMMENT" --format "%(total)")" >> "$TIMESHEET_LEDGER_HOME/invoices/$(date +%Y).journal"
echo " Invoiced:$(echo $PROJECT | sed "s/Project://") $AMOUNT€" >> "$TIMESHEET_LEDGER_HOME/invoices/$(date +%Y).journal" echo " Invoiced:$(echo $PROJECT | sed "s/Project://") $AMOUNT€" >> "$TIMESHEET_LEDGER_HOME/invoices/$(date +%Y).journal"
echo " Magic" >> "$TIMESHEET_LEDGER_HOME/invoices/$(date +%Y).journal" echo " Magic" >> "$TIMESHEET_LEDGER_HOME/invoices/$(date +%Y).journal"

View File

@ -1,4 +1,4 @@
#? Config file for btop v. 1.2.13 #? Config file for btop v. 1.3.2
#* 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"
@ -37,6 +37,9 @@ graph_symbol = "braille"
# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty". # Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty".
graph_symbol_cpu = "default" graph_symbol_cpu = "default"
# Graph symbol to use for graphs in gpu box, "default", "braille", "block" or "tty".
graph_symbol_gpu = "default"
# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty". # Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty".
graph_symbol_mem = "default" graph_symbol_mem = "default"
@ -46,7 +49,7 @@ graph_symbol_net = "default"
# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty". # Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty".
graph_symbol_proc = "default" graph_symbol_proc = "default"
#* Manually set which boxes to show. Available values are "cpu mem net proc", 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 net proc" shown_boxes = "cpu mem net proc"
#* 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.
@ -86,6 +89,9 @@ proc_left = False
#* (Linux) Filter processes tied to the Linux kernel(similar behavior to htop). #* (Linux) Filter processes tied to the Linux kernel(similar behavior to htop).
proc_filter_kernel = False proc_filter_kernel = False
#* In tree-view, always accumulate child process resources in the parent process.
proc_aggregate = False
#* Sets the CPU stat shown in upper half of the CPU graph, "total" is always available. #* Sets the CPU stat shown in upper half of the CPU graph, "total" is always available.
#* Select from a list of detected attributes from the options menu. #* Select from a list of detected attributes from the options menu.
cpu_graph_upper = "total" cpu_graph_upper = "total"
@ -94,6 +100,9 @@ cpu_graph_upper = "total"
#* Select from a list of detected attributes from the options menu. #* Select from a list of detected attributes from the options menu.
cpu_graph_lower = "total" cpu_graph_lower = "total"
#* If gpu info should be shown in the cpu box. Available values = "Auto", "On" and "Off".
show_gpu_info = "Auto"
#* Toggles if the lower CPU graph should be inverted. #* Toggles if the lower CPU graph should be inverted.
cpu_invert_lower = True cpu_invert_lower = True
@ -178,7 +187,7 @@ disk_free_priv = False
show_io_stat = True show_io_stat = True
#* Toggles io mode for disks, showing big graphs for disk read/write speeds. #* Toggles io mode for disks, showing big graphs for disk read/write speeds.
io_mode = False io_mode = True
#* Set to True to show combined read/write io graphs in io mode. #* Set to True to show combined read/write io graphs in io mode.
io_graph_combined = False io_graph_combined = False
@ -207,6 +216,33 @@ show_battery = True
#* Which battery to use if multiple are present. "Auto" for auto detection. #* Which battery to use if multiple are present. "Auto" for auto detection.
selected_battery = "Auto" selected_battery = "Auto"
#* Show power stats of battery next to charge indicator.
show_battery_watts = True
#* Set loglevel for "~/.config/btop/btop.log" levels are: "ERROR" "WARNING" "INFO" "DEBUG". #* Set loglevel for "~/.config/btop/btop.log" levels are: "ERROR" "WARNING" "INFO" "DEBUG".
#* The level set includes all lower levels, i.e. "DEBUG" will show all logging info. #* The level set includes all lower levels, i.e. "DEBUG" will show all logging info.
log_level = "WARNING" log_level = "WARNING"
#* Measure PCIe throughput on NVIDIA cards, may impact performance on certain cards.
nvml_measure_pcie_speeds = True
#* Horizontally mirror the GPU graph.
gpu_mirror_graph = True
#* Custom gpu0 model name, empty string to disable.
custom_gpu_name0 = ""
#* Custom gpu1 model name, empty string to disable.
custom_gpu_name1 = ""
#* Custom gpu2 model name, empty string to disable.
custom_gpu_name2 = ""
#* Custom gpu3 model name, empty string to disable.
custom_gpu_name3 = ""
#* Custom gpu4 model name, empty string to disable.
custom_gpu_name4 = ""
#* Custom gpu5 model name, empty string to disable.
custom_gpu_name5 = ""

View File

@ -2,10 +2,10 @@
LocationMode=filename-entry LocationMode=filename-entry
ShowHidden=true ShowHidden=true
ShowSizeColumn=true ShowSizeColumn=true
GeometryX=2460 GeometryX=540
GeometryY=257 GeometryY=185
GeometryWidth=840 GeometryWidth=840
GeometryHeight=630 GeometryHeight=762
SortColumn=name SortColumn=name
SortOrder=ascending SortOrder=ascending
StartupMode=recent StartupMode=recent

View File

@ -10,6 +10,7 @@ video/webm=org.videolan.VLC.desktop
text/x-log=nvim.desktop text/x-log=nvim.desktop
text/plain=nvim.desktop text/plain=nvim.desktop
x-scheme-handler/fleet=jetbrains-fleet.desktop x-scheme-handler/fleet=jetbrains-fleet.desktop
x-scheme-handler/eclipse+command x-scheme-handler/eclipse+mpc=_app_eclipse_.desktop
[Added Associations] [Added Associations]
x-scheme-handler/sms=org.gnome.Shell.Extensions.GSConnect.desktop; x-scheme-handler/sms=org.gnome.Shell.Extensions.GSConnect.desktop;
@ -23,3 +24,4 @@ text/markdown=nvim.desktop;
video/webm=org.videolan.VLC.desktop; video/webm=org.videolan.VLC.desktop;
text/x-log=nvim.desktop; text/x-log=nvim.desktop;
text/plain=nvim.desktop; text/plain=nvim.desktop;
image/x-portable-pixmap=gimp.desktop;

View File

@ -43,6 +43,7 @@ return require("lazy").setup({
-- Tools -- Tools
"direnv/direnv.vim", -- Integration with Direnv "direnv/direnv.vim", -- Integration with Direnv
"nvim-neotest/neotest", -- Running tests from NeoVim "nvim-neotest/neotest", -- Running tests from NeoVim
"nvim-neotest/nvim-nio",
"nvim-neotest/neotest-plenary", "nvim-neotest/neotest-plenary",
"rouge8/neotest-rust", "rouge8/neotest-rust",
"nvim-neotest/neotest-vim-test", -- vim-test plugin for neotest "nvim-neotest/neotest-vim-test", -- vim-test plugin for neotest
@ -56,7 +57,10 @@ return require("lazy").setup({
"https://codeberg.org/neovim-java/neovim-java-plugin-host", -- Host for Java plugins "https://codeberg.org/neovim-java/neovim-java-plugin-host", -- Host for Java plugins
-- Snippets -- Snippets
"L3MON4D3/LuaSnip", -- snippets support {
"L3MON4D3/LuaSnip",
build = "make install_jsregexp",
}, -- snippets support
"rafamadriz/friendly-snippets", -- Collection of snippets "rafamadriz/friendly-snippets", -- Collection of snippets
"saadparwaiz1/cmp_luasnip", -- cmp snippets support "saadparwaiz1/cmp_luasnip", -- cmp snippets support

View File

@ -47,6 +47,13 @@ cmp.setup({
fallback() fallback()
end end
end, { "i", "s" }), end, { "i", "s" }),
["<C-;>"] = cmp.mapping(function(fallback)
if luasnip.choice_active() then
luasnip.change_choice(1)
else
fallback()
end
end, { "i", "s" }),
}, },
sources = { sources = {
{ name = "nvim_lsp" }, { name = "nvim_lsp" },

View File

@ -36,7 +36,7 @@ require("formatter").setup({
require("formatter.filetypes.zig").zigfmt, require("formatter.filetypes.zig").zigfmt,
}, },
java = { java = {
require("formatter.filetypes.java").clangformat, require("esensar.lsp.formatters.clang-format-java"),
}, },
godot = { godot = {
require("esensar.lsp.formatters.gdformat"), require("esensar.lsp.formatters.gdformat"),

View File

@ -0,0 +1,10 @@
return function()
local java_clang_format = require("formatter.filetypes.java").clangformat()
for i = #java_clang_format.args, 1, -1 do
if java_clang_format.args[i]:find("--style", 1, true) == 1 then
table.remove(java_clang_format.args, i)
end
end
vim.list_extend(java_clang_format.args, { '--style="{BasedOnStyle: Google, IndentWidth: 4}"' })
return java_clang_format
end

View File

@ -23,18 +23,26 @@ local function is_in_config_home(bufname)
end end
function M.setup() function M.setup()
local installed_jdtls = { local installed_jdtls = {}
}
installed_jdtls.cmd = { "jdtls" } installed_jdtls.cmd = { "jdtls" }
require("jdtls").setup_dap({ hotcoredeplace = "auto" }) require("jdtls").setup_dap({ hotcoredeplace = "auto" })
local config = vim.tbl_extend("force", installed_jdtls, { local config = vim.tbl_deep_extend("force", installed_jdtls, {
flags = { flags = {
allow_incremental_sync = true, allow_incremental_sync = true,
}, },
on_attach = common_config.on_attach, on_attach = common_config.on_attach,
capabilities = {
textDocument = {
completion = {
completionItem = {
snippetSupport = true,
},
},
},
},
}) })
config.settings = { config.settings = {
java = { java = {

View File

@ -326,6 +326,9 @@ local java_project_config = {
["src/main/resources/*"] = { ["src/main/resources/*"] = {
type = "resource", type = "resource",
}, },
["src/main/resources/META-INF/MANIFEST.MF"] = {
type = "manifest",
},
["src/test/resources/*"] = { ["src/test/resources/*"] = {
type = "testresource", type = "testresource",
}, },
@ -380,6 +383,36 @@ local kotlin_project_config = {
}, },
} }
local maven_project_config = {
["*"] = {
start = "mvn package",
},
["pom.xml"] = {
type = "pom",
},
}
local gradle_project_config = {
["*"] = {
start = "./gradlew assemble",
},
["build.gradle"] = {
type = "build",
},
["build.gradle.kts"] = {
type = "build",
},
["settings.gradle"] = {
type = "settings",
},
["gradle.properties"] = {
type = "properties",
},
["local.properties"] = {
type = "localproperties",
},
}
local mint_config = { local mint_config = {
["*"] = { ["*"] = {
start = "mint start", start = "mint start",
@ -635,6 +668,8 @@ vim.g.projectionist_heuristics = {
["lua/"] = lua_vim_plugin_config, ["lua/"] = lua_vim_plugin_config,
["build.gradle|pom.xml"] = java_project_config, ["build.gradle|pom.xml"] = java_project_config,
["build.gradle|build.gradle.kts"] = kotlin_project_config, ["build.gradle|build.gradle.kts"] = kotlin_project_config,
["build.gradle|build.gradle.kts|settings.gradle"] = gradle_project_config,
["pom.xml"] = maven_project_config,
["mint.json"] = mint_config, ["mint.json"] = mint_config,
["shard.yml"] = crystal_config, ["shard.yml"] = crystal_config,
["Cargo.toml"] = rust_config, ["Cargo.toml"] = rust_config,

View File

@ -1,6 +1,27 @@
local luasnip = require("luasnip") local luasnip = require("luasnip")
local types = require("luasnip.util.types")
local s = luasnip.snippet local s = luasnip.snippet
local sn = luasnip.snippet_node
local f = luasnip.function_node local f = luasnip.function_node
local t = luasnip.text_node
local i = luasnip.insert_node
local c = luasnip.choice_node
local d = luasnip.dynamic_node
luasnip.config.setup({
ext_opts = {
[types.choiceNode] = {
active = {
virt_text = { { "", "GruvboxOrange" } },
},
},
[types.insertNode] = {
active = {
virt_text = { { "", "GruvboxBlue" } },
},
},
},
})
luasnip.add_snippets("all", { luasnip.add_snippets("all", {
s("date", { f(function(_, _) s("date", { f(function(_, _)
@ -17,4 +38,122 @@ luasnip.add_snippets("all", {
end) }), end) }),
}) })
-- Java snippets
local function jdocsnip(args, _, old_state)
-- !!! old_state is used to preserve user-input here. DON'T DO IT THAT WAY!
-- Using a restoreNode instead is much easier.
-- View this only as an example on how old_state functions.
local nodes = {
t({ "/**", " * " }),
i(1, "A short Description"),
t({ "", "" }),
}
-- These will be merged with the snippet; that way, should the snippet be updated,
-- some user input eg. text can be referred to in the new snippet.
local param_nodes = {}
if old_state then
nodes[2] = i(1, old_state.descr:get_text())
end
param_nodes.descr = nodes[2]
-- At least one param.
if string.find(args[2][1], ", ") then
vim.list_extend(nodes, { t({ " * ", "" }) })
end
local insert = 2
for _, arg in ipairs(vim.split(args[2][1], ", ", true)) do
-- Get actual name parameter.
arg = vim.split(arg, " ", true)[2]
if arg then
local inode
-- if there was some text in this parameter, use it as static_text for this new snippet.
if old_state and old_state[arg] then
inode = i(insert, old_state["arg" .. arg]:get_text())
else
inode = i(insert)
end
vim.list_extend(nodes, { t({ " * @param " .. arg .. " " }), inode, t({ "", "" }) })
param_nodes["arg" .. arg] = inode
insert = insert + 1
end
end
if args[1][1] ~= "void" then
local inode
if old_state and old_state.ret then
inode = i(insert, old_state.ret:get_text())
else
inode = i(insert)
end
vim.list_extend(nodes, { t({ " * ", " * @return " }), inode, t({ "", "" }) })
param_nodes.ret = inode
insert = insert + 1
end
if vim.tbl_count(args[3]) ~= 1 then
local exc = string.gsub(args[3][2], " throws ", "")
local ins
if old_state and old_state.ex then
ins = i(insert, old_state.ex:get_text())
else
ins = i(insert)
end
vim.list_extend(nodes, { t({ " * ", " * @throws " .. exc .. " " }), ins, t({ "", "" }) })
param_nodes.ex = ins
insert = insert + 1
end
vim.list_extend(nodes, { t({ " */" }) })
local snip = sn(nil, nodes)
-- Error on attempting overwrite.
snip.old_state = param_nodes
return snip
end
luasnip.add_snippets("java", {
-- Very long example for a java class.
s("fn", {
d(6, jdocsnip, { 2, 4, 5 }),
t({ "", "" }),
c(1, {
t("public "),
t("private "),
}),
c(2, {
t("void"),
t("String"),
t("char"),
t("int"),
t("double"),
t("boolean"),
i(nil, ""),
}),
t(" "),
i(3, "myFunc"),
t("("),
i(4),
t(")"),
c(5, {
t(""),
sn(nil, {
t({ "", " throws " }),
i(1),
}),
}),
t({ " {", "\t" }),
i(0),
t({ "", "}" }),
}),
}, {
key = "java",
})
require("luasnip.loaders.from_vscode").lazy_load() require("luasnip.loaders.from_vscode").lazy_load()
require("luasnip").filetype_extend("java", { "javadoc", "java-tests" })

View File

@ -10,6 +10,7 @@ assign [class="jetbrains-idea"] $ide_workspace
assign [class="libreoffice"] $note_workspace assign [class="libreoffice"] $note_workspace
assign [class="jetbrains-studio"] $ide_workspace assign [class="jetbrains-studio"] $ide_workspace
assign [class="jetbrains-rider"] $ide_workspace assign [class="jetbrains-rider"] $ide_workspace
assign [app_id="eclipse"] $ide_workspace
assign [class="octave-gui"] $ide_workspace assign [class="octave-gui"] $ide_workspace
assign [instance="vim"] $editor_workspace assign [instance="vim"] $editor_workspace
assign [instance="download"] $ongoing_operations assign [instance="download"] $ongoing_operations

View File

@ -1,4 +1,4 @@
direnv 2.32.1 direnv 2.34.0
nodejs 18.1.0 nodejs 18.1.0
python system python system
ruby 3.0.0 ruby 3.0.0