Merge branch 'trunk' of github.com:bugabinga/dotfiles into trunk
02b5c199df283412557485eed71303f653363135
Oliver Jan Krylow <oliver@bugabinga.net> ·
unsigned
- Parent 1: 83ed855f3300 · Diff against parent 1
- Parent 2: 239ef29d07c6 · Showing diff
bugabingas dorkfiles
02b5c199df283412557485eed71303f653363135
Oliver Jan Krylow <oliver@bugabinga.net> ·
unsigned
+210 / −0 text lines
new file mode 100644+14 / −0 text lines
local map = require 'std.map'map.insert { description = 'Moves in or out of balanced tokens', category = 'editing', keys = '<c-space>', command = function () require 'in-and-out'.in_and_out() end,}return { 'ysmb-wtsg/in-and-out.nvim', commit = 'ab24cafadc3418dffb0c7e9b0621cff60b9ac551', event = 'VeryLazy',}new file mode 100644+131 / −0 text lines
local ignored = require 'std.ignored'local icon = require 'std.icon'-- this file lists plugins in their "incubation" phase.-- that means i am testing those out of curiosity, but am not sure yet i wish-- to use and depend on them.--return { ------------------------------------------------------------------------------- { 'gregorias/toggle.nvim', lazy = false, version = '2.0', config = true, }, ------------------------------------------------------------------------------- { 'quentingruber/timespent.nvim', keys = { { '<leader>tS', '<cmd>:ShowTimeSpent<cr>', mode = { 'n', }, desc = 'Show time spent', }, }, }, ------------------------------------------------------------------------------- { 'nvim-telescope/telescope-frecency.nvim', config = function () require 'telescope'.load_extension 'frecency' end, keys = { { '<c-p><c-f>', '<cmd>Telescope frecency<cr>', mode = { 'n' }, desc = 'telescope: Show recently and frequently used files.', }, }, }, { 'cenk1cenk2/scratch.nvim', }, ------------------------------------------------------------------------------- { 'AdeAttwood/ivy.nvim', lazy = false, build = 'cargo build --release', opts = {}, }, ------------------------------------------------------------------------------- { 'rachartier/tiny-inline-diagnostic.nvim', event = 'LspAttach', config = function () require 'tiny-inline-diagnostic'.setup() end, }, ------------------------------------------------------------------------------- { 'chrisgrieser/nvim-lsp-endhints', event = 'LspAttach', opts = { icons = { type = icon.tye, parameter = icon.paramter, offspec = '', -- hint kind not defined in official LSP spec unknown = icon.hint, -- hint kind }, label = { padding = 2, }, }, }, ------------------------------------------------------------------------------- { 'ravibrock/spellwarn.nvim', event = 'VeryLazy', config = true, }, ------------------------------------------------------------------------------- { 'emmanueltouzery/decisive.nvim', config = function () require 'decisive'.setup {} end, lazy = true, ft = { 'csv' }, keys = { { '<leader>cca', ":lua require('decisive').align_csv({})<cr>", { silent = true }, desc = 'Align CSV', mode = 'n' }, { '<leader>ccA', ":lua require('decisive').align_csv_clear({})<cr>", { silent = true }, desc = 'Align CSV clear', mode = 'n' }, { '[c', ":lua require('decisive').align_csv_prev_col()<cr>", { silent = true }, desc = 'Align CSV prev col', mode = 'n' }, { ']c', ":lua require('decisive').align_csv_next_col()<cr>", { silent = true }, desc = 'Align CSV next col', mode = 'n' }, }, }, ------------------------------------------------------------------------------- { 'tris203/precognition.nvim', event = 'VeryLazy', opts = { startVisible = true, showBlankVirtLine = true, highlightColor = { link = 'LineNr' }, -- hints = { -- Caret = { text = "^", prio = 2 }, -- Dollar = { text = "$", prio = 1 }, -- MatchingPair = { text = "%", prio = 5 }, -- Zero = { text = "0", prio = 1 }, -- w = { text = "w", prio = 10 }, -- b = { text = "b", prio = 9 }, -- e = { text = "e", prio = 8 }, -- W = { text = "W", prio = 7 }, -- B = { text = "B", prio = 6 }, -- E = { text = "E", prio = 5 }, -- }, -- gutterHints = { -- G = { text = "G", prio = 10 }, -- gg = { text = "gg", prio = 9 }, -- PrevParagraph = { text = "{", prio = 8 }, -- NextParagraph = { text = "}", prio = 8 }, -- }, disabled_fts = ignored.filetypes, }, }, -------------------------------------------------------------------------------}new file mode 100644+6 / −0 text lines
new file mode 100644+1 / −0 text lines
require 'patches.snippet'new file mode 100644+20 / −0 text lines
--- source https://boltlessengineer.github.io/posts/neovim-config-without-plugins/------@param trigger string trigger string for snippet---@param body string snippet text that will be expanded---@param opts? vim.keymap.set.Opts------Refer to <https://microsoft.github.io/language-server-protocol/specification/#snippet_syntax>---for the specification of valid body.function vim.snippet.add( trigger, body, opts ) vim.keymap.set( 'ia', trigger, function () -- If abbrev is expanded with keys like "(", ")", "<cr>", "<space>", -- don't expand the snippet. Only accept "<c-]>" as trigger key. local c = vim.fn.nr2char( vim.fn.getchar( 0 ) ) if c ~= '' then vim.api.nvim_feedkeys( trigger .. c, 'i', true ) return end vim.snippet.expand( body ) end, opts )endnew file mode 100644+38 / −0 text lines
return { win32 = vim.loop.os_uname().sysname:match 'Win', wsl2 = vim.loop.os_uname().release:match 'WSL2', os_background = (function () -- Default value local background = 'light' local uname = vim.uv.os_uname() -- First check whether we are on WSL or Windows if vim.loop.os_uname().release:match 'WSL2' then -- Check if 'reg.exe' is executable if vim.fn.executable 'reg.exe' ~= 0 then -- Execute command to check if the win32 appearance is set to Dark local appsUseLightTheme = vim.fn.system { 'reg.exe', 'Query', 'HKCU\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize', '/v', 'AppsUseLightTheme' } if not appsUseLightTheme:find '0x1' then background = 'dark' end end -- Check if 'busctl' is executable (part of systemd) elseif vim.fn.executable 'busctl' ~= 0 then -- Get the current color scheme from xdg-desktop-portal using busctl local result = vim.fn.system { 'busctl', '--user', 'call', 'org.freedesktop.portal.Desktop', '/org/freedesktop/portal/desktop', 'org.freedesktop.portal.Settings', 'ReadOne', 'ss', 'org.freedesktop.appearance', 'color-scheme', } -- The result is in the form of "v u 0" for light and "v u 1" for dark local color_scheme = result:match 'u%s+(%d+)' if color_scheme == '1' then background = 'dark' end else end return background end)(),}