Merge branch 'trunk' of github.com:bugabinga/dotfiles into trunk
7ff140a95d348dde5013caa1b6541e5342771571
Oliver Krylow <o.krylow@isp-insoft.de> ·
unsigned
- Parent 1: 9437588ff85d · Showing diff
- Parent 2: 23e889720d10 · Diff against parent 2
bugabingas dorkfiles
7ff140a95d348dde5013caa1b6541e5342771571
Oliver Krylow <o.krylow@isp-insoft.de> ·
unsigned
+295 / −332 text lines
+7 / −11 text lines
* pandoc with lua filters for diagrams for generating documents and previewing --> https://github.com/tex/vimpreviewpandoc* use gen.ai to generate docs* Move to treesitter main branch* LuaLS is getting crazy diagnosing non-stop...* ]s [s to jump to spelling mistakes* learn marks and refactor mark.lua* try Termdebug with gdb* refactor mark.lua* Do I want multiple LSPs per buffer? In case of markdown and text it seems useful, for code it seems like a headache...* try Termdebug with gdb+29 / −20 text lines
surrounds = { ['P'] = { add = { 'vim.print(', ')', }, find = 'vim%.print%b()', delete = '^(vim%.print%()().-(%))()$', change = { target = '^(vim%.print%()().-(%))()$', }, }, }, surrounds = { ['R'] = { add = { "require '", "'", }, find = "require%b''", --FIXME: find out how to craft these, those cannot be correct right now delete = "^(require')().-(')()$", change = { target = "^(require')().-('()$", }, }, ['P'] = { add = { 'vim.print(', ')', }, find = 'vim%.print%b()', delete = '^(vim%.print%()().-(%))()$', change = { target = '^(vim%.print%()().-(%))()$', }, }, },+1 / −1 text lines
+119 / −130 text lines
'hrsh7th/nvim-cmp', lazy = false, dependencies = { 'hrsh7th/cmp-nvim-lsp', 'hrsh7th/cmp-buffer', 'hrsh7th/cmp-path', 'hrsh7th/cmp-nvim-lua', 'saadparwaiz1/cmp_luasnip', 'onsails/lspkind.nvim', 'L3MON4D3/LuaSnip', }, config = function () local cmp = require 'cmp' local luasnip = require 'luasnip' local MAX_INDEX_FILE_SIZE = 4000 'hrsh7th/nvim-cmp', lazy = false, dependencies = { 'hrsh7th/cmp-nvim-lsp', 'hrsh7th/cmp-buffer', 'hrsh7th/cmp-path', 'hrsh7th/cmp-nvim-lua', 'saadparwaiz1/cmp_luasnip', 'onsails/lspkind.nvim', 'L3MON4D3/LuaSnip', }, config = function () local cmp = require 'cmp' local luasnip = require 'luasnip' local MAX_INDEX_FILE_SIZE = 4000 local snippet_prev = function ( fallback ) if luasnip.jumpable( -1 ) then luasnip.jump( -1 ) elseif cmp.visible() then cmp.select_prev_item() else fallback() end end local mapping = cmp.mapping.preset.insert { ['<C-d>'] = cmp.mapping.scroll_docs( -4 ), ['<C-f>'] = cmp.mapping.scroll_docs( 4 ), ['<C-e>'] = cmp.mapping.close(), ['<C-y>'] = cmp.mapping.confirm { behavior = cmp.ConfirmBehavior.Replace, select = true, }, ['<C-space>'] = cmp.mapping.complete(), ['<Tab>'] = cmp.mapping( snippet_next, { 'i', 's', } ), ['<S-Tab>'] = cmp.mapping( snippet_prev, { 'i', 's', } ), } local mapping = cmp.mapping.preset.insert { ['<C-d>'] = cmp.mapping.scroll_docs( -4 ), ['<C-f>'] = cmp.mapping.scroll_docs( 4 ), ['<C-e>'] = cmp.mapping.close(), ['<C-y>'] = cmp.mapping.confirm { behavior = cmp.ConfirmBehavior.Replace, select = true, }, ['<C-space>'] = cmp.mapping.complete(), ['<Tab>'] = cmp.mapping( snippet_next, { 'i', 's', } ), ['<S-Tab>'] = cmp.mapping( snippet_prev, { 'i', 's', } ), } local formatting = {} local ok, lspkind = pcall( require, 'lspkind' ) if ok then formatting.format = lspkind.cmp_format { mode = 'symbol', symbol_map = { Copilot = icon.copilot, Class = icon.class, Color = icon.color, Constant = icon.constant, Constructor = icon.constructor, Enum = icon.enum, EnumMember = icon.enum_member, Event = icon.event, Field = icon.field, File = icon.file, Folder = icon.folder, Function = icon['function'], Interface = icon.interface, Keyword = icon.keyword, Method = icon.method, Module = icon.module, Operator = icon.operator, Property = icon.property, Reference = icon.reference, Snippet = icon.snippet, Struct = icon.struct, Text = icon.text, TypeParameter = icon.type_parameter, Unit = icon.unit, Value = icon.value, Variable = icon.variable, }, menu = { buffer = '[buf]', nvim_lsp = '[LSP]', nvim_lua = '[nvim]', path = '[path]', luasnip = '[snip]', }, } end --TODO: use custom icons local formatting = {} local ok, lspkind = pcall( require, 'lspkind' ) if ok then formatting.format = lspkind.cmp_format { mode = 'symbol', symbol_map = { Copilot = icon.copilot, Class = icon.class, Color = icon.color, Constant = icon.constant, Constructor = icon.constructor, Enum = icon.enum, EnumMember = icon.enum_member, Event = icon.event, Field = icon.field, File = icon.file, Folder = icon.folder, Function = icon['function'], Interface = icon.interface, Keyword = icon.keyword, Method = icon.method, Module = icon.module, Operator = icon.operator, Property = icon.property, Reference = icon.reference, Snippet = icon.snippet, Struct = icon.struct, Text = icon.text, TypeParameter = icon.type_parameter, Unit = icon.unit, Value = icon.value, Variable = icon.variable, }, menu = { buffer = '[buf]', nvim_lsp = '[LSP]', nvim_lua = '[nvim]', path = '[path]', luasnip = '[snip]', }, } end local sources = { { name = 'neodev', }, { name = 'nvim_lua', }, { name = 'nvim_lsp', }, { name = 'path', }, { name = 'luasnip', }, { name = 'neorg', }, { name = 'buffer', keyword_length = 4, options = { get_bufnrs = function () local bufs = {} for _, bufnr in ipairs( vim.api.nvim_list_bufs() ) do -- Don't index giant files if vim.api.nvim_buf_is_loaded( bufnr ) and vim.api.nvim_buf_line_count( bufnr ) < MAX_INDEX_FILE_SIZE then table.insert( bufs, bufnr ) end end return bufs end, }, }, } local sources = { { name = 'nvim_lua', }, { name = 'nvim_lsp', }, { name = 'path', }, { name = 'luasnip', }, { name = 'neorg', }, { name = 'buffer', keyword_length = 4, options = { get_bufnrs = function () local bufs = {} for _, bufnr in ipairs( vim.api.nvim_list_bufs() ) do -- Don't index giant files if vim.api.nvim_buf_is_loaded( bufnr ) and vim.api.nvim_buf_line_count( bufnr ) < MAX_INDEX_FILE_SIZE then table.insert( bufs, bufnr ) end end return bufs end, }, }, }deleted file mode 100644+0 / −21 text lines
local map = require 'std.map'map.normal { description = 'Open clipboard history...', category = 'history', keys = '<c-p><c-h>', command = function () local telescope = require 'telescope' telescope.load_extension 'neoclip' telescope.extensions.neoclip.default() end,}return { 'AckslD/nvim-neoclip.lua', event = 'TextYankPost', dependencies = { 'nvim-telescope/telescope.nvim', }, opts = {},}+139 / −140 text lines
description = 'Open search for buffers...', category = 'search', keys = '<c-e>', command = function () require 'telescope.builtin'.buffers() end, description = 'Open search for buffers...', category = 'search', keys = '<c-e>', command = function () require 'telescope.builtin'.buffers() end,}map.normal { description = 'Open clipboard history...', category = 'history', keys = '<c-p><c-v>', command = function () require 'telescope'.extensions.neoclip.default() end, 'nvim-telescope/telescope.nvim', version = '0.*', cmd = 'Telescope', event = 'VeryLazy', dependencies = { { 'nvim-telescope/telescope-fzf-native.nvim', build = function ( plugin_spec ) local result result = vim.system( { 'cmake', '-S.', '-Bbuild', '-DCMAKE_BUILD_TYPE=Release', }, { text = true, cwd = plugin_spec.dir, } ):wait() if result.code ~= 0 then error( result.stderr ) end result = vim.system( { 'cmake', '--build', 'build', '--config', 'Release', }, { text = true, cwd = plugin_spec.dir, } ):wait() if result.code ~= 0 then error( result.stderr ) end result = vim.system( { 'cmake', '--install', 'build', '--prefix', 'build', }, { text = true, cwd = plugin_spec.dir, } ):wait() if result.code ~= 0 then error( result.stderr ) end end, }, 'nvim-lua/plenary.nvim', 'nvim-tree/nvim-web-devicons', 'nvim-telescope/telescope-symbols.nvim', 'jvgrootveld/telescope-zoxide', }, config = function () local telescope = require 'telescope' local actions = require 'telescope.actions' local themes = require 'telescope.themes' 'nvim-telescope/telescope.nvim', version = '0.*', cmd = 'Telescope', event = 'VeryLazy', dependencies = { { 'nvim-telescope/telescope-fzf-native.nvim', build = function ( plugin_spec ) local result result = vim.system( { 'cmake', '-S.', '-Bbuild', '-DCMAKE_BUILD_TYPE=Release', }, { text = true, cwd = plugin_spec.dir, } ):wait() if result.code ~= 0 then error( result.stderr ) end result = vim.system( { 'cmake', '--build', 'build', '--config', 'Release', }, { text = true, cwd = plugin_spec.dir, } ):wait() if result.code ~= 0 then error( result.stderr ) end result = vim.system( { 'cmake', '--install', 'build', '--prefix', 'build', }, { text = true, cwd = plugin_spec.dir, } ):wait() if result.code ~= 0 then error( result.stderr ) end end, }, 'nvim-lua/plenary.nvim', 'nvim-tree/nvim-web-devicons', 'nvim-telescope/telescope-symbols.nvim', 'jvgrootveld/telescope-zoxide', 'AckslD/nvim-neoclip.lua', }, config = function () local telescope = require 'telescope' local actions = require 'telescope.actions' local themes = require 'telescope.themes' local ivy = themes.get_ivy { hidden = true, layout_config = { preview_width = 0.69, }, } local dropdown = themes.get_dropdown { layout_config = { width = 0.69, }, } local cursor = themes.get_cursor { layout_config = { preview_width = 0.42, width = 0.69, }, } local ivy = themes.get_ivy { hidden = true, layout_config = { preview_width = 0.69, }, } telescope.setup { defaults = { selection_strategy = 'reset', hidden = true, scroll_strategy = 'limit', wrap_results = true, layout_config = { horizontal = { prompt_position = 'bottom', preview_width = 0.69, }, vertical = { mirror = false, }, width = 0.69, height = 0.42, preview_cutoff = 124, }, prompt_prefix = icon.telescope .. ' ', selection_caret = icon.arrow_right .. ' ', file_ignore_patterns = { '.git/', '.svn/', '.cache', '%.o', '%.a', '%.out', '%.class', '%.pdf', '%.mkv', '%.mp4', '%.zip', '%.spl', }, mappings = { i = { ['<c-j>'] = actions.cycle_history_next, ['<c-k>'] = actions.cycle_history_prev, ['<c-n>'] = actions.move_selection_next, ['<c-p>'] = actions.move_selection_previous, ['<c-s>'] = actions.file_split, ['g?'] = actions.which_key, }, n = { q = actions.close, }, }, }, -- FIXME: some themes have an issue, where filtered results do not get -- selected and are not in view pickers = { find_files = ivy, fd = ivy, keymaps = dropdown, diagnostics = dropdown, symbols = cursor, live_grep = ivy, current_buffer_fuzzy_find = cursor, buffers = cursor, help_tags = dropdown, }, extensions = { zoxide = { prompt_title = 'Navigate deez nuts!', }, }, } telescope.setup { defaults = { hidden = true, prompt_prefix = icon.telescope .. ' ', selection_caret = icon.arrow_right .. ' ', file_ignore_patterns = { '.git/', '.svn/', '.cache', '%.o', '%.a', '%.out', '%.class', '%.pdf', '%.mkv', '%.mp4', '%.zip', '%.spl', }, mappings = { i = { ['<c-j>'] = actions.cycle_history_next, ['<c-k>'] = actions.cycle_history_prev, ['<c-n>'] = actions.move_selection_next, ['<c-p>'] = actions.move_selection_previous, ['<c-s>'] = actions.file_split, ['g?'] = actions.which_key, }, n = { q = actions.close, }, }, }, pickers = { find_files = ivy, fd = ivy, keymaps = ivy, diagnostics = ivy, symbols = ivy, live_grep = ivy, current_buffer_fuzzy_find = ivy, buffers = ivy, help_tags = ivy, }, extensions = { zoxide = { prompt_title = 'Navigate deez nuts!', }, }, }+0 / −9 text lines