Merge branch 'trunk' of https://github.com/bugabinga/dotfiles into trunk
4a94b6f25f83c34931e38e81a56c6de8c94a58f2
Oliver Krylow <o.krylow@isp-insoft.de> ·
unsigned
- Parent 1: 0d891299a515 · Diff against parent 1
- Parent 2: 7338c83bff25 · Showing diff
bugabingas dorkfiles
4a94b6f25f83c34931e38e81a56c6de8c94a58f2
Oliver Krylow <o.krylow@isp-insoft.de> ·
unsigned
+959 / −902 text lines
+47 / −44 text lines
git/gitconfig~/.gitconfiggit/gitconfig.EJ-PC-00363~/.gitconfig.includetopgrade/topgrade.windows.toml~/AppData/Roaming/topgrade.tomlnushell~/AppData/Roaming/nushellbottom~/AppData/Roaming/bottomstackoverflow/so~/AppData/Roaming/Sam Tay/sosubversion/config.win32~/AppData/Roaming/Subversion/configsubversion/diff.bat~/AppData/Roaming/Subversion/diff.batsubversion/diff3.bat~/AppData/Roaming/Subversion/diff3.batsubversion/merge.bat~/AppData/Roaming/Subversion/merge.batcargo/config.toml~/scoop/persist/rustup/.cargo/config.tomlindexa/config.windows.toml~/AppData/Roaming/indexa/config.tomlwezterm~/.config/weztermhelix/config.toml~/AppData/Roaming/helix/config.tomlhelix/themes~/AppData/Roaming/helix/themesgit/gitconfig
~/.gitconfig
git/gitconfig.EJ-PC-00363
~/.gitconfig.include
topgrade/topgrade.windows.toml
~/AppData/Roaming/topgrade.toml
nushell
~/AppData/Roaming/nushell
bottom
~/AppData/Roaming/bottom
stackoverflow/so
~/AppData/Roaming/Sam Tay/so
subversion/config.win32
~/AppData/Roaming/Subversion/config
subversion/diff.bat
~/AppData/Roaming/Subversion/diff.bat
subversion/diff3.bat
~/AppData/Roaming/Subversion/diff3.bat
subversion/merge.bat
~/AppData/Roaming/Subversion/merge.bat
cargo/config.toml
~/scoop/persist/rustup/.cargo/config.toml
indexa/config.windows.toml
~/AppData/Roaming/indexa/config.toml
wezterm
~/.config/wezterm
helix/config.toml
~/AppData/Roaming/helix/config.toml
helix/themes
~/AppData/Roaming/helix/themes
alacritty/alacritty.yml
~/AppData/Roaming/alacritty/alacritty.yml
new file mode 100644+62 / −0 text lines
git/gitconfig
~/.gitconfig
git/gitconfig.NB-00718
~/.gitconfig.include
topgrade/topgrade.windows.toml
~/AppData/Roaming/topgrade.toml
nushell
~/AppData/Roaming/nushell
bottom
~/AppData/Roaming/bottom
stackoverflow/so
~/AppData/Roaming/Sam Tay/so
subversion/config.win32
~/AppData/Roaming/Subversion/config
subversion/diff.bat
~/AppData/Roaming/Subversion/diff.bat
subversion/diff
~/AppData/Roaming/Subversion/diff
subversion/diff3.bat
~/AppData/Roaming/Subversion/diff3.bat
subversion/diff3
~/AppData/Roaming/Subversion/diff3
subversion/merge.bat
~/AppData/Roaming/Subversion/merge.bat
subversion/merge
~/AppData/Roaming/Subversion/merge
cargo/config.toml
~/scoop/persist/rustup/.cargo/config.toml
indexa/config.windows.toml
~/AppData/Roaming/indexa/config.toml
wezterm
~/.config/wezterm
helix/config.toml
~/AppData/Roaming/helix/config.toml
helix/languages.toml
~/AppData/Roaming/helix/languages.toml
helix/themes
~/AppData/Roaming/helix/themes
neovim
~/AppData/Local/nvim
bat/config
~/AppData/Roaming/bat/config
+12 / −6 text lines
new file mode 100644+9 / −0 text lines
+0 / −15 text lines
+9 / −0 text lines
+54 / −51 text lines
"cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" }, "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, "cmp-nvim-lsp-document-symbol": { "branch": "main", "commit": "f0f53f704c08ea501f9d222b23491b0d354644b0" }, "cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "3d8912ebeb56e5ae08ef0906e3a54de1c66b92f1" }, "dressing.nvim": { "branch": "master", "commit": "fe3071330a0720ce3695ac915820c8134b22d1b0" }, "dressing.nvim": { "branch": "master", "commit": "6f212262061a2120e42da0d1e87326e8a41c0478" }, "friendly-snippets": { "branch": "main", "commit": "43727c2ff84240e55d4069ec3e6158d74cb534b6" }, "gen.nvim": { "branch": "main", "commit": "7aa38b8180f53fb4ac1ac02709179ab8c7b3a82f" }, "gitsigns.nvim": { "branch": "main", "commit": "0ccd5fb2316b3f8d8b2f775bc31cae7bc6a77a55" }, "glow.nvim": { "branch": "main", "commit": "5b38fb7b6e806cac62707a4aba8c10c5f14d5bb5" }, "heirline.nvim": { "branch": "master", "commit": "7f1e805dfc001d5dbb7d894105063f463f6c7dcc" }, "hlargs.nvim": { "branch": "main", "commit": "6218a401824c5733ac50b264991b62d064e85ab2" }, "indent-blankline.nvim": { "branch": "master", "commit": "29be0919b91fb59eca9e90690d76014233392bef" }, "friendly-snippets": { "branch": "main", "commit": "5cc1f45c6aac699ad008fb85f6ae03236062667d" }, "gen.nvim": { "branch": "main", "commit": "98043162168dcc0eb5c3c31b97439ff686dc8559" }, "gitsigns.nvim": { "branch": "main", "commit": "2c2463dbd82eddd7dbab881c3a62cfbfbe3c67ae" }, "glow.nvim": { "branch": "main", "commit": "238070a686c1da3bccccf1079700eb4b5e19aea4" }, "heirline.nvim": { "branch": "master", "commit": "03cff30d7e7d3ba6fdc00925f015822f79cef908" }, "hlargs.nvim": { "branch": "main", "commit": "e881f3a424139cc70c83121ec548732efdd67682" }, "indent-blankline.nvim": { "branch": "master", "commit": "821a7acd88587d966f7e464b0b3031dfe7f5680c" }, "lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" }, "lspkind.nvim": { "branch": "master", "commit": "57610d5ab560c073c465d6faf0c19f200cb67e6e" }, "lush.nvim": { "branch": "main", "commit": "966aad1accd47fa11fbe2539234f81f678fef2de" }, "mason.nvim": { "branch": "main", "commit": "41e75af1f578e55ba050c863587cffde3556ffa6" }, "mini.align": { "branch": "main", "commit": "c5ab28809c630b65ffe069b564ce1d473bbcb332" }, "mini.bracketed": { "branch": "main", "commit": "944e81e192cf054bb879cb64231e9b1cfb3c8145" }, "mini.colors": { "branch": "main", "commit": "7d5caf65180a4fd2f0780ca5d925610c206e0e4a" }, "mini.starter": { "branch": "main", "commit": "0ee58ac8975a929e90c8b104987fabfd13015e25" }, "lazy.nvim": { "branch": "main", "commit": "aedcd79811d491b60d0a6577a9c1701063c2a609" }, "lspkind.nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" }, "lush.nvim": { "branch": "main", "commit": "2e8d34e748642621d761a65e3c2a198154b914e8" }, "mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" }, "mini.align": { "branch": "main", "commit": "f845218c5fea89e49074e48270dc5e1b9511a0f9" }, "mini.bracketed": { "branch": "main", "commit": "65c7dfb51e832de9e279e5d5b0741e7af6755ab5" }, "mini.colors": { "branch": "main", "commit": "f64963332f7fcb45c8dfcc243f682a9a0fb9935d" }, "mini.starter": { "branch": "main", "commit": "ce222a5b6de50a9963c1eb62aa16ec6d5efca7ee" }, "neodev.nvim": { "branch": "main", "commit": "627b5b543f4df551fcddb99c17a8e260c453400d" }, "neodev.nvim": { "branch": "main", "commit": "365ef03dbf5b8579e6eb205b3500fc3bee17484a" }, "noice.nvim": { "branch": "main", "commit": "92433164e2f7118d4122c7674c3834d9511722ba" }, "noice.nvim": { "branch": "main", "commit": "bf67d70bd7265d075191e7812d8eb42b9791f737" }, "nrpattern.nvim": { "branch": "master", "commit": "f862ce687761078ef3155688151c55f69d28453e" }, "nui.nvim": { "branch": "main", "commit": "c0c8e347ceac53030f5c1ece1c5a5b6a17a25b32" }, "nvim-autopairs": { "branch": "master", "commit": "0f04d78619cce9a5af4f355968040f7d675854a1" }, "nvim-cmp": { "branch": "main", "commit": "0b751f6beef40fd47375eaf53d3057e0bfa317e4" }, "nvim-colorizer.lua": { "branch": "master", "commit": "dde3084106a70b9a79d48f426f6d6fec6fd203f7" }, "nvim-genghis": { "branch": "main", "commit": "884d98393d434e8e284bb7b32a9144b3dc6823e1" }, "nui.nvim": { "branch": "main", "commit": "35da9ca1de0fc4dda96c2e214d93d363c145f418" }, "nvim-autopairs": { "branch": "master", "commit": "096d0baecc34f6c5d8a6dd25851e9d5ad338209b" }, "nvim-cmp": { "branch": "main", "commit": "04e0ca376d6abdbfc8b52180f8ea236cbfddf782" }, "nvim-colorizer.lua": { "branch": "master", "commit": "85855b38011114929f4058efc97af1059ab3e41d" }, "nvim-genghis": { "branch": "main", "commit": "357bc2688d231e0daf8468a63985e20c1609ceb7" }, "nvim-jdtls": { "branch": "master", "commit": "894c044034e0d5f78a22602f1440bfe70aff58ee" }, "nvim-neoclip.lua": { "branch": "main", "commit": "4e406ae0f759262518731538f2585abb9d269bac" }, "nvim-notify": { "branch": "master", "commit": "e4a2022f4fec2d5ebc79afa612f96d8b11c627b3" }, "nvim-surround": { "branch": "main", "commit": "0855a89e00a5822c3a482a82e5223fcf2e9ede13" }, "nvim-tree.lua": { "branch": "master", "commit": "8c534822a7d16c83cf69928c53e1d8a13bd2734a" }, "nvim-treesitter": { "branch": "master", "commit": "670e7aa84346ea0f0e66f6bed3bf464beca4e70a" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "dbcd9388e3b119a87c785e10a00d62876077d23d" }, "nvim-ts-autotag": { "branch": "main", "commit": "6be1192965df35f94b8ea6d323354f7dc7a557e4" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "bdd2a3293340465a516b126d10894f6d5cb5213c" }, "nvim-web-devicons": { "branch": "master", "commit": "cdbcca210cf3655aa9b31ebf2422763ecd85ee5c" }, "nvim-window": { "branch": "main", "commit": "c82f5af239ee8b08ef668f723caa18986ee40d22" }, "oil.nvim": { "branch": "master", "commit": "05cb8257cb9257144e63f41ccfe5a41ba3d1003c" }, "oxocarbon.nvim": { "branch": "main", "commit": "b47c0ecab3a4270815afb3b05e03423b04cca8f2" }, "persistence.nvim": { "branch": "main", "commit": "ad538bfd5336f1335cdb6fd4e0b0eebfa6e12f32" }, "nvim-neoclip.lua": { "branch": "main", "commit": "798cd0592a81c185465db3a091a0ff8a21af60fd" }, "nvim-notify": { "branch": "master", "commit": "80b67b265530632505193553d05127ae7fe09ddd" }, "nvim-spectre": { "branch": "master", "commit": "e7db8ebca7fd0a604027ebf85acee52f6642c91c" }, "nvim-surround": { "branch": "main", "commit": "8f2af76134f37058dc4c27a24bc5f86c9cae76dc" }, "nvim-tree.lua": { "branch": "master", "commit": "863cf832ceb0b2377c913b7696dd7d64f4978941" }, "nvim-treesitter": { "branch": "master", "commit": "883c72cddc34195a3b916905f6e61d789ddd3599" }, "nvim-treesitter-endwise": { "branch": "master", "commit": "4c344ffc8d54d7e1ba2cefaaa2c10ea93aa1cc2d" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "dd0b2036c3a27cb6e6486f8bd24188c6ca43af0b" }, "nvim-ts-autotag": { "branch": "main", "commit": "531f48334c422222aebc888fd36e7d109cb354cd" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "7ab799a9792f7cf3883cf28c6a00ad431f3d382a" }, "nvim-web-devicons": { "branch": "master", "commit": "7f30f2da3c3641841ceb0e2c150281f624445e8f" }, "nvim-window": { "branch": "main", "commit": "e7f5d60eeec8ff37af7be4c9a99f65edf67fc574" }, "oil.nvim": { "branch": "master", "commit": "bf753c3e3f8736939ad5597f92329dfe7b1df4f5" }, "oxocarbon.nvim": { "branch": "main", "commit": "c5846d10cbe4131cc5e32c6d00beaf59cb60f6a2" }, "persistence.nvim": { "branch": "main", "commit": "4982499c1636eac254b72923ab826ee7827b3084" }, "speedtyper.nvim": { "branch": "main", "commit": "02ad504608326cb33f9a9a5936757506df2fb47b" }, "speedtyper.nvim": { "branch": "main", "commit": "2d158eed4c753995b0501a3a7a72464fbb213e3d" }, "symbols-outline.nvim": { "branch": "master", "commit": "512791925d57a61c545bc303356e8a8f7869763c" }, "telescope-symbols.nvim": { "branch": "master", "commit": "f2060117d965df4a626f068a4ebbd8ee051aa076" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "0fc69ebbf178631b8ab76745459fade062156ec5" }, "symbols-outline.nvim": { "branch": "master", "commit": "564ee65dfc9024bdde73a6621820866987cbb256" }, "telescope-symbols.nvim": { "branch": "master", "commit": "a6d0127a53d39b9fc2af75bd169d288166118aec" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, "telescope-zoxide": { "branch": "main", "commit": "68966349aa1b8e9ade403e18479ecf79447389a7" }, "telescope.nvim": { "branch": "0.1.x", "commit": "7011eaae0ac1afe036e30c95cf80200b8dc3f21a" }, "todo-comments.nvim": { "branch": "main", "commit": "4a6737a8d70fe1ac55c64dfa47fcb189ca431872" }, "toggleterm.nvim": { "branch": "main", "commit": "c80844fd52ba76f48fabf83e2b9f9b93273f418d" }, "treesj": { "branch": "main", "commit": "1d6e89f4790aa04eaae38fa9460a3ee191961c96" }, "telescope.nvim": { "branch": "0.1.x", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" }, "todo-comments.nvim": { "branch": "main", "commit": "833d8dd8b07eeda37a09e99460f72a02616935cb" }, "toggleterm.nvim": { "branch": "main", "commit": "193786e0371e3286d3bc9aa0079da1cd41beaa62" }, "treesj": { "branch": "main", "commit": "60e27280030f9cd8dfb6ceb335922c6ff76682cc" }, "virt-column.nvim": { "branch": "master", "commit": "b62b4ef0774d19452d4ed18e473e824c7a756f2f" },+11 / −3 text lines
jdk19.path = '/usr/lib/jvm/java-19-openjdk-amd64' jdk21.path = '/home/oli/.jdks/openjdk-21' elseif host == 'NB-00718' then jdk11.path = '~/scoop/apps/openjdk11/current' jdk17.path = '~/scoop/apps/openjdk17/current' jdk19.path = '~/scoop/apps/openjdk19/current' jdk21.path = '~/scoop/apps/openjdk21/current'+10 / −8 text lines
+1 / −1 text lines
+1 / −0 text lines
+1 / −1 text lines
+573 / −672 text lines
---@diagnostic disable: param-type-mismatch { 'rebelot/heirline.nvim', event = 'BufEnter', dependencies = { 'nvim-tree/nvim-web-devicons', 'lewis6991/gitsigns.nvim', }, config = function () local heirline = require 'heirline' local conditions = require 'heirline.conditions' local utils = require 'heirline.utils' local nugu = require 'bugabinga.nugu.palette' heirline.load_colors( nugu ) auto 'reload_heirline_colors' { description = 'Reload dark/light nugu colors for Heirline', events = 'ColorScheme', command = function () utils.on_colorscheme( nugu ) end, } local vi_mode = { init = function ( self ) self.mode = vim.fn.mode( 1 ) -- :h mode() end, static = { mode_names = { n = icon.normal, no = icon.normal .. '?', nov = icon.normal .. '?', noV = icon.normal .. '?', ['no\22'] = icon.normal .. '?', niI = icon.normal .. 'i', niR = icon.normal .. 'r', niV = icon.normal .. 'v', nt = icon.normal .. 't', v = icon.visual, vs = icon.visual .. 's', V = icon.visual .. '_', Vs = icon.visual .. 's', ['\22'] = '^' .. icon.visual, ['\22s'] = '^' .. icon.visual, s = icon.select, S = icon.select .. '_', ['\19'] = '^' .. icon.select, i = icon.insert, ic = icon.insert .. 'c', ix = icon.insert .. 'x', R = icon.replace, Rc = icon.replace .. 'c', Rx = icon.replace .. 'x', Rv = icon.replace .. 'v', Rvc = icon.replace .. 'v', Rvx = icon.replace .. 'v', c = icon.command, cv = icon.command .. 'x', r = icon.pending, rm = icon.pending .. 'm', ['r?'] = icon.pending .. '?', ['!'] = icon.exclaim, t = icon.terminal, }, mode_colors = { n = 'ui_normal', i = 'ui_accent', v = 'ui_important_global', V = 'ui_important_global', ['\22'] = 'ui_important_global', c = 'ui_important_global', s = 'ui_important_global', S = 'ui_important_global', ['\19'] = 'ui_important_global', R = 'ui_important_global', r = 'ui_important_global', ['!'] = 'ui_important_global', t = 'ui_important_global', } }, provider = function ( self ) local mode_name = self.mode_names[self.mode] return ' ' .. icon.vim .. ' %3(' .. mode_name .. '%) ' end, hl = function ( self ) local mode = self.mode:sub( 1, 1 ) -- get only the first mode character return { fg = self.mode_colors[mode], bold = true } end, update = { 'ModeChanged', pattern = '*:*', callback = vim.schedule_wrap( function () vim.cmd.redrawstatus() end ), }, } local file_icon = { init = function ( self ) local filename = self.filename local extension = vim.fn.fnamemodify( filename, ':e' ) self.icon = require 'nvim-web-devicons'.get_icon_color( filename, extension, { default = true } ) end, provider = function ( self ) return self.icon and (self.icon .. ' ') end, hl = 'DefaultIcon', } local file_name = { init = function ( self ) self.lfilename = vim.fs.normalize( vim.fn.fnamemodify( self.filename, ':.' ) ) if self.lfilename == '' then self.lfilename = NEW_FILE end end, flexible = 2, { provider = function ( self ) return self.lfilename end, }, { provider = function ( self ) return vim.fs.normalize( vim.fn.pathshorten( self.lfilename ) ) end, }, } local file_flags = { { condition = function () return vim.bo.modified end, provider = string.format( ' %s ', icon.modified ), hl = 'Comment', }, { condition = function () return not vim.bo.modifiable or vim.bo.readonly end, provider = string.format( ' %s ', icon.lock ), hl = 'ErrorMsg', }, } local file_name_block = { init = function ( self ) self.filename = vim.fs.normalize( vim.api.nvim_buf_get_name( 0 ) ) end, file_icon, { provider = ' ' }, file_name, file_flags, { provider = '%<' } -- this means that the statusline is cut here when there's not enough space } local file_type = { provider = function () return icon.file .. ' ' .. string.upper( vim.bo.filetype ) end, } local file_encoding = { provider = function () local enc = (vim.bo.fenc ~= '' and vim.bo.fenc) or vim.o.enc -- :h 'enc' return enc ~= 'utf-8' and enc:upper() end, } local file_format = { static = { dos = icon.newline .. icon.carriage_return, unix = icon.newline, mac = icon.carriage_return, }, provider = function ( self ) local fileformat = vim.bo.fileformat return self[fileformat] end } local file_size = { provider = function () -- stackoverflow, compute human readable file size -- i want to see vim opening a 1EiB file local suffix = { 'b', 'k', 'M', 'G', 'T', 'P', 'E' } local fsize = vim.fn.getfsize( vim.api.nvim_buf_get_name( 0 ) ) fsize = (fsize < 0 and 0) or fsize if fsize < 1024 then return fsize .. suffix[1] end local i = math.floor( (math.log( fsize ) / math.log( 1024 )) ) return string.format( '%.2g%s', fsize / math.pow( 1024, i ), suffix[i + 1] ) end, } local file_last_modified = { provider = function () local ftime = vim.fn.getftime( vim.api.nvim_buf_get_name( 0 ) ) if ftime > 0 then local timeago = require 'std.timeago' return timeago.format( ftime ) end end, } local lsp_active = { condition = conditions.lsp_attached, update = { 'LspAttach', 'LspDetach', 'BufEnter' }, provider = function () local names = {} for _, client in pairs( vim.lsp.get_clients { bufnr = 0 } ) do table.insert( names, client.name ) end return icon.lsp .. ' ' .. table.concat( names, ' ' ) end, } local diagnostic_enabled = { init = function ( self ) self.icon = vim.diagnostic.is_disabled() and icon.toggle_off or icon.toggle_on end, provider = function ( self ) return icon.diagnostic .. ' ' .. self.icon end, } local diagnostic = { condition = conditions.has_diagnostics, static = { error_icon = icon.error, warn_icon = icon.warn, info_icon = icon.info, hint_icon = icon.hint, }, init = function ( self ) self.errors = #vim.diagnostic.get( 0, { severity = vim.diagnostic.severity.ERROR } ) self.warnings = #vim.diagnostic.get( 0, { severity = vim.diagnostic.severity.WARN } ) self.hints = #vim.diagnostic.get( 0, { severity = vim.diagnostic.severity.HINT } ) self.info = #vim.diagnostic.get( 0, { severity = vim.diagnostic.severity.INFO } ) end, update = { 'DiagnosticChanged', 'BufEnter' }, { provider = function ( self ) -- 0 is just another output, we can decide to print it or not! return self.errors > 0 and (self.error_icon .. ' ' .. self.errors .. ' ') end, hl = 'DiagnosticError', }, { provider = function ( self ) return self.warnings > 0 and (self.warn_icon .. ' ' .. self.warnings .. ' ') end, hl = 'DiagnosticWarn', }, { provider = function ( self ) return self.info > 0 and (self.info_icon .. ' ' .. self.info .. ' ') end, hl = 'DiagnosticInfo', }, { provider = function ( self ) return self.hints > 0 and (self.hint_icon .. ' ' .. self.hints) end, hl = 'DiagnosticHint', }, } local is_svn_repo = function () local svn_dir = vim.fs.find( '.svn', { upward = true, stop = vim.uv.os_homedir(), path = vim.fs.dirname( vim.api.nvim_buf_get_name( 0 ) ), type = 'directory', } ) return not vim.tbl_isempty( svn_dir ) end local svn_get_relative_url = function () -- FIXME: replace with vim.system local job = require 'plenary.job' local relative_url = { '[ERR]' } job:new { command = 'svn', args = { 'info', '--show-item', 'relative-url', '--no-newline' }, on_exit = function ( current_job, exit_code ) if exit_code == 0 then relative_url = current_job:result() end end, }:sync() return relative_url[1] end local svn = { condition = is_svn_repo, update = 'BufEnter', init = function ( self ) self.relative_url = svn_get_relative_url() end, { provider = function ( self ) return icon.subversion .. ' ' .. icon.branch .. ' ' .. self.relative_url end, }, } local git = { condition = conditions.is_git_repo, init = function ( self ) self.status_dict = vim.b.gitsigns_status_dict end, { provider = function ( self ) return icon.git .. ' ' .. icon.branch .. ' ' .. self.status_dict.head .. ' ' end, }, { provider = function ( self ) local count = self.status_dict.added or 0 return count > 0 and (icon.diff_add .. ' ' .. count .. ' ') end, hl = 'DiffAdd', }, { provider = function ( self ) local count = self.status_dict.removed or 0 return count > 0 and (icon.diff_remove .. ' ' .. count .. ' ') end, hl = 'DiffDelete', }, { provider = function ( self ) local count = self.status_dict.changed or 0 return count > 0 and (icon.diff_change .. ' ' .. count .. ' ') end, hl = 'DiffChange', }, } local work_dir = { init = function ( self ) self.icon = (vim.fn.haslocaldir( 0 ) == 1 and icon['local'] or '') .. ' ' .. icon.global .. ' ' self.cwd = vim.fs.normalize( vim.uv.cwd() ):gsub( vim.fs.normalize( vim.uv.os_homedir() ), '~' ) end, flexible = 1, { provider = function ( self ) return self.icon .. self.cwd end, }, { provider = function ( self ) local cwd = vim.fn.pathshorten( self.cwd ) return self.icon .. cwd end, }, { provider = '', } } local help_file_name = { condition = function () return vim.bo.filetype == 'help' end, provider = function () local filename = vim.api.nvim_buf_get_name( 0 ) return vim.fn.fnamemodify( filename, ':t' ) end, hl = 'Question', } local terminal_name = { provider = function () local name, _ = vim.api.nvim_buf_get_name( 0 ):gsub( '.*:', '' ) local basename = vim.fs.basename( name ) return icon.terminal .. ' ' .. (basename or 'noname') end, hl = 'Bold', } local togglers = { provider = function () local togglers = require 'bugabinga.options.togglers' return tostring( togglers ) end, } local macro_recording = { condition = function () return vim.fn.reg_recording() ~= '' and vim.o.cmdheight == 0 end, provider = icon.macro .. ' ', hl = 'PreProc', utils.surround( { '░▒▓ ', ' ▓▒░' }, nil, { provider = function () return vim.fn.reg_recording() end, hl = 'Bold', } ), update = { 'RecordingEnter', 'RecordingLeave', } } local lazy = { condition = function () local ok, lazy_status = pcall( require, 'lazy.status' ) return ok and lazy_status.has_updates() end, update = { 'User', pattern = 'LazyUpdate' }, provider = function () return ' ' .. icon.lazy .. ' ' .. require 'lazy.status'.updates() .. ' ' end, on_click = { callback = function () require 'lazy'.update() end, name = 'update_plugins', }, } local align = { provider = '%=' } local space = { provider = ' ' } local default_statusline = { vi_mode, macro_recording, align, work_dir, space, git, svn, align, diagnostic_enabled, space, diagnostic, space, lsp_active, align, togglers, align, lazy, space, file_encoding, space, file_format, space, file_type, space, file_size, space, file_last_modified, } local special_statusline = { condition = function () return conditions.buffer_matches { buftype = ignored.buftypes, filetype = ignored.filetypes, } end, file_type, space, help_file_name, align } local terminal_statusline = { condition = function () return conditions.buffer_matches { buftype = { 'terminal' } } end, { condition = conditions.is_active, vi_mode, space }, file_type, space, terminal_name, align, } local inactive_statusline = { condition = conditions.is_not_active, file_type, space, file_name, align, } local statuslines = { hl = function () if conditions.is_active() then return 'StatusLine' else return 'StatusLineNC' end end, fallthrough = false, special_statusline, terminal_statusline, inactive_statusline, default_statusline, } local winbars = { hl = function () if conditions.is_active() then return 'Winbar' else return 'WinbarNC' end end, fallthrough = false, { condition = function () return conditions.buffer_matches { buftype = { 'terminal' } } end, file_type, space, terminal_name, }, file_name_block, } local tabline_buffer_number = { provider = function ( self ) return '(' .. tostring( self.bufnr ) .. ')' end, hl = function ( self ) if self.is_active then return { fg = utils.get_highlight 'TabLineSel'.fg } elseif not vim.api.nvim_buf_is_loaded( self.bufnr ) then return { fg = 'ui_normal' } else return { fg = utils.get_highlight 'TabLine'.fg } end end, } local tabline_file_name = { provider = function ( self ) local name = self.file_name return name == '' and NEW_FILE or vim.fs.normalize( vim.fn.fnamemodify( name, ':t' ) ) end, hl = function ( self ) return { bold = self.is_active or self.is_visible, italic = true } end, } local tabline_file_flags = { { condition = function ( self ) return vim.api.nvim_get_option_value( 'modified', { buf = self.bufnr } ) end, provider = icon.modified .. ' ', }, { condition = function ( self ) return not vim.api.nvim_get_option_value( 'modifiable', { buf = self.bufnr } ) or vim.api.nvim_get_option_value( 'readonly', { buf = self.bufnr } ) end, provider = function ( self ) if vim.api.nvim_get_option_value( 'buftype', { buf = self.bufnr } ) == 'terminal' then return icon.terminal else return icon.lock end end, }, hl = 'Bold', } local tabline_file_name_block = { init = function ( self ) self.file_name = vim.api.nvim_buf_get_name( self.bufnr ) end, hl = function ( self ) if self.is_active then return 'TabLineSel' elseif not vim.api.nvim_buf_is_loaded( self.bufnr ) then return { fg = 'ui_normal' } else return 'TabLine' end end, on_click = { callback = function ( _, minwid, _, button ) if button == 'm' then --m = middle click vim.schedule( function () vim.api.nvim_buf_delete( minwid, { force = false } ) vim.cmd.redrawtabline() end ) else vim.api.nvim_win_set_buf( 0, minwid ) end end, minwid = function ( self ) return self.bufnr end, name = 'heirline_tabline_buffer_callback', }, file_icon, { provider = ' ' }, tabline_file_name, tabline_buffer_number, tabline_file_flags, } local tabline_buffer_block = utils.surround( { ' ' .. icon.slant_left, icon.slant_right .. ' ', }, function ( self ) if self.is_active then return utils.get_highlight 'TabLineSel'.bg else return utils.get_highlight 'TabLine'.bg end end, { tabline_file_name_block } ) local buffer_line = utils.make_buflist( tabline_buffer_block, { provider = icon.arrow_left .. ' ', hl = 'TabLineFill' }, { provider = ' ' .. icon.arrow_right, hl = 'TabLineFill' } ) local tabpage = { provider = function ( self ) return '%' .. self.tabnr .. 'T ' .. self.tabpage .. ' %T' end, hl = function ( self ) if not self.is_active then return 'TabLine' else return 'TabLineSel' end end, } local tab_pages = { { provider = '%=' }, utils.make_tablist( tabpage ), } local tabline = { buffer_line, tab_pages } -- local statuscolumn = {} heirline.setup { statusline = statuslines, winbar = winbars, tabline = tabline, -- statuscolumn = statuscolumn, opts = { colors = nugu, disable_winbar_cb = function ( args ) return conditions.buffer_matches( { buftype = ignored.buftypes, filetype = ignored.filetypes, }, args.buf ) end, }, } end, }, { 'rebelot/heirline.nvim', event = 'BufEnter', dependencies = { 'nvim-tree/nvim-web-devicons', 'lewis6991/gitsigns.nvim', }, config = function () local heirline = require 'heirline' local conditions = require 'heirline.conditions' local utils = require 'heirline.utils' local nugu = require 'bugabinga.nugu.palette' heirline.load_colors( nugu ) auto 'ReloadHeirlineColors' { description = 'Reload dark/light nugu colors for Heirline', events = 'ColorScheme', command = function () utils.on_colorscheme( nugu ) end, } local vi_mode = { init = function ( self ) self.mode = vim.fn.mode( 1 ) -- :h mode() end, static = { mode_names = { n = icon.normal, no = icon.normal .. '?', nov = icon.normal .. '?', noV = icon.normal .. '?', ['no\22'] = icon.normal .. '?', niI = icon.normal .. 'i', niR = icon.normal .. 'r', niV = icon.normal .. 'v', nt = icon.normal .. 't', v = icon.visual, vs = icon.visual .. 's', V = icon.visual .. '_', Vs = icon.visual .. 's', ['\22'] = '^' .. icon.visual, ['\22s'] = '^' .. icon.visual, s = icon.select, S = icon.select .. '_', ['\19'] = '^' .. icon.select, i = icon.insert, ic = icon.insert .. 'c', ix = icon.insert .. 'x', R = icon.replace, Rc = icon.replace .. 'c', Rx = icon.replace .. 'x', Rv = icon.replace .. 'v', Rvc = icon.replace .. 'v', Rvx = icon.replace .. 'v', c = icon.command, cv = icon.command .. 'x', r = icon.pending, rm = icon.pending .. 'm', ['r?'] = icon.pending .. '?', ['!'] = icon.exclaim, t = icon.terminal, }, mode_colors = { n = 'ui_normal', i = 'ui_accent', v = 'ui_important_global', V = 'ui_important_global', ['\22'] = 'ui_important_global', c = 'ui_important_global', s = 'ui_important_global', S = 'ui_important_global', ['\19'] = 'ui_important_global', R = 'ui_important_global', r = 'ui_important_global', ['!'] = 'ui_important_global', t = 'ui_important_global', } }, provider = function ( self ) local mode_name = self.mode_names[self.mode] return ' ' .. icon.vim .. ' %3(' .. mode_name .. '%) ' end, hl = function ( self ) local mode = self.mode:sub( 1, 1 ) -- get only the first mode character return { fg = self.mode_colors[mode], bold = true } end, update = { 'ModeChanged', pattern = '*:*', callback = vim.schedule_wrap( function () vim.cmd.redrawstatus() end ), }, } local file_icon = { init = function ( self ) local filename = self.filename local extension = vim.fn.fnamemodify( filename, ':e' ) self.icon = require 'nvim-web-devicons'.get_icon_color( filename, extension, { default = true } ) end, provider = function ( self ) return self.icon and (self.icon .. ' ') end, hl = 'DefaultIcon', } local file_name = { init = function ( self ) self.lfilename = vim.fs.normalize( vim.fn.fnamemodify( self.filename, ':.' ) ) if self.lfilename == '' then self.lfilename = '~new~' end end, flexible = 2, { provider = function ( self ) return self.lfilename end, }, { provider = function ( self ) return vim.fs.normalize( vim.fn.pathshorten( self.lfilename ) ) end, }, } local file_flags = { { condition = function () return vim.bo.modified end, provider = string.format( ' %s ', icon.modified ), hl = 'Comment', }, { condition = function () return not vim.bo.modifiable or vim.bo.readonly end, provider = string.format( ' %s ', icon.lock ), hl = 'ErrorMsg', }, } local file_name_block = { init = function ( self ) self.filename = vim.fs.normalize( vim.api.nvim_buf_get_name( 0 ) ) end, file_name, file_flags, { provider = ' ' }, file_icon, { provider = '%<' } -- this means that the statusline is cut here when there's not enough space } local file_type = { provider = function () return icon.file .. ' ' .. string.upper( vim.bo.filetype ) end, } local file_encoding = { provider = function () local enc = (vim.bo.fenc ~= '' and vim.bo.fenc) or vim.o.enc -- :h 'enc' return enc ~= 'utf-8' and enc:upper() end, } local file_format = { static = { dos = icon.newline .. icon.carriage_return, unix = icon.newline, mac = icon.carriage_return, }, provider = function ( self ) local fileformat = vim.bo.fileformat return self[fileformat] end } local file_size = { provider = function () -- stackoverflow, compute human readable file size -- i want to see vim opening a 1EiB file local suffix = { 'b', 'k', 'M', 'G', 'T', 'P', 'E' } local fsize = vim.fn.getfsize( vim.api.nvim_buf_get_name( 0 ) ) fsize = (fsize < 0 and 0) or fsize if fsize < 1024 then return fsize .. suffix[1] end local i = math.floor( (math.log( fsize ) / math.log( 1024 )) ) return string.format( '%.2g%s', fsize / math.pow( 1024, i ), suffix[i + 1] ) end, } local file_last_modified = { provider = function () local ftime = vim.fn.getftime( vim.api.nvim_buf_get_name( 0 ) ) if ftime > 0 then local timeago = require 'std.timeago' return timeago.format( ftime ) end end, } local lsp_active = { condition = conditions.lsp_attached, update = { 'LspAttach', 'LspDetach', 'BufEnter' }, provider = function () local names = {} for _, client in pairs( vim.lsp.get_clients { bufnr = 0 } ) do table.insert( names, client.name ) end return icon.lsp .. ' ' .. table.concat( names, ' ' ) end, } local diagnostic_enabled = { init = function ( self ) self.icon = vim.diagnostic.is_disabled() and icon.toggle_off or icon.toggle_on end, provider = function ( self ) return icon.diagnostic .. ' ' .. self.icon end, } local diagnostic = { condition = conditions.has_diagnostics, static = { error_icon = icon.error, warn_icon = icon.warn, info_icon = icon.info, hint_icon = icon.hint, }, init = function ( self ) self.errors = #vim.diagnostic.get( 0, { severity = vim.diagnostic.severity.ERROR } ) self.warnings = #vim.diagnostic.get( 0, { severity = vim.diagnostic.severity.WARN } ) self.hints = #vim.diagnostic.get( 0, { severity = vim.diagnostic.severity.HINT } ) self.info = #vim.diagnostic.get( 0, { severity = vim.diagnostic.severity.INFO } ) end, update = { 'DiagnosticChanged', 'BufEnter' }, { provider = function ( self ) -- 0 is just another output, we can decide to print it or not! return self.errors > 0 and (self.error_icon .. ' ' .. self.errors .. ' ') end, hl = 'DiagnosticError', }, { provider = function ( self ) return self.warnings > 0 and (self.warn_icon .. ' ' .. self.warnings .. ' ') end, hl = 'DiagnosticWarn', }, { provider = function ( self ) return self.info > 0 and (self.info_icon .. ' ' .. self.info .. ' ') end, hl = 'DiagnosticInfo', }, { provider = function ( self ) return self.hints > 0 and (self.hint_icon .. ' ' .. self.hints) end, hl = 'DiagnosticHint', }, } local is_svn_repo = function () local svn_dir = vim.fs.find( '.svn', { upward = true, stop = vim.uv.os_homedir(), path = vim.fs.dirname( vim.api.nvim_buf_get_name( 0 ) ), type = 'directory', } ) return not vim.tbl_isempty( svn_dir ) end local svn_get_relative_url = function () local job = require 'plenary.job' local relative_url = '[unversioned]' job:new { command = 'svn', args = { 'info', '--show-item', 'relative-url', '--no-newline' }, on_exit = function ( current_job, exit_code ) if exit_code == 0 then relative_url = current_job:result() end end, }:sync() return type(relative_url) == 'table' and relative_url[1] or relative_url end local svn = { condition = is_svn_repo, update = 'BufEnter', init = function ( self ) self.relative_url = svn_get_relative_url() end, { provider = function ( self ) return icon.subversion .. ' ' .. icon.branch .. ' ' .. self.relative_url end, }, } local git = { condition = conditions.is_git_repo, init = function ( self ) self.status_dict = vim.b.gitsigns_status_dict end, { provider = function ( self ) return icon.git .. ' ' .. icon.branch .. ' ' .. self.status_dict.head .. ' ' end, }, { provider = function ( self ) local count = self.status_dict.added or 0 return count > 0 and (icon.diff_add .. ' ' .. count .. ' ') end, hl = 'DiffAdd', }, { provider = function ( self ) local count = self.status_dict.removed or 0 return count > 0 and (icon.diff_remove .. ' ' .. count .. ' ') end, hl = 'DiffDelete', }, { provider = function ( self ) local count = self.status_dict.changed or 0 return count > 0 and (icon.diff_change .. ' ' .. count .. ' ') end, hl = 'DiffChange', }, } local work_dir = { init = function ( self ) self.icon = (vim.fn.haslocaldir( 0 ) == 1 and icon['local'] or '') .. ' ' .. icon.global .. ' ' self.cwd = vim.fs.normalize( vim.uv.cwd() ):gsub( vim.fs.normalize( vim.uv.os_homedir() ), '~' ) end, flexible = 1, { -- evaluates to the full-length path provider = function ( self ) return self.icon .. self.cwd end, }, { -- evaluates to the shortened path provider = function ( self ) local cwd = vim.fn.pathshorten( self.cwd ) return self.icon .. cwd end, }, { -- evaluates to "", hiding the component provider = '', } } local help_file_name = { condition = function () return vim.bo.filetype == 'help' end, provider = function () local filename = vim.api.nvim_buf_get_name( 0 ) return vim.fn.fnamemodify( filename, ':t' ) end, hl = 'Question', } local terminal_name = { -- we could add a condition to check that buftype == 'terminal' -- or we could do that later (see #conditional-statuslines below) provider = function () local tname, _ = vim.api.nvim_buf_get_name( 0 ):gsub( '.*:', '' ) tname = vim.fs.basename( tname ) return icon.terminal .. ' ' .. tname end, hl = 'Bold', } local togglers = { provider = function () local togglers = require 'bugabinga.options.togglers' return tostring( togglers ) end, } local macro_recording = { condition = function () return vim.fn.reg_recording() ~= '' and vim.o.cmdheight == 0 end, provider = icon.macro .. ' ', hl = 'PreProc', utils.surround( { '░▒▓ ', ' ▓▒░' }, nil, { provider = function () return vim.fn.reg_recording() end, hl = 'Bold', } ), update = { 'RecordingEnter', 'RecordingLeave', } } local lazy = { condition = function () local ok, lazy_status = pcall( require, 'lazy.status' ) return ok and lazy_status.has_updates() end, update = { 'User', pattern = 'LazyUpdate' }, provider = function () return ' ' .. icon.lazy .. ' ' .. require 'lazy.status'.updates() .. ' ' end, on_click = { callback = function () require 'lazy'.update() end, name = 'update_plugins', }, hl = 'LazyProgressTodo', } local align = { provider = '%=' } local space = { provider = ' ' } local default_statusline = { vi_mode, macro_recording, align, work_dir, space, git, svn, align, diagnostic_enabled, space, diagnostic, space, lsp_active, align, togglers, align, lazy, space, file_encoding, space, file_format, space, file_type, space, file_size, space, file_last_modified, } local special_statusline = { condition = function () return conditions.buffer_matches { buftype = { 'nofile', 'prompt', 'help', 'quickfix', 'noice', 'Trouble' }, filetype = { '^git.*', 'fugitive' }, } end, file_type, space, help_file_name, align } local terminal_statusline = { condition = function () return conditions.buffer_matches { buftype = { 'terminal' } } end, { condition = conditions.is_active, vi_mode, space }, file_type, space, terminal_name, align, } local inactive_statusline = { condition = conditions.is_not_active, file_type, space, file_name, align, } local statuslines = { hl = function () if conditions.is_active() then return 'StatusLine' else return 'StatusLineNC' end end, fallthrough = false, special_statusline, terminal_statusline, inactive_statusline, default_statusline, } local winbars = { hl = function () if conditions.is_active() then return 'Winbar' else return 'WinbarNC' end end, fallthrough = false, { condition = function () return conditions.buffer_matches { buftype = { 'terminal' } } end, file_type, space, terminal_name, }, file_name_block, } local tabpage = { provider = function ( self ) return '%' .. self.tabnr .. 'T ' .. self.tabpage .. ' %T' end, hl = function ( self ) if not self.is_active then return 'TabLine' else return 'TabLineSel' end end, } local tab_pages = { -- only show this component if there's 2 or more tabpages condition = function () return #vim.api.nvim_list_tabpages() >= 2 end, { provider = '%=' }, utils.make_tablist( tabpage ), } local tabline = { tab_pages } -- local statuscolumn = {} heirline.setup { statusline = statuslines, winbar = winbars, tabline = tabline, -- statuscolumn = statuscolumn, opts = { colors = nugu, disable_winbar_cb = function ( args ) return conditions.buffer_matches( { buftype = { 'nofile', 'prompt', 'help', 'quickfix' }, filetype = { '^git.*', 'noice', 'Trouble' }, }, args.buf ) end, }, } end, },+2 / −1 text lines
+1 / −1 text lines
+66 / −2 text lines
'RRethy/nvim-treesitter-endwise', -- nvim-treesitter assumes that windows users use either cmd or powershell. -- my win32 + nushell combination does not work well. -- override some internal functions of nvim-treesitter for nushell support. local shell = require 'nvim-treesitter.shell_command_selectors' shell.make_directory_change_for_command = function ( dir, command ) return string.format( 'cd %s; %s', dir, command ) end shell.select_mv_cmd = function ( from, to, cwd ) return { cmd = 'mv', opts = { args = { '--force', from, to }, cwd = cwd, } } end shell.select_install_rm_cmd = function ( cache_folder, project_name ) local project = vim.fs.joinpath( cache_folder, project_name ) return { cmd = 'rm', opts = { args = { '--recursive', '--force', '--permanent', project, } }, err = 'Could not delete project ' .. project, } end shell.select_rm_file_cmd = function ( file, info_msg ) return { cmd = 'rm', opts = { args = { '--force', '--permanent', file } }, info = info_msg, err = 'Could not delete file ' .. file, } end shell.select_mkdir_cmd = function ( directory, cwd, info_msg ) return { cmd = 'mkdir', opts = { args = { directory }, cwd = cwd, }, info = info_msg, err = 'Could not create directory ' .. directory, } end install.compilers = { 'zig', 'clang', 'gcc', 'cl', 'cc', vim.fn.getenv 'CC' } install.compilers = { 'zig' } 'xml', autotag = { enable = true },+1 / −1 text lines
+49 / −48 text lines
# Semantic aliasesexport alias show = batexport def list [] { ls --all --long --du --mime-type | where type == dir | append (ls --all --long --du --mime-type | where type != dir) }export alias web = firefoxexport alias edit = nvim# TODO ewrite bak commandexport alias backup = bak# https://gist.github.com/mullnerz/9fff80593d6b442d5c1bexport alias archive = wget -mpck --html-extension --user-agent="" -e robots=off --wait 1 -P .def-env workspace [] { fd --type directory --max-depth 1 . $env.WORKSPACE | sk --ansi --preview 'test -f {}README.md&& mdcat {}README.md' --preview-window 'right:66%' | cd $in}export alias w = workspaceexport def-env lk [] { cd (walk --icons)}def open-editor-with-content-search [ initial_query:string = ''] { sk --ansi --interactive --cmd-query $initial_query --delimiter ':' --nth 1 --cmd "rg --color=always --line-number {}" --preview 'bat --color=always {1}' --color light | parse '{file}:{number}:{line}' | each { nvim -c $in.number -c $"?\\V($in.line | str trim )" $in.file }}export alias nc = open-editor-with-content-searchdef open-editor-with-file-search [ initial_query:string = ''] { sk --ansi --interactive --cmd-query $initial_query --delimiter ':' --nth 1 --cmd "fd --type file --color=always {}" --preview 'bat --color=always {1}' --color light | str trim | each { nvim $in }}export alias nf = open-editor-with-file-searchdef fuzzy-kill [ query:string ] { let pid = (^ps -ef | sed 1d | fzf -m --query $query | awk '{print $2}') if not ($pid | is-empty) { kill ($pid | into int ) }}export alias fkill = fuzzy-kill# TODO: HOST SPECIFIC ALIASES# I do not see a way right now the have different aliases per host with nu.# CUSTOM LITTLE JAVA COMMANDSexport alias aes = java ($env.DOTFILES + /tools/ + aes.java)export alias download = java ($env.DOTFILES + /tools/ + download.java)export alias download_jar = java ($env.DOTFILES + /tools/ + download_jar.java)# systemdexport alias userctl = systemctl --user# Semantic aliases
export alias show = bat
export def list [] { ls --all --long --du --mime-type | where type == dir | append (ls --all --long --du --mime-type | where type != dir) }
export alias web = firefox
export alias edit = nvim
# TODO ewrite bak command
export alias backup = bak
# https://gist.github.com/mullnerz/9fff80593d6b442d5c1b
export alias archive = wget -mpck --html-extension --user-agent="" -e robots=off --wait 1 -P .
def-env workspace [] {
fd --type directory --max-depth 1 . $env.WORKSPACE | fzf --ansi --preview 'mdcat {}README.md' --preview-window 'up:69%,border-bottom' | cd $in
}
export alias w = workspace
export def-env lk [] {
cd (walk --icons)
}
def open-editor-with-content-search [ initial_query:string = ''] {
rg --color=always --line-number --no-heading --smart-case $initial_query | fzf --ansi --delimiter : --preview 'bat --color=always {1} --highlight-line {2}' --color "hl:-1:underline,hl+:-1:underline:reverse" --preview-window 'up,60%,border-bottom,+{2}+3/3,~3' | parse '{file}:{number}:{line}' | each { nvim -c $in.number -c $"?\\V($in.line | str trim )" $in.file }
}
export alias nc = open-editor-with-content-search
def open-editor-with-file-search [ initial_query:string = ''] {
fd --type file --color=always ign | fzf --ansi --preview 'bat --color=always {1}' --preview-window 'up,60%,border-bottom,+{2}+3/3,~3' | str trim | each { nvim $in }
}
export alias nf = open-editor-with-file-search
def fuzzy-kill [ query:string ] {
let pid = (^ps -ef | sed 1d | fzf -m --query $query | awk '{print $2}')
if not ($pid | is-empty) {
kill ($pid | into int )
}
}
export alias fkill = fuzzy-kill
# TODO: HOST SPECIFIC ALIASES
# I do not see a way right now the have different aliases per host with nu.
# CUSTOM LITTLE JAVA COMMANDS
export alias aes = java ($env.DOTFILES + /tools/ + aes.java)
export alias download = java ($env.DOTFILES + /tools/ + download.java)
export alias download_jar = java ($env.DOTFILES + /tools/ + download_jar.java)
# systemd
export alias userctl = systemctl --user
+1 / −1 text lines
+48 / −47 text lines
# Disable specific steps - same options as the command line flagdisable = ["wsl", "vim"]assume_yes = true# Run specific steps - same options as the command line flag#only = ["system", "emacs"]# Do not ask to retry failed steps (default: false)no_retry = true# Do not set the terminal titleset_title = true# Display the time in step titlesdisplay_time = true# Cleanup temporary or old filescleanup = true[composer]self_update = true[git]# Additional git repositories to pullrepos = ["W:/*/"]max_concurrency = 12pull_predefined = false# Arguments to pass Git when pulling Repositories# arguments = "--ff --rebase"[windows]enable_winget = true# Commands to run before anything[pre_commands]"01 - Scoop Export" = "scoop export --config > 'X:/scoop_installed_apps.json' *> $null"[commands]"00 - Refresh dotfiles" = "java W:/dotfiles/bootstripper.java W:/dotfiles""01 - Install Cargo Tools" = "nu --env-config ~/AppData/Roaming/nushell/env.nu W:/dotfiles/tools/cargo-tools.nu""02 - Advantage-PM Client" = "nu X:/update_apm_client.nu""03 - MeMate" = "nu X:/update_memate.nu""04 - TLDR" = "tldr --update"[misc]
# Disable specific steps - same options as the command line flag
disable = ["wsl", "vim"]
assume_yes = true
# Run specific steps - same options as the command line flag
#only = ["system", "emacs"]
# Do not ask to retry failed steps (default: false)
no_retry = true
# Do not set the terminal title
set_title = true
# Display the time in step titles
display_time = true
# Cleanup temporary or old files
cleanup = true
[composer]
self_update = true
[git]
# Additional git repositories to pull
repos = ["W:/*/"]
max_concurrency = 12
pull_predefined = false
# Arguments to pass Git when pulling Repositories
# arguments = "--ff --rebase"
[windows]
enable_winget = true
# Commands to run before anything
[pre_commands]
"01 - Scoop Export" = "scoop export --config > 'X:/scoop_installed_apps.json' *> $null"
[commands]
"00 - Refresh dotfiles" = "java W:/dotfiles/bootstripper.java W:/dotfiles"
"01 - Install Cargo Tools" = "nu --env-config ~/AppData/Roaming/nushell/env.nu W:/dotfiles/tools/cargo-tools.nu"
"02 - Advantage-PM Client" = "nu X:/update_apm_client.nu"
"03 - MeMate" = "nu X:/update_memate.nu"
"04 - TLDR" = "tldr --update"
+1 / −0 text lines