repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

add global cargo config

039bb7879f9e119f6c912a9fe3e5a37b6c740016

Oliver Krylow <o.krylow@isp-insoft.de> ·

unsigned

Browse filesCompare with HEAD

Changed files (9)

+206 / −170 text lines

Diff layout

EJ-PC-00363.symlinks

Modified

+3 / −0 text lines

4040subversion/config
4141~/AppData/Roaming/Subversion/config
43cargo/config.toml
44~/.cargo/config.toml

cargo/config.toml

Added
new file mode 100644

+18 / −0 text lines

1[build]
2# enable a cache for crates between builds
3rustc-wrapper = "sccache"
4# since we only care for builds for our own machine, let's benefit from thise juicy modern cpu features
5rustflags = [ "-C","target-cpu=native" ]
6
7# let's have some fun with "omgz performance rice dat cake"
8[profile.release]
9# link time optimization is slow, but allows inter-crate analysis
10lto = "fat"
11# similarly, crates get split into chunks while compiling in order to maximize throughput
12# but we don't care about compile wall time here, only RAWR PERFF
13# less chunks affors more opportunity for optimiziations
14codegen-units = 1
16[target.x86_64-pc-windows-msvc]
17# apparently, the LLVM linker is faster than others...
18linker = "lld-link.exe"

neovim/.stylua.toml

Deleted
deleted file mode 100644

+0 / −6 text lines

1column_width = 80
2line_endings = "Unix"
3indent_type = "Spaces"
4indent_width = 2
5quote_style = "AutoPreferSingle"
6no_call_parentheses = true

neovim/init.lua

Modified

+26 / −26 text lines

2121-- - highlights and groups => use plugin colorbuddy
2323-- import `dump` into the global namespace, so that we can use it in a running vim instance: `:lua dump(vim.fn)`
24_G.dump = require 'dump'
24_G.dump = require("dump")
2525-- import `syntax_stack` into global namespace. shows the highlight group under cursor
26_G.syntax_stack = require 'syntax_stack'
26_G.syntax_stack = require("syntax_stack")
2727-- Define some standard path locations where we will put stuff into.
2828-- `data` is for persistent data like logs, backups and file states.
2929-- `config` is for configuration code itself and plugins.
3030-- `cache` is for fleeting, temporary data.
31local data_path = vim.fn.stdpath 'data'
31local data_path = vim.fn.stdpath("data")
3232-- local config_path = vim.fn.stdpath 'config'
3333-- local cache_path = vim.fn.stdpath 'cache'
35local autocommand = require 'autocommand'
35local autocommand = require("autocommand")
3737-- My cheatsheet is an initial buffer (if none was specified) where I put stuff to remember/learn.
3838-- Keybinds, commands, todos are all fair game.
39local cheatsheet, setup_cheatsheet = require 'cheatsheet'()
39local cheatsheet, setup_cheatsheet = require("cheatsheet")()
4040-- make cheatsheet globally available for easy access in plugins configurations blocks of packer
4141_G.cheatsheet = cheatsheet
42cheatsheet ''
43cheatsheet 'Stuff for bugabinga to remember about NeoVim'
44cheatsheet ''
45local settings = require 'general_editor_settings'
42cheatsheet("")
43cheatsheet("Stuff for bugabinga to remember about NeoVim")
44cheatsheet("")
45local settings = require("general_editor_settings")
4646settings(autocommand, data_path)
4747-- when started with '--headless', there will be no attached UIs
4848local non_interactive = #vim.api.nvim_list_uis() == 0
4949-- Put the plugins module into the global scope, so that it can be used more easily in commands
50_G.plugins = require 'plugins'(autocommand, data_path, non_interactive)
50_G.plugins = require("plugins")(autocommand, data_path, non_interactive)
5151-- setup my own keybindings
52require 'keybinds'(cheatsheet)
52require("keybinds")(cheatsheet)
5454-- some file specific settings
55require 'filetype.yaml'(autocommand)
56require 'filetype.ansi_c'(autocommand)
57local _, setup_mkdir = require 'mkdir'()
55require("filetype.yaml")(autocommand)
56require("filetype.ansi_c")(autocommand)
57local _, setup_mkdir = require("mkdir")()
5858setup_mkdir(autocommand)
6060-- Commands have no nvim API yet, so we use vimscript...
61cheatsheet ':WhatHighlight => This command shows the highlight group under the cursor'
62vim.cmd [[command! WhatHighlight lua syntax_stack()]]
63cheatsheet ':TSHighlightCapturesUnderCursor => This command shows the highlight group under the cursor, when TreeSitter is used'
61cheatsheet(":WhatHighlight => This command shows the highlight group under the cursor")
62vim.cmd([[command! WhatHighlight lua syntax_stack()]])
63cheatsheet(":TSHighlightCapturesUnderCursor => This command shows the highlight group under the cursor, when TreeSitter is used")
6565-- Lazy load the plugin manager packer, when using these commands
6666-- cheatsheet':PluginsInstall => Install the specified plugins if they are not already installed'
67vim.cmd [[command! PluginsInstall packadd packer.nvim | lua plugins.install()]]
67vim.cmd([[command! PluginsInstall packadd packer.nvim | lua plugins.install()]])
6969-- cheatsheet':PluginsUpdate => Update the specified plugins, installing any that are missing'
70vim.cmd [[command! PluginsUpdate packadd packer.nvim | lua plugins.update()]]
70vim.cmd([[command! PluginsUpdate packadd packer.nvim | lua plugins.update()]])
72cheatsheet ':PluginsSync => Perform a clean followed by an update'
73vim.cmd [[command! PluginsSync packadd packer.nvim | lua plugins.sync()]]
72cheatsheet(":PluginsSync => Perform a clean followed by an update")
73vim.cmd([[command! PluginsSync packadd packer.nvim | lua plugins.sync()]])
7575-- cheatsheet':PluginsClean => Remove any disabled or no longer managed plugins'
76vim.cmd [[command! PluginsClean packadd packer.nvim | lua plugins.clean()]]
76vim.cmd([[command! PluginsClean packadd packer.nvim | lua plugins.clean()]])
7878-- cheatsheet':PluginsCompile => Compile lazy-loader code and save to path'
79vim.cmd [[command! PluginsCompile packadd packer.nvim | lua plugins.compile()]]
79vim.cmd([[command! PluginsCompile packadd packer.nvim | lua plugins.compile()]])
81cheatsheet ':PluginsProfile => Show the measured startup times of plugins'
82vim.cmd [[command! PluginsProfile packadd packer.nvim | lua plugins.profile_output()]]
81cheatsheet(":PluginsProfile => Show the measured startup times of plugins")
82vim.cmd([[command! PluginsProfile packadd packer.nvim | lua plugins.profile_output()]])
84vim.cmd [[command! PluginsStatus packadd packer.nvim | lua plugins.status()]]
84vim.cmd([[command! PluginsStatus packadd packer.nvim | lua plugins.status()]])
8686-- Should be the last call
8787setup_cheatsheet()

neovim/lua/general_editor_settings.lua

Modified

+132 / −130 text lines

11-- This function sets up neovim with general configuration options.
22-- "General" means, valid for all use-cases, file types etc.
33return function(autocommand, data_path)
4 -- Setting the width of the tab character to 2
5 local tab_size = 2
6 vim.opt.tabstop = tab_size
7 vim.opt.shiftwidth = tab_size
8 vim.opt.softtabstop = tab_size
9 -- convert tabs to spaces
10 vim.opt.expandtab = true
11 -- Keep indentation of new lines in line with previuos lines
12 vim.opt.autoindent = true
13 vim.opt.copyindent = true
14 vim.opt.smartindent = true
15 -- Do not display the cursorposition, since it can be shown when necesary 'g <C-G>'
16 vim.opt.ruler = false
17 -- How many milliseconds must pass before neovim decides I was "idle"
18 vim.opt.updatetime = 250
19 -- How long to wait between key sequences in order to chain them. e.g. <LEADER>b
20 vim.opt.timeoutlen = 350
21 -- I do not care for folding
22 vim.opt.foldenable = false
23 vim.opt.cursorline = true
24 -- Highlight the cursor line in the current buffer
25 autocommand {
26 show_cursor_line_in_active_window = {
27 [[WinLeave * lua vim.opt.cursorline = false]],
28 [[WinEnter * lua vim.opt.cursorline = true]],
29 [[InsertEnter * lua vim.opt.cursorline = false]],
30 [[InsertLeave * lua vim.opt.cursorline = true]],
31 },
32 }
33 -- integrate Powershell Core with nvim
34 vim.opt.shell = 'powershell'
35 vim.opt.shellquote = ''
36 vim.opt.shellxquote = ''
37 vim.opt.shellcmdflag = '-NoLogo -NoProfile -NonInteractive -ExecutionPolicy RemoteSigned -Command'
38 vim.opt.shellredir = '| Out-File -Encoding UTF8'
39 vim.opt.shellpipe = '| Out-File -Encoding UTF8'
40 -- insert whitespace type based on whitespace on previous line
41 vim.opt.smarttab = true
42 vim.opt.hlsearch = true
43 vim.opt.ignorecase = true
44 vim.opt.smartcase = true
45 vim.opt.incsearch = true
46 vim.opt.showmatch = true
47 vim.opt.hidden = true
48 -- Show the effects of substitutions incrementally
49 vim.opt.inccommand = 'nosplit'
50 -- enable mouse support, in a terminal app... i know crazy...
51 vim.opt.mouse = 'a'
52 -- use ripgrep instead of grep
53 vim.opt.grepprg = 'rg --vimgrep --no-heading --smart-case'
54 vim.opt.grepformat = '%f:%1:%c:%m'
55 -- Show certain whitespace characters
56 vim.opt.listchars = { tab='⯈ ',trail=' ',nbsp='␠',extends='⋯',precedes='⋯',space='⸱' }
57 vim.opt.scrolloff = 3
58 -- make navigation from start of line to end of previous line more natural
59 vim.opt.whichwrap:append('<>hl')
60 -- do not spam the cmdline with every little input
61 vim.opt.showcmd = false
62 vim.opt.wildmode = 'list:longest'
63 -- Set the current working directory to the parent of the active buffer
64 vim.opt.autochdir = true
65 -- Keep track of file changes outside of vim
66 vim.opt.autoread = true
67 -- Make backups of all touched files in a special directory
68 vim.opt.backup = true
69 vim.opt.writebackup = true
70 vim.opt.backupcopy = 'auto'
71 -- The magic slash at the end is important.
72 -- It tells vim to use the absolute path in encoded form as the backup file
73 -- name.
74 vim.opt.backupdir = data_path .. '/backup/'
75 if vim.fn.empty(vim.fn.glob(vim.o.backupdir)) > 0 then
76 vim.fn.mkdir(vim.o.backupdir, 'p')
77 end
78 autocommand {
79 backup_timestamp = [[BufWritePre * lua vim.opt.backupext = '@' .. vim.fn.strftime("%F.%H:%M") .. '.bak']],
80 }
81 -- set global swap directory, so that swap files do not pollute my workspace
82 vim.opt.directory = data_path .. '/swap/'
83 -- persit undo states across vim restarts
84 vim.opt.undofile = true
85 vim.opt.undodir = data_path .. '/undo/'
86 -- ask me to force failed commands
87 vim.opt.confirm = true
88 vim.opt.completeopt = {'menuone', 'noinsert', 'noselect'}
89 -- avoid showing messages during automomplete
90 vim.opt.shortmess:append('c')
91 -- open splits below and to the right of current buffers
92 vim.opt.splitbelow = true
93 vim.opt.splitright = true
94 -- always show the signcolumn, because i don't like jumpy UIs
95 vim.opt.signcolumn = 'yes'
96 -- Use true colors
97 vim.opt.termguicolors = true
98 vim.opt.lazyredraw = true
99 vim.opt.guifont = 'BlexMono NF:h13:1'
100 -- Set cursor position to last known position, when entering a window
101 autocommand {
102 restore_cursor_position = [[ BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal! g`\"" | endif ]],
103 }
104 -- Automatically enter and leave insert mode when opening/closing terminal buffers.
105 autocommand {
106 auto_enter_insert_on_terminal = {
107 [[TermOpen,TermEnter * startinsert]],
108 [[TermClose,TermLeave * stopinsert]],
109 },
110 }
111 -- briefly highlight yanked text
112 autocommand {
113 highlight_yanked_text = [[TextYankPost * silent! lua vim.highlight.on_yank()]],
114 }
115 -- Disable some built-in plugins we don't want
116 local disabled_built_ins = {
117 'gzip',
118 'man',
119 'matchit',
120 'matchparen',
121 'shada_plugin',
122 'tar',
123 'tarPlugin',
124 'zip',
125 'zipPlugin',
126 'netrw',
127 'netrwPlugin',
128 'spec',
129 '2html_plugin',
130 }
131 for _, built_in in ipairs(disabled_built_ins) do
132 vim.g['loaded_' .. built_in] = 1
133 end
4 -- Setting the width of the tab character to 2
5 local tab_size = 2
6 vim.opt.tabstop = tab_size
7 vim.opt.shiftwidth = tab_size
8 vim.opt.softtabstop = tab_size
9 -- convert tabs to spaces
10 vim.opt.expandtab = true
11 -- Keep indentation of new lines in line with previuos lines
12 vim.opt.autoindent = true
13 vim.opt.copyindent = true
14 vim.opt.smartindent = true
15 -- Do not display the cursorposition, since it can be shown when necesary 'g <C-G>'
16 vim.opt.ruler = false
17 -- How many milliseconds must pass before neovim decides I was "idle"
18 vim.opt.updatetime = 250
19 -- How long to wait between key sequences in order to chain them. e.g. <LEADER>b
20 vim.opt.timeoutlen = 350
21 -- I do not care for folding
22 vim.opt.foldenable = false
23 vim.opt.cursorline = true
24 -- Highlight the cursor line in the current buffer
25 autocommand({
26 show_cursor_line_in_active_window = {
27 [[WinLeave * lua vim.opt.cursorline = false]],
28 [[WinEnter * lua vim.opt.cursorline = true]],
29 [[InsertEnter * lua vim.opt.cursorline = false]],
30 [[InsertLeave * lua vim.opt.cursorline = true]],
31 },
32 })
33 -- integrate Nushell with nvim
34 -- all nushell builtins (ls, sys, etc.) print their output with escape codes, which nvim cannot parse.
35 -- only time will tell if this will annoy me so much as to change it...
36 vim.opt.shell = "nu"
37 vim.opt.shellcmdflag = "--no-history --commands"
38 vim.opt.shellpipe = "| save %s"
39 vim.opt.shellredir = "| save %s"
40 vim.opt.shellquote = ""
41 vim.opt.shellxquote = ""
42 -- insert whitespace type based on whitespace on previous line
43 vim.opt.smarttab = true
44 vim.opt.hlsearch = true
45 vim.opt.ignorecase = true
46 vim.opt.smartcase = true
47 vim.opt.incsearch = true
48 vim.opt.showmatch = true
49 vim.opt.hidden = true
50 -- Show the effects of substitutions incrementally
51 vim.opt.inccommand = "nosplit"
52 -- enable mouse support, in a terminal app... i know crazy...
53 vim.opt.mouse = "a"
54 -- use ripgrep instead of grep
55 vim.opt.grepprg = "rg --vimgrep --no-heading --smart-case"
56 vim.opt.grepformat = "%f:%1:%c:%m"
57 -- Show certain whitespace characters
58 vim.opt.listchars = { tab = "⯈ ", trail = " ", nbsp = "␠", extends = "⋯", precedes = "⋯", space = "⸱" }
59 vim.opt.scrolloff = 3
60 -- make navigation from start of line to end of previous line more natural
61 vim.opt.whichwrap:append("<>hl")
62 -- do not spam the cmdline with every little input
63 vim.opt.showcmd = false
64 vim.opt.wildmode = "list:longest"
65 -- Set the current working directory to the parent of the active buffer
66 vim.opt.autochdir = true
67 -- Keep track of file changes outside of vim
68 vim.opt.autoread = true
69 -- Make backups of all touched files in a special directory
70 vim.opt.backup = true
71 vim.opt.writebackup = true
72 vim.opt.backupcopy = "auto"
73 -- The magic slash at the end is important.
74 -- It tells vim to use the absolute path in encoded form as the backup file
75 -- name.
76 vim.opt.backupdir = data_path .. "/backup/"
77 if vim.fn.empty(vim.fn.glob(vim.o.backupdir)) > 0 then
78 vim.fn.mkdir(vim.o.backupdir, "p")
79 end
80 autocommand({
81 backup_timestamp = [[BufWritePre * lua vim.opt.backupext = '@' .. vim.fn.strftime("%F.%H:%M") .. '.bak']],
82 })
83 -- set global swap directory, so that swap files do not pollute my workspace
84 vim.opt.directory = data_path .. "/swap/"
85 -- persit undo states across vim restarts
86 vim.opt.undofile = true
87 vim.opt.undodir = data_path .. "/undo/"
88 -- ask me to force failed commands
89 vim.opt.confirm = true
90 vim.opt.completeopt = { "menuone", "noinsert", "noselect" }
91 -- avoid showing messages during automomplete
92 vim.opt.shortmess:append("c")
93 -- open splits below and to the right of current buffers
94 vim.opt.splitbelow = true
95 vim.opt.splitright = true
96 -- always show the signcolumn, because i don't like jumpy UIs
97 vim.opt.signcolumn = "yes"
98 -- Use true colors
99 vim.opt.termguicolors = true
100 vim.opt.lazyredraw = true
101 vim.opt.guifont = "BlexMono NF:h13:1"
102 -- Set cursor position to last known position, when entering a window
103 autocommand({
104 restore_cursor_position = [[ BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal! g`\"" | endif ]],
105 })
106 -- Automatically enter and leave insert mode when opening/closing terminal buffers.
107 autocommand({
108 auto_enter_insert_on_terminal = {
109 [[TermOpen,TermEnter * startinsert]],
110 [[TermClose,TermLeave * stopinsert]],
111 },
112 })
113 -- briefly highlight yanked text
114 autocommand({
115 highlight_yanked_text = [[TextYankPost * silent! lua vim.highlight.on_yank()]],
116 })
117 -- Disable some built-in plugins we don't want
118 local disabled_built_ins = {
119 "gzip",
120 "man",
121 "matchit",
122 "matchparen",
123 "shada_plugin",
124 "tar",
125 "tarPlugin",
126 "zip",
127 "zipPlugin",
128 "netrw",
129 "netrwPlugin",
130 "spec",
131 "2html_plugin",
132 }
133 for _, built_in in ipairs(disabled_built_ins) do
134 vim.g["loaded_" .. built_in] = 1
135 end
134136end

neovim/lua/lsp.lua

Modified

+2 / −2 text lines

2525 if client.resolved_capabilities.document_formatting then
2626 autocommand({
27 format_on_save = [[ BufWritePost <buffer> vim.lsp.buf.formatting() ]],
27 format_on_save = [[ BufWritePost <buffer> lua vim.lsp.buf.formatting() ]],
2828 })
2929 end
158158 -- Null-ls
159159 local nls = require("null-ls")
160160 nls.setup({
161 debug = true,
161 debug = false,
162162 sources = {
163163 nls.builtins.formatting.stylua.with({
164164 args = { "-s", "$FILENAME" },

neovim/lua/plugins.lua

Modified

+1 / −2 text lines

7979 requires = {
8080 {'kyazdani42/nvim-web-devicons', opt = true},
8181 -- pathes in some highlighting groups for LSP diagnostics
82 -- FIXME should just be done by my theme istead of this plugin...
82 -- FIXME should just be done by my theme instead of this plugin...
8383 { 'folke/lsp-colors.nvim' }},
8484 config = function()
8585 require 'trouble'.setup()
104104 -- Advanced parsers for better syntax highlighting
105105 use {
106106 'nvim-treesitter/nvim-treesitter',
107 run = ':TSUpdateSync',
108107 config = function()
109108 require'nvim-treesitter.install'.compilers = {"clang"}
110109 require'nvim-treesitter.configs'.setup{

nushell/nu/config/nurc

Modified

+10 / −1 text lines

2424# FUNCTIONS
26def man [
27 program: string
28] {
29 if (sys).host.name == "Windows" {
30 start (build-string https://man.cx/ $program)
31 } {
32 exec man
33 }
34}
2636# Search the given query on the web with the default browser in DuckDuckGo.
2737def web [
2838 query:string # The search query
4353 fzf $options $layout $color $preview $rest
4756# Show or add to bugabingas TODO file.
4857def todo [
4958 --edit (-e) # Edit the todo file in $EDITOR

starship/starship.toml

Modified

+14 / −3 text lines

11[character]
2success_symbol = '[∙](bold fg:#c0c3c1)'
3error_symbol = '[×](bold fg:#ea1129)'
2success_symbol = ' (dimmed green)'
3# does not work yet in nushell
4error_symbol = ' (dimmed red)'
56[directory]
67style = 'bold purple'
7truncation_symbol = '⋯/'
8truncation_symbol = '⋯ /'
89home_symbol = '∽'
910truncation_length = 5
1213style = 'yellow dimmed'
1415[git_status]
16# too slow
1517disabled = true
19[package]
20style = "dimmed cyan"
22[rust]
23style = "dimmed cyan"
25[zig]
26style = "dimmed yellow"
1728[memory_usage]
1829disabled = false
1930format = "$symbol $ram_pct ($style)"