add global cargo config
039bb7879f9e119f6c912a9fe3e5a37b6c740016
Oliver Krylow <o.krylow@isp-insoft.de> ·
unsigned
- Parent 1: 617144e18749
bugabingas dorkfiles
039bb7879f9e119f6c912a9fe3e5a37b6c740016
Oliver Krylow <o.krylow@isp-insoft.de> ·
unsigned
+206 / −170 text lines
+3 / −0 text lines
new file mode 100644+18 / −0 text lines
[build]# enable a cache for crates between buildsrustc-wrapper = "sccache"# since we only care for builds for our own machine, let's benefit from thise juicy modern cpu featuresrustflags = [ "-C","target-cpu=native" ]# let's have some fun with "omgz performance rice dat cake"[profile.release]# link time optimization is slow, but allows inter-crate analysislto = "fat"# similarly, crates get split into chunks while compiling in order to maximize throughput# but we don't care about compile wall time here, only RAWR PERFF# less chunks affors more opportunity for optimiziationscodegen-units = 1[target.x86_64-pc-windows-msvc]# apparently, the LLVM linker is faster than others...linker = "lld-link.exe"deleted file mode 100644+0 / −6 text lines
+26 / −26 text lines
-- import `dump` into the global namespace, so that we can use it in a running vim instance: `:lua dump(vim.fn)`-- My cheatsheet is an initial buffer (if none was specified) where I put stuff to remember/learn.local cheatsheet, setup_cheatsheet = require 'cheatsheet'()local cheatsheet, setup_cheatsheet = require("cheatsheet")()-- make cheatsheet globally available for easy access in plugins configurations blocks of packer_G.plugins = require 'plugins'(autocommand, data_path, non_interactive)_G.plugins = require("plugins")(autocommand, data_path, non_interactive)-- cheatsheet':PluginsInstall => Install the specified plugins if they are not already installed'vim.cmd [[command! PluginsInstall packadd packer.nvim | lua plugins.install()]]vim.cmd([[command! PluginsInstall packadd packer.nvim | lua plugins.install()]])vim.cmd [[command! PluginsUpdate packadd packer.nvim | lua plugins.update()]]vim.cmd([[command! PluginsUpdate packadd packer.nvim | lua plugins.update()]])vim.cmd [[command! PluginsClean packadd packer.nvim | lua plugins.clean()]]vim.cmd([[command! PluginsClean packadd packer.nvim | lua plugins.clean()]])vim.cmd [[command! PluginsCompile packadd packer.nvim | lua plugins.compile()]]vim.cmd([[command! PluginsCompile packadd packer.nvim | lua plugins.compile()]])+132 / −130 text lines
-- Setting the width of the tab character to 2 local tab_size = 2 vim.opt.tabstop = tab_size vim.opt.shiftwidth = tab_size vim.opt.softtabstop = tab_size -- convert tabs to spaces vim.opt.expandtab = true -- Keep indentation of new lines in line with previuos lines vim.opt.autoindent = true vim.opt.copyindent = true vim.opt.smartindent = true -- Do not display the cursorposition, since it can be shown when necesary 'g <C-G>' vim.opt.ruler = false -- How many milliseconds must pass before neovim decides I was "idle" vim.opt.updatetime = 250 -- How long to wait between key sequences in order to chain them. e.g. <LEADER>b vim.opt.timeoutlen = 350 -- I do not care for folding vim.opt.foldenable = false vim.opt.cursorline = true -- Highlight the cursor line in the current buffer autocommand { show_cursor_line_in_active_window = { [[WinLeave * lua vim.opt.cursorline = false]], [[WinEnter * lua vim.opt.cursorline = true]], [[InsertEnter * lua vim.opt.cursorline = false]], [[InsertLeave * lua vim.opt.cursorline = true]], }, } -- integrate Powershell Core with nvim vim.opt.shell = 'powershell' vim.opt.shellquote = '' vim.opt.shellxquote = '' vim.opt.shellcmdflag = '-NoLogo -NoProfile -NonInteractive -ExecutionPolicy RemoteSigned -Command' vim.opt.shellredir = '| Out-File -Encoding UTF8' vim.opt.shellpipe = '| Out-File -Encoding UTF8' -- insert whitespace type based on whitespace on previous line vim.opt.smarttab = true vim.opt.hlsearch = true vim.opt.ignorecase = true vim.opt.smartcase = true vim.opt.incsearch = true vim.opt.showmatch = true vim.opt.hidden = true -- Show the effects of substitutions incrementally vim.opt.inccommand = 'nosplit' -- enable mouse support, in a terminal app... i know crazy... vim.opt.mouse = 'a' -- use ripgrep instead of grep vim.opt.grepprg = 'rg --vimgrep --no-heading --smart-case' vim.opt.grepformat = '%f:%1:%c:%m' -- Show certain whitespace characters vim.opt.listchars = { tab='⯈ ',trail=' ',nbsp='␠',extends='⋯',precedes='⋯',space='⸱' } vim.opt.scrolloff = 3 -- make navigation from start of line to end of previous line more natural vim.opt.whichwrap:append('<>hl') -- do not spam the cmdline with every little input vim.opt.showcmd = false vim.opt.wildmode = 'list:longest' -- Set the current working directory to the parent of the active buffer vim.opt.autochdir = true -- Keep track of file changes outside of vim vim.opt.autoread = true -- Make backups of all touched files in a special directory vim.opt.backup = true vim.opt.writebackup = true vim.opt.backupcopy = 'auto' -- The magic slash at the end is important. -- It tells vim to use the absolute path in encoded form as the backup file -- name. vim.opt.backupdir = data_path .. '/backup/' if vim.fn.empty(vim.fn.glob(vim.o.backupdir)) > 0 then vim.fn.mkdir(vim.o.backupdir, 'p') end autocommand { backup_timestamp = [[BufWritePre * lua vim.opt.backupext = '@' .. vim.fn.strftime("%F.%H:%M") .. '.bak']], } -- set global swap directory, so that swap files do not pollute my workspace vim.opt.directory = data_path .. '/swap/' -- persit undo states across vim restarts vim.opt.undofile = true vim.opt.undodir = data_path .. '/undo/' -- ask me to force failed commands vim.opt.confirm = true vim.opt.completeopt = {'menuone', 'noinsert', 'noselect'} -- avoid showing messages during automomplete vim.opt.shortmess:append('c') -- open splits below and to the right of current buffers vim.opt.splitbelow = true vim.opt.splitright = true -- always show the signcolumn, because i don't like jumpy UIs vim.opt.signcolumn = 'yes' -- Use true colors vim.opt.termguicolors = true vim.opt.lazyredraw = true vim.opt.guifont = 'BlexMono NF:h13:1' -- Set cursor position to last known position, when entering a window autocommand { restore_cursor_position = [[ BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal! g`\"" | endif ]], } -- Automatically enter and leave insert mode when opening/closing terminal buffers. autocommand { auto_enter_insert_on_terminal = { [[TermOpen,TermEnter * startinsert]], [[TermClose,TermLeave * stopinsert]], }, } -- briefly highlight yanked text autocommand { highlight_yanked_text = [[TextYankPost * silent! lua vim.highlight.on_yank()]], } -- Disable some built-in plugins we don't want local disabled_built_ins = { 'gzip', 'man', 'matchit', 'matchparen', 'shada_plugin', 'tar', 'tarPlugin', 'zip', 'zipPlugin', 'netrw', 'netrwPlugin', 'spec', '2html_plugin', } for _, built_in in ipairs(disabled_built_ins) do vim.g['loaded_' .. built_in] = 1 end -- Setting the width of the tab character to 2 local tab_size = 2 vim.opt.tabstop = tab_size vim.opt.shiftwidth = tab_size vim.opt.softtabstop = tab_size -- convert tabs to spaces vim.opt.expandtab = true -- Keep indentation of new lines in line with previuos lines vim.opt.autoindent = true vim.opt.copyindent = true vim.opt.smartindent = true -- Do not display the cursorposition, since it can be shown when necesary 'g <C-G>' vim.opt.ruler = false -- How many milliseconds must pass before neovim decides I was "idle" vim.opt.updatetime = 250 -- How long to wait between key sequences in order to chain them. e.g. <LEADER>b vim.opt.timeoutlen = 350 -- I do not care for folding vim.opt.foldenable = false vim.opt.cursorline = true -- Highlight the cursor line in the current buffer autocommand({ show_cursor_line_in_active_window = { [[WinLeave * lua vim.opt.cursorline = false]], [[WinEnter * lua vim.opt.cursorline = true]], [[InsertEnter * lua vim.opt.cursorline = false]], [[InsertLeave * lua vim.opt.cursorline = true]], }, }) -- integrate Nushell with nvim -- all nushell builtins (ls, sys, etc.) print their output with escape codes, which nvim cannot parse. -- only time will tell if this will annoy me so much as to change it... vim.opt.shell = "nu" vim.opt.shellcmdflag = "--no-history --commands" vim.opt.shellpipe = "| save %s" vim.opt.shellredir = "| save %s" vim.opt.shellquote = "" vim.opt.shellxquote = "" -- insert whitespace type based on whitespace on previous line vim.opt.smarttab = true vim.opt.hlsearch = true vim.opt.ignorecase = true vim.opt.smartcase = true vim.opt.incsearch = true vim.opt.showmatch = true vim.opt.hidden = true -- Show the effects of substitutions incrementally vim.opt.inccommand = "nosplit" -- enable mouse support, in a terminal app... i know crazy... vim.opt.mouse = "a" -- use ripgrep instead of grep vim.opt.grepprg = "rg --vimgrep --no-heading --smart-case" vim.opt.grepformat = "%f:%1:%c:%m" -- Show certain whitespace characters vim.opt.listchars = { tab = "⯈ ", trail = " ", nbsp = "␠", extends = "⋯", precedes = "⋯", space = "⸱" } vim.opt.scrolloff = 3 -- make navigation from start of line to end of previous line more natural vim.opt.whichwrap:append("<>hl") -- do not spam the cmdline with every little input vim.opt.showcmd = false vim.opt.wildmode = "list:longest" -- Set the current working directory to the parent of the active buffer vim.opt.autochdir = true -- Keep track of file changes outside of vim vim.opt.autoread = true -- Make backups of all touched files in a special directory vim.opt.backup = true vim.opt.writebackup = true vim.opt.backupcopy = "auto" -- The magic slash at the end is important. -- It tells vim to use the absolute path in encoded form as the backup file -- name. vim.opt.backupdir = data_path .. "/backup/" if vim.fn.empty(vim.fn.glob(vim.o.backupdir)) > 0 then vim.fn.mkdir(vim.o.backupdir, "p") end autocommand({ backup_timestamp = [[BufWritePre * lua vim.opt.backupext = '@' .. vim.fn.strftime("%F.%H:%M") .. '.bak']], }) -- set global swap directory, so that swap files do not pollute my workspace vim.opt.directory = data_path .. "/swap/" -- persit undo states across vim restarts vim.opt.undofile = true vim.opt.undodir = data_path .. "/undo/" -- ask me to force failed commands vim.opt.confirm = true vim.opt.completeopt = { "menuone", "noinsert", "noselect" } -- avoid showing messages during automomplete vim.opt.shortmess:append("c") -- open splits below and to the right of current buffers vim.opt.splitbelow = true vim.opt.splitright = true -- always show the signcolumn, because i don't like jumpy UIs vim.opt.signcolumn = "yes" -- Use true colors vim.opt.termguicolors = true vim.opt.lazyredraw = true vim.opt.guifont = "BlexMono NF:h13:1" -- Set cursor position to last known position, when entering a window autocommand({ restore_cursor_position = [[ BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal! g`\"" | endif ]], }) -- Automatically enter and leave insert mode when opening/closing terminal buffers. autocommand({ auto_enter_insert_on_terminal = { [[TermOpen,TermEnter * startinsert]], [[TermClose,TermLeave * stopinsert]], }, }) -- briefly highlight yanked text autocommand({ highlight_yanked_text = [[TextYankPost * silent! lua vim.highlight.on_yank()]], }) -- Disable some built-in plugins we don't want local disabled_built_ins = { "gzip", "man", "matchit", "matchparen", "shada_plugin", "tar", "tarPlugin", "zip", "zipPlugin", "netrw", "netrwPlugin", "spec", "2html_plugin", } for _, built_in in ipairs(disabled_built_ins) do vim.g["loaded_" .. built_in] = 1 end+2 / −2 text lines
+1 / −2 text lines
+10 / −1 text lines
+14 / −3 text lines