dotfiles
bugabingas dorkfiles
owned by bugabinga
fix: resolve symlink target relative to root dir
241c33f29029fbf9a49762ac984554b44d6557c1
Oliver Krylow <o.krylow@isp-insoft.de> ·
unsigned
Browse filesCompare with HEAD
Changed files (8)
36 36 - [ ] rewrite bootstripper and java commmands with zig. how to run them? precompile? zig run?
37 37 - [ ] encrypt box key
38 38 - [ ] disable syntax highlighting (treesitter) for inactive buffers and dim color
39 +- [ ] port commands from vim-eunuch:
43 +- [ ] LSP diagnostics only on BufWrite
44 +- [ ] easier too read colors for lsp hovers
bootstripper.java
Modified 11 11 var dorkfiles_root
= Path.of(arguments[
0]).toRealPath();
12 12 System.out.printf(
"Assuming dorkfiles root repo in %s.%n", emphasize_local(dorkfiles_root.toString()));
13 - decrypt_secrets(dorkfiles_root.resolve(
"secrets"));
13 + decrypt_secrets(dorkfiles_root.resolve(
"tresor"));
14 14 var hostname
= hostname();
15 15 System.out.printf(
"Hostname: %s%n", emphasize_global(hostname));
16 16 var symlinks_file
= hostname
+ ".symlinks";
17 - create_symlinks(dorkfiles_root.resolve(symlinks_file));
17 + create_symlinks(dorkfiles_root, dorkfiles_root.resolve(symlinks_file));
19 19 static void decrypt_secrets(
Path secrets_root) throws
Exception {
20 20 System.out.printf(
"%s:Decrypting files in %s folder.%n", emphasize_global(
"TODO"), emphasize_local(secrets_root.getFileName().toString()));
22 - static void create_symlinks(
Path symlinks_file) throws
Exception {
22 + static void create_symlinks(
Path root,
Path symlinks_file) throws
Exception {
23 23 System.out.printf(
"Creating symlinks as defined in %s file.%n", emphasize_local(symlinks_file.getFileName().toString()));
24 24 var lines
= Files.readAllLines(symlinks_file);
25 25 String source
= null;
29 29 if (source
== null) source
= line;
30 30 else if (target
== null) target
= line;
31 31 if(source
!= null && target
!= null){
32 - link(source, target);
32 + link(root, source, target);
38 - static void link(
String source,
String target) throws
Exception {
38 + static void link(
Path root,
String source,
String target) throws
Exception {
39 39 var home
= System.getProperty(
"user.home");
40 - var source_path
= Path.of(source.replace(
"~", home)).toAbsolutePath();
40 + var source_path
= root.resolve(source).toAbsolutePath();
41 41 var target_path
= Path.of(target.replace(
"~", home)).toAbsolutePath();
42 42 var is_directory
= Files.isDirectory(source_path);
43 43 if(
Files.exists(target_path,
LinkOption.
NOFOLLOW_LINKS)){
neovim/lua/plugins.lua
Modified 15 15 local packer_installation_path
= data_path
.. "/site/pack/" .. plugin_package
.. "/opt/packer.nvim" 16 16 if vim.fn.empty(vim.fn.glob(packer_installation_path))
== 1 then 17 17 vim.cmd(
'!git clone https://github.com/wbthomason/packer.nvim "' .. packer_installation_path
.. '"')
18 - vim.cmd(
'packadd packer')
18 + vim.cmd(
"packadd packer")
21 21 local init = function()
110 108 "nvim-treesitter/nvim-treesitter",
109 + requires = {
"nvim-treesitter/nvim-treesitter-refactor" },
111 110 config =
function()
112 111 require(
"nvim-treesitter.install").compilers
= {
"clang" }
113 112 require(
"nvim-treesitter.configs").setup({
114 - ensure_installed = {
"zig",
"java",
"rust",
"lua",
"toml",
"yaml",
"json",
"c" },
113 + ensure_installed = {
115 130 highlight = {
enable =
true },
116 131 incremental_selection = {
125 140 indent
= {
enable =
true },
126 141 query_linter
= {
enable =
true,
use_virtual_text =
true,
lint_events = {
"BufWrite" } },
143 + highlight_definitions = {
enable =
true },
144 + smart_rename = {
enable =
true,
keymaps = {
smart_rename =
"<LEADER>r" } },
145 + navigation = {
enable =
true,
keymaps = {
goto_next_usage =
"<a-.>",
goto_previous_usage =
"<a-,>" } },
neovim/lua/statusline.lua
Modified 1 1 local branch_icon
= "" 2 2 local vcs_branch_name
= "" 3 +local code_actions_count
= 0 3 4 local special_windows
= {
4 5 intro = {
"CheatSheet",
"" },
5 6 NvimTree = {
"Files",
"" },
6 7 packer = {
"Plugins",
"" },
7 8 help = {
"Help",
"龎" },
8 - [
""] = {
"no name",
"" },
9 + [
""] = {
"unknown file type",
"" },
10 11 local lsp_symbols
= {
Error =
"",
Information =
"",
Warning =
"",
Hint =
"" }
25 + update_code_actions_count =
function()
26 + local diagnostics_line_context
= {
diagnostics = vim.lsp.diagnostic.get_line_diagnostics() }
27 + local lsp_parameters
= vim.lsp.util.make_range_params()
28 + lsp_parameters.context
= diagnostics_line_context
29 + vim.lsp.buf_request(
0,
"textDocument/codeAction", lsp_parameters,
function(error, _, result)
30 + if not error and result
then 31 + code_actions_count
= #result
33 + code_actions_count
= 0 26 39 update_statuslines =
function()
84 97 local modifiable
= vim.bo.modifiable
and " " or "" 85 98 local diagnostics
= get_lsp_diagnostics_count()
87 - local vcs_info
= vcs_branch_name
and (
"%#LineNr#%=" .. branch_icon
.. " " .. vcs_branch_name)
or nil 100 + local vcs_info
= vcs_branch_name
and (
"%#LineNr#%=" .. branch_icon
.. " " .. vcs_branch_name)
or nil 89 102 local statusline
= "%#Statusline" 90 103 .. (active
and "" or "NC")
97 110 .. (active
and (diagnostics
~= "" and " " .. diagnostics
.. " " or " ")
or " ")
111 + .. (code_actions_count
~= 0 and (
"%#Title#" .. " " .. code_actions_count
.. " ﯦ")
or "")
98 112 .. (active
and vcs_info
or "")
100 114 return statusline
103 117 setup = function(autocommand)
105 - update_statuslines =
"BufEnter,WinEnter,BufWinEnter,BufReadPost * lua require'statusline'.update_statuslines()",
107 120 update_vcs_branch_name =
"BufEnter,WinEnter,BufWinEnter,BufReadPost * lua require'statusline'.update_vcs_branch_name()",
121 + update_code_actions_count =
"CursorHold,CursorHoldI * lua require'statusline'.update_code_actions_count()",
122 + update_statuslines =
"CursorHold,CursorHoldI,BufEnter,WinEnter,BufWinEnter,BufReadPost * lua require'statusline'.update_statuslines()",
31 -starship/starship.toml
31 +starship/starship.toml.pop-os
32 32 ~/.config/starship.toml
34 34 topgrade/topgrade.linux.toml
starship/starship.toml.EJ-PC-00363
Modified 9 9 truncation_symbol = '⋯ /'
11 11 truncation_length = 5
14 -style = 'yellow dimmed'
15 +style = 'dimmed yellow'
21 26 style = "dimmed cyan"
24 30 style = "dimmed cyan"
27 33 style = "dimmed yellow"
36 +style = "dimmed blue"
31 41 format = "$symbol $ram_pct ($style)"
starship/starship.toml.pop-os
Addednew file mode 100644 3 +success_symbol = ' (dimmed green)'
4 +# does not work yet in nushell
5 +error_symbol = ' (dimmed red)'
9 +truncation_symbol = '⋯ /'
11 +truncation_length = 5
15 +style = 'dimmed yellow'
26 +style = "dimmed cyan"
30 +style = "dimmed cyan"
33 +style = "dimmed yellow"
36 +style = "dimmed blue"
41 +format = "$symbol $ram_pct ($style)"
44 +style = "dimmed gray"
starship/starship.toml.x230
Modified 7 -discharging_symbol = "- "
8 -charging_symbol = "+ "
3 +success_symbol = ' (dimmed green)'
4 +# does not work yet in nushell
5 +error_symbol = ' (dimmed red)'
16 -truncation_length = 5
17 8 style = 'bold purple'
9 +truncation_symbol = '⋯ /'
11 +truncation_length = 5
20 -style = 'yellow dimmed'
15 +style = 'dimmed yellow'
26 +style = "dimmed cyan"
30 +style = "dimmed cyan"
33 +style = "dimmed yellow"
36 +style = "dimmed blue"
27 41 format = "$symbol $ram_pct ($style)"
30 44 style = "dimmed gray"
48 +charging_symbol = "⚡️ "
49 +discharging_symbol = "💀 "