diff options
| author | Robert Günzler <r@gnzler.io> | 2026-02-10 12:32:48 +0100 |
|---|---|---|
| committer | Robert Günzler <r@gnzler.io> | 2026-02-10 12:41:25 +0100 |
| commit | 63feeb9f369fc6176e85c1c2d8fcc863caad1946 (patch) | |
| tree | 41cd5d2d1ec36e74e464caab722cc9b460153f04 /.vim | |
| parent | 5bd0a4aca65ecb9818ef1285982d160b6b6ff665 (diff) | |
start new
Signed-off-by: Robert Günzler <r@gnzler.io>
Diffstat (limited to '.vim')
59 files changed, 1 insertions, 2887 deletions
diff --git a/.vim b/.vim new file mode 120000 index 0000000..9fb2b6e --- /dev/null +++ b/.vim @@ -0,0 +1 @@ +/home/robert/.config/nvim \ No newline at end of file diff --git a/.vim/.editorconfig b/.vim/.editorconfig deleted file mode 100644 index c0b69e9..0000000 --- a/.vim/.editorconfig +++ /dev/null @@ -1,11 +0,0 @@ -root = true - -[*] -indent_style = space -indent_size = 2 -tab_width = 8 -end_of_line = lf -insert_final_newline = true - -[*.lua] -max_line_length = 100 diff --git a/.vim/.stylua.toml b/.vim/.stylua.toml deleted file mode 100644 index 616d360..0000000 --- a/.vim/.stylua.toml +++ /dev/null @@ -1,6 +0,0 @@ -column_width = 100 -line_endings = "Unix" -indent_type = "Spaces" -indent_width = 2 -quote_style = "AutoPreferSingle" -#call_parentheses = "Always" diff --git a/.vim/after/ftplugin/c.lua b/.vim/after/ftplugin/c.lua deleted file mode 100644 index 8b2cea9..0000000 --- a/.vim/after/ftplugin/c.lua +++ /dev/null @@ -1 +0,0 @@ -vim.opt_local.commentstring = '// %s' diff --git a/.vim/after/ftplugin/html.lua b/.vim/after/ftplugin/html.lua deleted file mode 100644 index 35f0bd1..0000000 --- a/.vim/after/ftplugin/html.lua +++ /dev/null @@ -1,20 +0,0 @@ -local function get_visual_selection() - local start_pos = vim.fn.getpos('v') - local end_pos = vim.fn.getpos('.') - local text = vim.fn.getregion(vim.fn.getpos('v'), vim.fn.getpos('.'), { type = vim.fn.mode() }) - return { start_pos = start_pos, end_pos = end_pos, text = text } -end - -vim.keymap.set('x', '<c-l>', function() - local sel = get_visual_selection() - vim.print(sel) - vim.api.nvim_buf_set_text( - sel.start_pos[1], -- bufnum - sel.start_pos[2] - 1, -- vim.api funcs use 0-based indexing - sel.start_pos[3] - 1, - sel.end_pos[2] - 1, - sel.end_pos[3], - { '<a href="TODO">' .. table.concat(sel.text, '') .. '</a>' } - ) - vim.api.nvim_input('<esc>') -end, { desc = 'html: make link' }) diff --git a/.vim/after/ftplugin/lua.lua b/.vim/after/ftplugin/lua.lua deleted file mode 100644 index ff08e11..0000000 --- a/.vim/after/ftplugin/lua.lua +++ /dev/null @@ -1,2 +0,0 @@ -vim.keymap.set('n', '<leader><leader>x', '<cmd>source %<cr>', { desc = 'Reload buf' }) -vim.keymap.set('n', '<leader><leader>X', ':Lazy reload ', { desc = 'Reload plugin' }) diff --git a/.vim/after/ftplugin/mail.lua b/.vim/after/ftplugin/mail.lua deleted file mode 100644 index fba17a2..0000000 --- a/.vim/after/ftplugin/mail.lua +++ /dev/null @@ -1,2 +0,0 @@ -vim.opt_local.cursorline = false -vim.opt_local.commentstring = '> %s' diff --git a/.vim/after/ftplugin/markdown.lua b/.vim/after/ftplugin/markdown.lua deleted file mode 100644 index 9b98392..0000000 --- a/.vim/after/ftplugin/markdown.lua +++ /dev/null @@ -1,6 +0,0 @@ --- TODO: no idea if this is the best way to do this --- the part that makes this work lives in ../../../after/ftplugin/markdown.lua -require('null-ls').disable('vale') -vim.keymap.set('n', '<leader>v', function() - require('null-ls').toggle('vale') -end) diff --git a/.vim/after/ftplugin/mediawiki.lua b/.vim/after/ftplugin/mediawiki.lua deleted file mode 100644 index 5011e85..0000000 --- a/.vim/after/ftplugin/mediawiki.lua +++ /dev/null @@ -1,5 +0,0 @@ -vim.opt.wrap = true -vim.opt.linebreak = true - -vim.keymap.set({ 'n', 'v' }, 'j', 'gj', { buffer = true }) -vim.keymap.set({ 'n', 'v' }, 'k', 'gk', { buffer = true }) diff --git a/.vim/after/queries.bak/markdown/highlights.scm b/.vim/after/queries.bak/markdown/highlights.scm deleted file mode 100644 index 9aba385..0000000 --- a/.vim/after/queries.bak/markdown/highlights.scm +++ /dev/null @@ -1,100 +0,0 @@ -;; inherits: markdown -;; extends - -;From MDeiml/tree-sitter-markdown & Helix - -(list_item (task_list_marker_checked)) @comment (#set! "priority" 90) - -[ - (list_marker_plus) - (list_marker_minus) - (list_marker_star) - (list_marker_dot) - (list_marker_parenthesis) - (thematic_break) -] @string - -[ - (task_list_marker_checked) - (task_list_marker_unchecked) -] @task_marker - -[ - (atx_h1_marker) - (atx_h2_marker) - (atx_h3_marker) - (atx_h4_marker) - (atx_h5_marker) - (atx_h6_marker) -] @header_marker - -(atx_heading) @header_content - -; concealing -((atx_h1_marker) @header_marker.h1 - (#offset! @header_marker.h1 0 0 0 0) - ;(#set! conceal " ") -) - -((atx_h2_marker) @header_marker.h2 - (#offset! @header_marker.h2 0 0 0 0) - ;(#set! conceal " ") -) - -((atx_h3_marker) @header_marker.h3 - (#offset! @header_marker.h3 0 0 0 0) - ;(#set! conceal " ") -) - -((atx_h4_marker) @header_marker.h4 - (#offset! @header_marker.h4 0 0 0 0) - ;(#set! conceal " ") -) - -((atx_h5_marker) @header_marker.h5 - (#offset! @header_marker.h5 0 0 0 0) - ;(#set! conceal " ") -) - -((atx_h6_marker) @header_marker.h6 - (#offset! @header_marker.h6 0 0 0 0) - ;(#set! conceal " ") -) - -; used for first level list items -((list_marker_star) @list_marker.star - (#offset! @list_marker.star 0 0 0 -1) - ;(#set! conceal " ") -) -; used for second level list items -((list_marker_minus) @list_marker.minus - (#offset! @list_marker.minus 0 0 0 -1) - ;(#set! conceal " ") -) - -((list_marker_plus) @list_marker.plus - (#offset! @list_marker.plus 0 0 0 -1) - ;(#set! conceal " ") -) -((list_marker_dot) @list_marker.dot - (#offset! @list_marker.dot 0 0 0 -1) - ;(#set! conceal " ") -) -((list_marker_parenthesis) @list_marker.parenthesis - (#offset! @list_marker.parenthesis 0 0 0 -1) - ;(#set! conceal " ") -) - -;; replace '[x]' with -((task_list_marker_checked) @text.todo.checked - (#offset! @text.todo.checked 0 -2 0 0) - (#set! conceal "☑ ") -) - -;; replace '[ ]' with -((task_list_marker_unchecked) @text.todo.unchecked - (#offset! @text.todo.unchecked 0 -2 0 0) - (#set! conceal "☐ ") -) - -([(minus_metadata)] @comment) diff --git a/.vim/after/queries.bak/markdown_inline/highlights.scm b/.vim/after/queries.bak/markdown_inline/highlights.scm deleted file mode 100644 index ab0a7f4..0000000 --- a/.vim/after/queries.bak/markdown_inline/highlights.scm +++ /dev/null @@ -1,11 +0,0 @@ -;; inherits: markdown_inline -;; extends - -([ - (code_span_delimiter) - (shortcut_link) -] @comment) - -([ - (link_text) -] @string) diff --git a/.vim/init.lua b/.vim/init.lua deleted file mode 100644 index e2682cd..0000000 --- a/.vim/init.lua +++ /dev/null @@ -1,48 +0,0 @@ -local g = vim.g -g.mapleader = ' ' -- <leader> key to <space> -g.maplocalleader = '\\' - --- disable distribution plugins -vim.g.loaded_gzip = 1 -vim.g.loaded_tar = 1 -vim.g.loaded_tarPlugin = 1 -vim.g.loaded_zip = 1 -vim.g.loaded_zipPlugin = 1 -vim.g.loaded_getscript = 1 -vim.g.loaded_getscriptPlugin = 1 -vim.g.loaded_vimball = 1 -vim.g.loaded_vimballPlugin = 1 -vim.g.loaded_matchit = 1 -vim.g.loaded_2html_plugin = 1 -vim.g.loaded_logiPat = 1 -vim.g.loaded_rrhelper = 1 -vim.g.loaded_netrw = 1 -vim.g.loaded_netrwPlugin = 1 -vim.g.loaded_netrwSettings = 1 -vim.g.loaded_netrwFileHandlers = 1 - --- prevent bluescreen --- https://github.com/neovim/neovim/issues/29505 --- https://github.com/folke/lazy.nvim/issues/1438 -vim.cmd('highlight Normal guibg=NONE guifg=NONE ctermbg=NONE ctermfg=NONE') -vim.opt.termguicolors = true - --- install lazy -local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim' -if not vim.uv.fs_stat(lazypath) then - vim.fn.system({ - 'git', - 'clone', - '--filter=blob:none', - 'https://github.com/folke/lazy.nvim.git', - '--branch=stable', - lazypath, - }) -end -vim.opt.rtp:prepend(lazypath) - -require('lazy').setup({ import = 'internal/plugins' }, { - change_detection = { notify = false }, - defaults = { lazy = true }, - dev = { path = '~/src' }, -}) diff --git a/.vim/lazy-lock.json b/.vim/lazy-lock.json deleted file mode 100644 index 9c0b3bd..0000000 --- a/.vim/lazy-lock.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" }, - "acme.nvim": { "branch": "main", "commit": "fb22d6ebc8c05d8958b757743982b32d23c607f4" }, - "aerial.nvim": { "branch": "master", "commit": "44684bf429dc40e97a6d00ffa09043ac3f692186" }, - "blink.cmp": { "branch": "main", "commit": "cb5e346d9e0efa7a3eee7fd4da0b690c48d2a98e" }, - "conform.nvim": { "branch": "master", "commit": "eebc724d12c5579d733d1f801386e0ceb909d001" }, - "decisive.nvim": { "branch": "main", "commit": "ead9188df6411a52d8859552b8332cb864d22171" }, - "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, - "fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" }, - "fzf-lua": { "branch": "main", "commit": "addb648ffe152c353232e8a88ff1364cbcf1ed1b" }, - "gentoo-syntax": { "branch": "master", "commit": "929bbebb5430f9d23032b138a57252d21b7db243" }, - "git-dev.nvim": { "branch": "master", "commit": "f8894349d04b2d922f2d170c5d66db729236d86f" }, - "gitgraph.nvim": { "branch": "main", "commit": "01e466b32c346a165135dd47d42f1244eca06572" }, - "gitlinker.nvim": { "branch": "master", "commit": "23982c86f50a9c3f4bc531d41b7a4a68ddd12355" }, - "gitsigns.nvim": { "branch": "main", "commit": "fcfa7a989cd6fed10abf02d9880dc76d7a38167d" }, - "guess-indent.nvim": { "branch": "main", "commit": "84a4987ff36798c2fc1169cbaff67960aed9776f" }, - "indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" }, - "lackluster.nvim": { "branch": "main", "commit": "d2519d14b2b6e9eef05752d5d4486ed5c48d6178" }, - "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, - "lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" }, - "markdown.nvim": { "branch": "master", "commit": "dfa0d2def6dbf77e9206b16dc90cad4dd23d55d2" }, - "mediawiki.vim": { "branch": "master", "commit": "26e5737264354be41cb11d16d48132779795e168" }, - "mini.ai": { "branch": "main", "commit": "e139eb1101beb0250fea322f8c07a42f0f175688" }, - "mini.align": { "branch": "main", "commit": "2b42ac0be7d570c2208f9e334ecef13453cd222d" }, - "mini.icons": { "branch": "main", "commit": "397ed3807e96b59709ef3292f0a3e253d5c1dc0a" }, - "mini.operators": { "branch": "main", "commit": "c6d87731f1a2c849888754347ffc5a1395bf2977" }, - "mini.surround": { "branch": "main", "commit": "5aab42fcdcf31fa010f012771eda5631c077840a" }, - "none-ls.nvim": { "branch": "main", "commit": "1280b7965b6ed17787ffab1d4e3d9795ecdd0f51" }, - "nvim-cmp": { "branch": "main", "commit": "ca0d80189fe4a2166b6b68c0e8abe231a75eff6b" }, - "nvim-colorizer.lua": { "branch": "master", "commit": "517df88cf2afb36652830df2c655df2da416a0ae" }, - "nvim-lspconfig": { "branch": "master", "commit": "3a7387a9c980304059b2bd7075684d6ef98ff331" }, - "nvim-treesitter": { "branch": "master", "commit": "684eeac91ed8e297685a97ef70031d19ac1de25a" }, - "nvim-treesitter-refactor": { "branch": "master", "commit": "d8b74fa87afc6a1e97b18da23e762efb032dc270" }, - "nvim-treesitter-textobjects": { "branch": "master", "commit": "205e3369bc83d8cb83f7409c36120e24611f8c5c" }, - "oil.nvim": { "branch": "master", "commit": "302bbaceeafc690e6419e0c8296e804d60cb9446" }, - "playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" }, - "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, - "render-markdown": { "branch": "main", "commit": "a2c2493c21cf61e5554ee8bc83da75bd695921da" }, - "telescope.nvim": { "branch": "master", "commit": "85922dde3767e01d42a08e750a773effbffaea3e" }, - "timerly": { "branch": "main", "commit": "17299a4d332c483ce09052fe8478b41b992f2594" }, - "tiny-inline-diagnostic.nvim": { "branch": "main", "commit": "220cba7596cc2ff95c251d3173b26eaf9924ec10" }, - "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, - "twilight.nvim": { "branch": "main", "commit": "1584c0b0a979b71fd86b18d302ba84e9aba85b1b" }, - "volt": { "branch": "main", "commit": "c45d5f48da8e802e608b5c6da471ca4d84276dfb" }, - "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }, - "zen-mode.nvim": { "branch": "main", "commit": "863f150ca321b3dd8aa1a2b69b5f411a220e144f" }, - "zk-nvim": { "branch": "main", "commit": "d0bac443233635d18968affde4701db2cf2435b5" } -} diff --git a/.vim/lua/internal/colors.lua b/.vim/lua/internal/colors.lua deleted file mode 100644 index a03501f..0000000 --- a/.vim/lua/internal/colors.lua +++ /dev/null @@ -1,18 +0,0 @@ -return { - base00 = '#080808', - base01 = '#db4d6d', - base02 = '#5dac81', - base03 = '#fad689', - base04 = '#58b2dc', - base05 = '#70649a', - base06 = '#69b0ac', - base07 = '#bdc0ba', - base08 = '#4f4f48', - base09 = '#cb1b45', - base0A = '#86c166', - base0B = '#f7d94c', - base0C = '#2ea9df', - base0D = '#8a6bbe', - base0E = '#81c7d4', - base0F = '#fffffb', -} \ No newline at end of file diff --git a/.vim/lua/internal/plugins/aerial.lua b/.vim/lua/internal/plugins/aerial.lua deleted file mode 100644 index 0094e17..0000000 --- a/.vim/lua/internal/plugins/aerial.lua +++ /dev/null @@ -1,14 +0,0 @@ -return { - { - 'stevearc/aerial.nvim', - dependencies = { - 'nvim-treesitter/nvim-treesitter', - 'echasnovski/mini.icons', - }, - opts = {}, - keys = { - { '<leader>b', '<cmd>AerialToggle<cr>' }, - { '<c-,>', '<cmd>AerialToggle<cr>' }, - }, - }, -} diff --git a/.vim/lua/internal/plugins/blink.lua b/.vim/lua/internal/plugins/blink.lua deleted file mode 100644 index 1d0e0ae..0000000 --- a/.vim/lua/internal/plugins/blink.lua +++ /dev/null @@ -1,85 +0,0 @@ -return { - { - 'saghen/blink.cmp', - version = '1.*', - - lazy = false, - - dependencies = { - { - 'L3MON4D3/LuaSnip', - version = 'v2.*', - build = 'make install_jsregexp', - config = function() - require('internal.snippets') - end, - }, - }, - - init = function() - vim.opt.completeopt = { 'menu', 'menuone', 'noselect' } - vim.opt.shortmess:append('c') - vim.opt.pumheight = 20 -- max height of completion window - - local hl = vim.api.nvim_set_hl - hl(0, 'BlinkCmpSource', { link = 'Comment', force = true }) - hl(0, 'BlinkCmpLabelDescription', { link = 'Comment', force = true }) - end, - - opts = { - -- TODO: - -- 'prefer_rust_with_warning', requires nightly rust, due to: - -- https://github.com/rust-lang/rust/issues/86656 - fuzzy = { implementation = 'lua' }, - - appearance = { - -- fallback to cmp highlight names - use_nvim_cmp_as_default = true, - -- adjusts spacing to ensure icons are aligned - -- nerd_font_variant = 'normal', - }, - - sources = { - providers = { - buffer = { min_keyword_length = 3 }, - snippets = { min_keyword_length = 3 }, - }, - }, - - completion = { - documentation = { auto_show = true }, - menu = { - draw = { - columns = { - { 'kind_icon' }, - { 'label', 'label_description', gap = 1 }, - { 'source_name' }, - }, - }, - }, - }, - - signature = { - enabled = true, - window = { scrollbar = false }, -- BUG: weird artifacts - }, - - keymap = { - ['<C-space>'] = { 'show', 'show_documentation', 'hide_documentation' }, - ['<C-e>'] = { 'cancel', 'fallback' }, - ['<C-y>'] = { 'select_and_accept' }, - ['<C-p>'] = { 'select_prev', 'fallback' }, - ['<C-n>'] = { 'select_next', 'fallback' }, - ['<C-b>'] = { 'scroll_documentation_up', 'fallback' }, - ['<C-f>'] = { 'scroll_documentation_down', 'fallback' }, - ['<Tab>'] = { 'select_and_accept', 'fallback' }, - ['<C-j>'] = { 'snippet_forward', 'fallback' }, - ['<C-k>'] = { 'snippet_backward', 'fallback' }, - -- ['<C-l>'] = { 'show', 'hide', 'fallback' }, - }, - - snippets = { preset = 'luasnip' }, - }, - opts_extend = { 'sources.default' }, - }, -} diff --git a/.vim/lua/internal/plugins/cmp.lua b/.vim/lua/internal/plugins/cmp.lua deleted file mode 100644 index 086e1ac..0000000 --- a/.vim/lua/internal/plugins/cmp.lua +++ /dev/null @@ -1,31 +0,0 @@ -return { - { - enabled = false, - -- 'hrsh7th/nvim-cmp', - 'iguanacucumber/magazine.nvim', -- perf improvements - name = 'nvim-cmp', - lazy = false, - -- event = {'InsertEnter', 'CmdlineEnter' }, - priority = 100, - dependencies = { - 'hrsh7th/cmp-buffer', - 'hrsh7th/cmp-nvim-lsp', - 'https://codeberg.org/FelipeLema/cmp-async-path', - -- 'hrsh7th/cmp-nvim-lua', - 'hrsh7th/cmp-nvim-lsp-signature-help', -- used to provide function signature completion - 'hrsh7th/cmp-cmdline', - 'dmitmel/cmp-cmdline-history', - 'hrsh7th/cmp-nvim-lsp-document-symbol', -- used by cmdline completion - -- 'f3fora/cmp-spell', - - { 'L3MON4D3/LuaSnip', run = 'make install_jsregexp' }, - 'saadparwaiz1/cmp_luasnip', - - 'onsails/lspkind.nvim', - }, - config = function() - require('internal.snippets') - require('internal.completion') - end, - }, -} diff --git a/.vim/lua/internal/plugins/colorizer.lua b/.vim/lua/internal/plugins/colorizer.lua deleted file mode 100644 index cf55336..0000000 --- a/.vim/lua/internal/plugins/colorizer.lua +++ /dev/null @@ -1,16 +0,0 @@ -return { - { - 'NvChad/nvim-colorizer.lua', - -- 'norcalli/nvim-colorizer.lua', - -- events = { 'VeryLazy' }, - lazy = false, - opts = { - name = true, - RRGGBB = true, - RRGGBBAA = false, - rgb_fn = true, - hsl_fn = true, - mode = 'background', - }, - }, -} diff --git a/.vim/lua/internal/plugins/colorschemes.lua b/.vim/lua/internal/plugins/colorschemes.lua deleted file mode 100644 index e533ebb..0000000 --- a/.vim/lua/internal/plugins/colorschemes.lua +++ /dev/null @@ -1,59 +0,0 @@ -return { - { - enabled = false, - 'olivercederborg/poimandres.nvim', - lazy = false, - config = function() - require('poimandres').setup({ - disable_background = true, - -- dim_nc_background = true, - }) - end, - -- optionally set the colorscheme within lazy config - -- init = function() - -- vim.cmd('colorscheme poimandres') - -- end, - }, - { - enabled = true, - 'https://github.com/slugbyte/lackluster.nvim', - lazy = true, - config = function() - local lackluster = require('lackluster') - lackluster.setup({ - tweak_color = { - lack = '#70649a', - -- luster = '#ff0000', - }, - tweak_syntax = { - comment = lackluster.color.gray6, - }, - tweak_background = { - normal = 'none', - }, - tweak_highlight = { - ['@markup.heading'] = { - fg = '#ffffff', - }, - ['@comment'] = { - italic = true, - }, - }, - tweak_ui = { - enable_end_of_buffer = true, - }, - }) - end, - init = function() - vim.g.darkmode_colorscheme_dark = 'lackluster' - end, - }, - { - enabled = true, - 'https://github.com/elaijuh/acme.nvim', - lazy = true, - init = function() - vim.g.darkmode_colorscheme_light = 'acme' - end, - }, -} diff --git a/.vim/lua/internal/plugins/csv.lua b/.vim/lua/internal/plugins/csv.lua deleted file mode 100644 index bc4cb2c..0000000 --- a/.vim/lua/internal/plugins/csv.lua +++ /dev/null @@ -1,20 +0,0 @@ -return { - { - 'emmanueltouzery/decisive.nvim', - lazy = true, - ft = { 'csv' }, - main = 'decisive', - keys = { - { - '<leader>a', - function() - require('decisive').align_csv({}) - require('decisive').show_sticky_header() - end, - desc = 'decisive: Align CSV', - }, - { '[,', ":lua require('decisive').align_csv_prev_col()<cr>", desc = 'decisive: Prev column' }, - { '],', ":lua require('decisive').align_csv_next_col()<cr>", desc = 'decisive: Next column' }, - }, - }, -} diff --git a/.vim/lua/internal/plugins/fzf.lua b/.vim/lua/internal/plugins/fzf.lua deleted file mode 100644 index e8c0a9c..0000000 --- a/.vim/lua/internal/plugins/fzf.lua +++ /dev/null @@ -1,91 +0,0 @@ -return { - { - enabled = true, - 'ibhagwan/fzf-lua', - lazy = false, - dependencies = { - 'echasnovski/mini.icons', - }, - config = function() - local fzf = require('fzf-lua') - fzf.register_ui_select() - fzf.setup({ - -- PROFILE - { 'default' }, - -- OPTIONS - winopts = { - split = 'belowright 20new', - border = 'none', - preview = { - border = 'none', - }, - -- on_create = function() end, - }, - keymap = { - fzf = { - true, - ['ctrl-n'] = 'down', - ['ctrl-p'] = 'up', - }, - }, - fzf_colors = true, - -- PICKER CONFIG - files = { - file_icons = true, - }, - }) - end, - keys = { - { mode = 'n', ';<space>', '<cmd>FzfLua<cr>', desc = 'fzf: select' }, - { mode = 'n', ';/', '<cmd>FzfLua blines<cr>', desc = 'fzf: current_buffer_fuzzy_find' }, - { mode = 'n', ';b', '<cmd>FzfLua buffers<cr>', desc = 'fzf: buffers' }, - { mode = 'n', ';f', '<cmd>FzfLua files<cr>', desc = 'fzf: find_files' }, - { mode = 'n', ';g', '<cmd>FzfLua live_grep<cr>', desc = 'fzf: live_grep' }, - { mode = 'n', ';d', '<cmd>FzfLua diagnostics_workspace<cr>', desc = 'fzf: diagnostics' }, - { mode = 'n', ';h', '<cmd>FzfLua helptags<cr>', desc = 'fzf: diagnostics' }, - { - mode = 'n', - ';v', - function() - require('fzf-lua').files({ cwd = vim.fn.stdpath('config') }) - end, - desc = 'fzf: vim_config', - }, - -- { - -- mode = 'n', - -- ';;t', - -- '<cmd>Telescope<cr>', - -- desc = 'telescope: select (interactive)', - -- }, - { - mode = 'n', - ';;f', - function() - local dir - if vim.opt.filetype:get() == 'oil' then - dir = require('oil').get_current_dir() - else - dir = vim.fn.expand('%:p:h') - end - -- require('fzf-lua').files({ cwd = dir }) - _G.feedkeys(':Fzf files cwd=' .. dir) - end, - desc = 'fzf: files (interactive)', - }, - { - mode = 'n', - ';;g', - function() - local dir - if vim.opt.filetype:get() == 'oil' then - dir = require('oil').get_current_dir() - else - dir = vim.fn.expand('%:p:h') - end - _G.feedkeys(':Fzf live_grep cwd=' .. dir) - end, - desc = 'fzf: grep (interactive)', - }, - }, - }, -} diff --git a/.vim/lua/internal/plugins/gentoo.lua b/.vim/lua/internal/plugins/gentoo.lua deleted file mode 100644 index 2fc8684..0000000 --- a/.vim/lua/internal/plugins/gentoo.lua +++ /dev/null @@ -1,15 +0,0 @@ -return { - { - 'gentoo/gentoo-syntax', - ft = { 'ebuild' }, - init = function() - vim.api.nvim_create_autocmd('LspAttach', { - callback = function(args) - if vim.opt.filetype == 'ebuild' then - vim.lsp.stop_client(vim.lsp.get_clients({ bufnr = args.bufnr })) - end - end, - }) - end, - }, -} diff --git a/.vim/lua/internal/plugins/git.lua b/.vim/lua/internal/plugins/git.lua deleted file mode 100644 index 056cc14..0000000 --- a/.vim/lua/internal/plugins/git.lua +++ /dev/null @@ -1,115 +0,0 @@ -return { - { - 'lewis6991/gitsigns.nvim', - lazy = false, - opts = { - signs = { - change = { text = '▋' }, - add = { text = '▋' }, - }, - }, - keys = { - { - ']c', - function() - if vim.wo.diff then - vim.cmd.normal({ ']c', bang = true }) - else - require('gitsigns').nav_hunk('next') - end - end, - desc = 'Gitsigns: next hunk', - }, - { - '[c', - function() - if vim.wo.diff then - vim.cmd.normal({ '[c', bang = true }) - else - require('gitsigns').nav_hunk('prev') - end - end, - desc = 'Gitsigns: prev hunk', - }, - { '<leader>gb', '<cmd>Gitsigns blame<cr>', desc = 'Gitsigns: blame' }, - { '<leader>gs', '<cmd>Gitsigns<cr>', desc = 'Gitsigns: select action' }, - { - ';c', - function() - require('gitsigns').setqflist('all', { open = false }) - require('fzf-lua').quickfix({ prompt = 'Git changesets' }) - end, - desc = 'Gitsigns: list hunks', - }, - }, - }, - - { - 'linrongbin16/gitlinker.nvim', - cmd = { 'GitLink' }, - dependencies = { 'nvim-lua/plenary.nvim' }, - opts = { - message = true, - }, - keys = { - { - '<leader>gl', - vim.cmd.GitLink, - desc = 'GitLinker: clipboard', - }, - }, - }, - - { - 'moyiz/git-dev.nvim', - lazy = true, - cmd = { 'GitDevOpen', 'GitDevCleanAll' }, - opts = { - read_only = false, - }, - }, - - { - 'isakbm/gitgraph.nvim', - dependencies = { 'sindrets/diffview.nvim' }, - opts = { - symbols = { - merge_commit = 'M', - commit = '∙', - }, - format = { - timestamp = '%d-%m-%Y %H:%M:%S %z', - fields = { 'hash', 'timestamp', 'author', 'branch_name', 'tag' }, - }, - }, - init = vim.schedule_wrap(function() - vim.api.nvim_set_hl(0, 'GitGraphBranch1', { fg = 'NvimLightGray1' }) - vim.api.nvim_set_hl(0, 'GitGraphBranch2', { fg = 'NvimLightMagenta' }) - vim.api.nvim_set_hl(0, 'GitGraphBranch3', { fg = 'NvimLightRed' }) - vim.api.nvim_set_hl(0, 'GitGraphBranch4', { fg = 'NvimDarkCyan' }) - vim.api.nvim_set_hl(0, 'GitGraphBranch5', { fg = 'NvimDarkYellow' }) - vim.api.nvim_set_hl(0, 'GitGraphHash', { fg = 'NvimLightMagenta' }) - vim.api.nvim_set_hl(0, 'GitGraphAuthor', { fg = 'NvimLightGray4', italic = true }) - vim.api.nvim_set_hl(0, 'GitGraphTimestamp', { fg = 'NvimLightCyan' }) - vim.api.nvim_set_hl(0, 'GitGraphBranchName', { fg = 'NvimLightYellow' }) - vim.api.nvim_set_hl(0, 'GitGraphBranchTag', { fg = 'NvimLightYellow' }) - vim.api.nvim_set_hl(0, 'GitGraphBranchMsg', { link = 'Normal' }) - -- vim.api.nvim_create_autocmd('FileType', { - -- pattern = { 'gitgraph' }, - -- callback = function() - -- vim.keymap.set('n', 'q', '<cmd>bdel!<cr>', { silent = true, buffer = 0 }) - -- end, - -- group = vim.api.nvim_create_augroup('GitGraph'), - -- }) - end), - keys = { - { - 'g-', - function() - require('gitgraph').draw({}, { all = true, max_count = 5000 }) - end, - desc = 'GitGraph: view log', - }, - }, - }, -} diff --git a/.vim/lua/internal/plugins/icons.lua b/.vim/lua/internal/plugins/icons.lua deleted file mode 100644 index 9a597ab..0000000 --- a/.vim/lua/internal/plugins/icons.lua +++ /dev/null @@ -1,13 +0,0 @@ -return { - { - 'echasnovski/mini.icons', - version = false, - events = { 'VeryLazy' }, - -- opts = {}, - config = function(_, opts) - require('mini.icons').setup(opts) - ---@diagnostic disable-next-line: undefined-global - MiniIcons.mock_nvim_web_devicons() - end, - }, -} diff --git a/.vim/lua/internal/plugins/indent.lua b/.vim/lua/internal/plugins/indent.lua deleted file mode 100644 index a27a328..0000000 --- a/.vim/lua/internal/plugins/indent.lua +++ /dev/null @@ -1,28 +0,0 @@ -return { - -- show indents using virtual text - { - 'lukas-reineke/indent-blankline.nvim', - lazy = false, - main = 'ibl', - opts = { - indent = { - char = '▏', - }, - scope = { - enabled = true, - show_start = false, - show_end = false, - }, - }, - }, - -- detect indent from the buffer contents - { - 'NMAC427/guess-indent.nvim', - lazy = false, - opts = { - auto_cmd = true, - filetype_exclude = { 'netrw', 'tutor', 'dirbuf', 'nvimtree', 'oil' }, - buftype_exclude = { 'help', 'nofile', 'terminal', 'prompt' }, - }, - }, -} diff --git a/.vim/lua/internal/plugins/lsp.lua b/.vim/lua/internal/plugins/lsp.lua deleted file mode 100644 index 7175a89..0000000 --- a/.vim/lua/internal/plugins/lsp.lua +++ /dev/null @@ -1,290 +0,0 @@ -return { - { - 'neovim/nvim-lspconfig', - lazy = false, - dependencies = { - { 'j-hui/fidget.nvim', opts = {} }, - 'stevearc/conform.nvim', - }, - config = function() - local capabilities = nil - if pcall(require, 'blink.cmp') then - capabilities = require('blink.cmp').get_lsp_capabilities() - elseif pcall(require, 'cmp_nvim_lsp') then - capabilities = require('cmp_nvim_lsp').default_capabilities() - end - - local lspconfig = require('lspconfig') - - local servers = { - clangd = { - cmd = { - 'clangd', - '--clang-tidy', - '--header-insertion=iwyu', - '--import-insertions', - '--header-insertion-decorators', - }, - }, - elixirls = { - cmd = { 'elixir-ls' }, - settings = { - elixirLS = { - dialyzerEnabled = false, - }, - }, - }, - gopls = { - settings = { - gopls = { - hints = { - assignVariableTypes = true, - compositeLiteralFields = true, - compositeLiteralTypes = true, - constantValues = true, - functionTypeParameters = true, - parameterNames = true, - rangeVariableTypes = true, - }, - analyses = { - -- composites = false, - nilness = true, - shadow = false, - unusedparams = true, - unusedwrite = true, - }, - gofumpt = true, - -- hoverKind = 'Structured', - }, - }, - }, - lua_ls = { - cmd = { 'luals' }, -- custom firejail-wrapped - -- cmd = { 'lua-language-server' }, - settings = { - Lua = { - runtime = { - version = 'LuaJIT', - path = vim.split(package.path, ';'), - }, - diagnostics = { - globals = { - '_G', - 'assert', - 'error', - 'os', - 'package', - 'pairs', - 'ipairs', - 'pcall', - 'require', - 'string', - 'table', - 'type', - 'unpack', - 'vim', - 'xpcall', - }, - neededFileStatus = { - ['code-style-check'] = 'Any', - }, - }, - format = { - enable = true, - defaultConfig = { - indent_style = 'space', - indent_size = '2', - }, - }, - workspace = { - library = { - [vim.env.VIMRUNTIME .. '/lua'] = true, - [vim.env.VIMRUNTIME .. '/lua/vim/lsp'] = true, - [vim.fn.stdpath('config') .. '/lua'] = true, - }, - }, - telemetry = { - enable = false, - }, - }, - }, - }, - rust_analyzer = { - settings = { - ['rust-analyzer'] = { - diagnostics = { - enable = true, - }, - checkOnSave = { - command = { 'cargo', 'clippy' }, - }, - }, - }, - }, - ts_ls = { - init_options = { - tsserver = { - path = '/usr/lib/node_modules/typescript/lib', - }, - }, - }, - pylsp = {}, - zls = { - cmd = { - 'zls', - '--log-level', - 'warn', - }, - }, - bashls = {}, - cssls = {}, - jsonls = {}, - html = {}, - superhtml = {}, - kotlin_language_server = { - -- cmd = vim.lsp.rpc.connect('127.0.0.1', 20100), - cmd = { - 'distrobox', - 'enter', - '-n', - 'android-dev', - '--', - '/usr/local/kotlin-langserver/bin/kotlin-language-server', - }, - init_options = { - formatting = { - formatter = 'none', -- disable because we use ktlint via gradle - }, - }, - }, - } - - for name, opts in pairs(servers) do - opts = vim.tbl_deep_extend('force', { - capabilities = capabilities, - }, opts) - lspconfig[name].setup(opts) - end - - vim.api.nvim_create_autocmd('LspAttach', { - callback = function() - -- local client = - -- assert(vim.lsp.get_client_by_id(args.data.client_id), 'must have valid client') - - vim.opt_local.omnifunc = 'v:lua.vim.lsp.omnifunc' - - vim.keymap.set('n', 'gd', vim.lsp.buf.definition, { buffer = true }) - vim.keymap.set('n', 'gR', vim.lsp.buf.references, { buffer = true }) - vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, { buffer = true }) - vim.keymap.set('n', 'gT', vim.lsp.buf.type_definition, { buffer = true }) - vim.keymap.set('n', 'K', vim.lsp.buf.hover, { buffer = true }) - vim.keymap.set('n', 'grr', vim.lsp.buf.rename, { buffer = true }) - vim.keymap.set('n', 'ga', vim.lsp.buf.code_action, { buffer = true }) - end, - }) - end, - }, - - { - 'folke/lazydev.nvim', - ft = 'lua', - -- could add a completion source to cmp? - }, - - -- formatting - { - 'stevearc/conform.nvim', - lazy = false, - opts = { - formatters_by_ft = { - lua = { 'stylua' }, - go = { 'goimports', 'gofmt' }, - python = { 'ruff_format' }, - }, - }, - config = function(_, opts) - require('conform').setup(opts) - - vim.api.nvim_create_autocmd('BufWritePre', { - callback = function(args) - if vim.g.nofmt then - return - end - require('conform').format({ - bufnr = args.buf, - lsp_fallback = true, - quiet = true, - }) - end, - }) - end, - }, - - -- linting - { - 'nvimtools/none-ls.nvim', - dependencies = { 'nvim-lua/plenary.nvim' }, - event = 'VeryLazy', - config = function() - local nls = require('null-ls') - nls.setup({ - sources = { - -- https://github.com/nvimtools/none-ls.nvim/blob/main/doc/BUILTINS.md - -- nls.builtins.code_actions.gitsigns, - nls.builtins.code_actions.impl, - - -- nls.builtins.completion.spell, - - -- nls.builtins.diagnostics.checkmake, - -- nls.builtins.diagnostics.cmake_lint, - -- nls.builtins.diagnostics.cppcheck, - -- nls.builtins.diagnostics.gccdiag, - nls.builtins.diagnostics.golangci_lint, - -- nls.builtins.diagnostics.hadolint, - -- nls.builtins.diagnostics.pylint, - -- nls.builtins.diagnostics.selene, - -- nls.builtins.diagnostics.semgrep, - nls.builtins.diagnostics.sqlfluff, - -- nls.builtins.diagnostics.stylelint, - -- nls.builtins.diagnostics.textidote, - nls.builtins.diagnostics.vale, - }, - }) - end, - }, - - -- diagnostics - { - enabled = true, - 'rachartier/tiny-inline-diagnostic.nvim', - lazy = false, - opts = { - preset = 'nonerdfont', - signs = { - left = '', - right = '', - diag = '', - arrow = '◂ ', - up_arrow = '▴ ', - }, - options = { - throttle = 0, - show_source = { - enabled = true, - }, - multilines = { - enabled = false, - always_show = false, - }, - -- break_line = { enabled = true }, - show_all_diags_on_cursorline = true, - }, - }, - config = function(_, opts) - require('tiny-inline-diagnostic').setup(opts) - if vim.o.background == 'light' then - require('tiny-inline-diagnostic').change({}, { mixing_color = '#aaaaaa' }) - end - end, - }, -} diff --git a/.vim/lua/internal/plugins/markdown.lua b/.vim/lua/internal/plugins/markdown.lua deleted file mode 120000 index 5b578d5..0000000 --- a/.vim/lua/internal/plugins/markdown.lua +++ /dev/null @@ -1 +0,0 @@ -writing.lua \ No newline at end of file diff --git a/.vim/lua/internal/plugins/mediawiki.lua b/.vim/lua/internal/plugins/mediawiki.lua deleted file mode 100644 index f557627..0000000 --- a/.vim/lua/internal/plugins/mediawiki.lua +++ /dev/null @@ -1,6 +0,0 @@ -return { - { - 'chikamichi/mediawiki.vim', - ft = { 'mediawiki' }, - }, -} diff --git a/.vim/lua/internal/plugins/mini.lua b/.vim/lua/internal/plugins/mini.lua deleted file mode 100644 index fb4c9a6..0000000 --- a/.vim/lua/internal/plugins/mini.lua +++ /dev/null @@ -1,26 +0,0 @@ -return { - { - 'echasnovski/mini.align', - version = false, - lazy = false, - opts = {}, - }, - { - 'echasnovski/mini.ai', - version = false, - lazy = false, - opts = {}, - }, - { - 'echasnovski/mini.surround', - version = false, - lazy = false, - opts = {}, - }, - { - 'echasnovski/mini.operators', - version = false, - lazy = false, - opts = {}, - }, -} diff --git a/.vim/lua/internal/plugins/oil.lua b/.vim/lua/internal/plugins/oil.lua deleted file mode 100644 index 401fe8b..0000000 --- a/.vim/lua/internal/plugins/oil.lua +++ /dev/null @@ -1,21 +0,0 @@ -return { - { - 'stevearc/oil.nvim', - lazy = false, - opts = { - keymaps = { - ['gt'] = { - function() - local cwd = require('oil').get_current_dir() - vim.cmd('silent !footclient --no-wait -D ' .. cwd) - end, - nowait = true, - desc = 'Open current directory with foot', - }, - }, - }, - keys = { - { mode = 'n', '-', '<cmd>Oil<cr>', desc = 'oil: open parent directory' }, - }, - }, -} diff --git a/.vim/lua/internal/plugins/telescope.lua b/.vim/lua/internal/plugins/telescope.lua deleted file mode 100644 index 2e9341b..0000000 --- a/.vim/lua/internal/plugins/telescope.lua +++ /dev/null @@ -1,137 +0,0 @@ -return { - { - enabled = false, - 'nvim-telescope/telescope.nvim', - lazy = false, - dependencies = { - { 'nvim-lua/plenary.nvim' }, - { - 'nvim-telescope/telescope-fzf-native.nvim', - build = 'cmake -S. -Bbuild -GNinja -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release', - }, - { 'nvim-telescope/telescope-ui-select.nvim' }, - { - 'prochri/telescope-all-recent.nvim', - lazy = false, - dependencies = { - 'nvim-telescope/telescope.nvim', - 'kkharji/sqlite.lua', - }, - after = { 'nvim-telescope/telescope-ui-select.nvim' }, - opts = {}, - }, - }, - config = function(spec, _) - require('telescope').setup({ - defaults = require('telescope.themes').get_ivy({ - prompt = false, - borderchars = { - preview = { '─', '│', '─', '│', '┌', '┐', '┘', '└' }, - }, - }), - - extensions = { - wrap_results = true, - - fzf = {}, - - ['ui-select'] = { - require('telescope.themes').get_ivy({ - prompt = false, - -- sharp edges please - borderchars = { - preview = { '─', '│', '─', '│', '┌', '┐', '┘', '└' }, - }, - layout_config = { height = 9 }, - }), - }, - }, - }) - - pcall(require('telescope').load_extension, 'fzf') - pcall(require('telescope').load_extension, 'ui-select') - - -- user commands - vim.api.nvim_create_user_command( - 'F', - 'Telescope find_files search_dirs=<args>', - { desc = 'Telescope find_files', nargs = '?' } - ) - vim.api.nvim_create_user_command( - 'G', - 'Telescope live_grep search_dirs=<args>', - { desc = 'Telescope live_grep', nargs = '?' } - ) - - -- keymaps - local builtin = require('telescope.builtin') - for _, o in ipairs(spec.keys) do - if not o[2] then - local mod = vim.split(o.desc, ': ')[2] - vim.keymap.set(o.mode, o[1], builtin[mod], { desc = o.desc }) - end - end - - -- highlights - vim.schedule(function() - vim.api.nvim_set_hl(0, 'TelescopeBorder', { fg = 'NvimDarkGrey4', force = true }) - vim.api.nvim_set_hl(0, 'TelescopeTitle', { fg = 'NvimLightMagenta', force = true }) - vim.api.nvim_set_hl(0, 'NormalFloat', { link = 'TelescopeNormal', force = true }) - end) - end, - keys = { - { mode = 'n', ';/', desc = 'telescope: current_buffer_fuzzy_find' }, - { mode = 'n', ';b', desc = 'telescope: buffers' }, - { mode = 'n', ';f', desc = 'telescope: find_files' }, - { mode = 'n', ';g', desc = 'telescope: live_grep' }, - { mode = 'n', ';d', desc = 'telescope: diagnostics' }, - { - mode = 'n', - ';v', - function() - require('telescope.builtin').find_files({ - prompt_title = 'vimrc', - search_dirs = { - vim.fn.stdpath('config'), - }, - }) - end, - desc = 'telescope: vim_config', - }, - { - mode = 'n', - ';;t', - '<cmd>Telescope<cr>', - desc = 'telescope: select (interactive)', - }, - { - mode = 'n', - ';;f', - function() - local dir - if vim.opt.filetype:get() == 'oil' then - dir = require('oil').get_current_dir() - else - dir = vim.fn.expand('%:p') - end - _G.feedkeys(':Telescope find_files search_dirs=' .. dir) - end, - desc = 'telescope: find_files (interactive)', - }, - { - mode = 'n', - ';;g', - function() - local dir - if vim.opt.filetype:get() == 'oil' then - dir = require('oil').get_current_dir() - else - dir = vim.fn.expand('%:p') - end - _G.feedkeys(':Telescope live_grep search_dirs=' .. dir) - end, - desc = 'telescope: live_grep (interactive)', - }, - }, - }, -} diff --git a/.vim/lua/internal/plugins/todo.lua b/.vim/lua/internal/plugins/todo.lua deleted file mode 100644 index d99458e..0000000 --- a/.vim/lua/internal/plugins/todo.lua +++ /dev/null @@ -1,48 +0,0 @@ -return { - { - 'folke/todo-comments.nvim', - dependencies = { 'nvim-lua/plenary.nvim' }, - lazy = false, - cmd = { 'TodoTelescope' }, - opts = { - merge_keywords = true, - keywords = { - FIX = { icon = '' }, - TODO = { icon = '' }, - HACK = { icon = '' }, - WARN = { icon = '' }, - PERF = { icon = '' }, - NOTE = { icon = '' }, - TEST = { icon = '' }, - }, - highlight = { - keyword = 'bg', - -- pattern = [[<(KEYWORDS)(|\(.+\))(:|)]], - pattern = [[<(KEYWORDS)(|\(.+\)):]], - }, - search = { - -- pattern = [[\b(KEYWORDS)(|\(.+\))(:|)]], - pattern = [[\b(KEYWORDS)(|\(.+\)):]], - }, - }, - keys = { - { mode = 'n', ';t', '<cmd>TodoFzfLua<cr>', desc = 'todo: list todos' }, - { - mode = 'n', - ']t', - function() - require('todo-comments').jump_next() - end, - desc = 'todo: next', - }, - { - mode = 'n', - '[t', - function() - require('todo-comments').jump_prev() - end, - desc = 'todo: prev', - }, - }, - }, -} diff --git a/.vim/lua/internal/plugins/treesitter.lua b/.vim/lua/internal/plugins/treesitter.lua deleted file mode 100644 index b8b1d56..0000000 --- a/.vim/lua/internal/plugins/treesitter.lua +++ /dev/null @@ -1,124 +0,0 @@ -return { - { - 'nvim-treesitter/nvim-treesitter', - dependencies = { - -- TODO: https://github.com/nvim-treesitter/nvim-treesitter-context - { 'nvim-treesitter/nvim-treesitter-refactor', lazy = false }, - { 'nvim-treesitter/nvim-treesitter-textobjects', lazy = false }, - { 'nvim-treesitter/playground', cmd = { 'TSPlayground' } }, - }, - lazy = false, - build = ':TSUpdate', - config = function(_, opts) - -- TODO: overwrite parser configs, insert gotmpl - - require('nvim-treesitter.configs').setup(opts) - - -- use bash parser for gentoo ebuilds - vim.treesitter.language.register('bash', 'ebuild') - - -- register mediawiki parser - -- local parser_configs = require('nvim-treesitter.parsers').get_parser_configs() - -- parser_configs.mediawiki = { - -- install_info = { - -- url = 'github.com/Ordoviz/tree-sitter-mediawiki', - -- files = { 'src/parser.c' }, - -- branch = 'main', - -- generate_requires_npm = false, - -- requires_generate_from_grammar = false, - -- }, - -- filetype = 'mediawiki', - -- } - end, - opts = { - ensure_installed = { - 'bash', - 'bibtex', - 'c', - 'c_sharp', - 'cmake', - 'comment', - 'cpp', - 'css', - 'dockerfile', - 'go', - 'gomod', - 'gotmpl', - 'gowork', - 'hare', - 'hcl', - 'html', - 'java', - 'javascript', - 'json', - 'jsonc', - 'kotlin', - 'latex', - 'ledger', - 'lua', - 'make', - 'markdown', - 'markdown_inline', - 'ninja', - 'norg', - 'python', - 'query', - 'regex', - 'rust', - 'scss', - 'sql', - 'toml', - 'typescript', - 'vim', - 'vimdoc', - 'yaml', - 'zig', - - -- external parsers - -- 'mediawiki', -- TODO: missing queries - }, - highlight = { - enable = true, - additional_vim_regex_highlighting = { 'markdown' }, - }, - indent = { - enable = true, - }, - refactor = { - navigation = { - enable = true, - keymaps = { - goto_definition = 'gd', - }, - }, - smart_rename = { - enable = true, - keymaps = { - smart_rename = 'grr', - }, - }, - }, - textobjects = { - select = { - enable = true, - keymaps = { - ['ib'] = '@block.inner', - ['ab'] = '@block.outer', - -- ['ic'] = '@conditional.inner', - -- ['ac'] = '@conditional.outer', - ['if'] = '@function.inner', - ['af'] = '@function.outer', - ['il'] = '@loop.inner', - ['al'] = '@loop.outer', - ['is'] = '@scopename.inner', - ['as'] = '@scopename.outer', - ['ic'] = '@comment.outer', - }, - selection_mode = { - ['@comment.outer'] = 'V', - }, - }, - }, - }, - }, -} diff --git a/.vim/lua/internal/plugins/whichkey.lua b/.vim/lua/internal/plugins/whichkey.lua deleted file mode 100644 index dc21eda..0000000 --- a/.vim/lua/internal/plugins/whichkey.lua +++ /dev/null @@ -1,10 +0,0 @@ -return { - { - 'folke/which-key.nvim', - event = 'VeryLazy', - opts = { - sort = { 'alphanum' }, - icons = { separator = '→ ', group = '🞱 ' }, - }, - }, -} diff --git a/.vim/lua/internal/plugins/writing.lua b/.vim/lua/internal/plugins/writing.lua deleted file mode 100644 index 8f207b7..0000000 --- a/.vim/lua/internal/plugins/writing.lua +++ /dev/null @@ -1,117 +0,0 @@ -return { - { - -- DESC: handy markdown commands - 'tadmccorkle/markdown.nvim', - ft = { 'markdown' }, - opts = { - mappings = false, - on_attach = function(buf) - vim.keymap.set('n', 'nl', '<cmd>MDListItemBelow<cr>', { buffer = buf }) - vim.keymap.set('n', 'nl', '<cmd>MDListItemAbove<cr>', { buffer = buf }) - vim.keymap.set('n', '<m-x>', '<cmd>MDTaskToggle<cr>', { buffer = buf }) - vim.keymap.set('x', '<m-x>', '<cmd>MDTaskToggle<cr>', { buffer = buf }) - vim.keymap.set('x', '<m-l>', '<esc>gv<plug>(markdown_add_link_visual)', { buffer = buf }) - end, - }, - }, - { - -- DESC: pretty print markdown - 'MeanderingProgrammer/markdown.nvim', - name = 'render-markdown', -- needed if used together with markdown.nvim above - main = 'render-markdown', - dependencies = { - 'nvim-treesitter/nvim-treesitter', - 'echasnovski/mini.icons', - }, - ft = { 'markdown' }, - opts = { - completions = { blink = { enabled = true } }, - sign = { enabled = false }, - heading = { - width = 'block', - -- icons = { '❶ ', '❷ ', '❸ ', '❹ ', '❺ ', '❻ ' }, - icons = { - '▒ ', - '▒▒ ', - '▒▒▒ ', - '▒▒▒▒ ', - '▒▒▒▒▒ ', - '▒▒▒▒▒▒ ', - }, - signs = { 'ⅰ', 'ⅱ', 'ⅲ', 'ⅳ', 'ⅴ', 'ⅵ' }, - }, - bullet = { - icons = { '∙', '∘', '⋅', '⋄' }, - }, - checkbox = { - checked = { icon = ' ' }, - unchecked = { icon = ' ' }, - custom = { - todo = { raw = '[-]', rendered = ' ', highlight = 'RenderMarkdownTodo' }, - }, - }, - }, - init = vim.schedule_wrap(function() - vim.api.nvim_set_hl(0, 'RenderMarkdownH1Bg', { bg = 'NvimDarkCyan' }) - vim.api.nvim_set_hl(0, 'RenderMarkdownH1Fg', { fg = 'NvimLightCyan' }) - - vim.api.nvim_set_hl(0, 'RenderMarkdownH2Bg', { bg = 'NvimDarkMagenta' }) - vim.api.nvim_set_hl(0, 'RenderMarkdownH2Fg', { fg = 'NvimLightMagenta' }) - - vim.api.nvim_set_hl(0, 'RenderMarkdownH3Bg', { bg = 'NvimDarkYellow' }) - vim.api.nvim_set_hl(0, 'RenderMarkdownH3Fg', { fg = 'NvimLightYellow' }) - - vim.api.nvim_set_hl(0, 'RenderMarkdownH4Bg', { bg = 'NvimDarkBlue' }) - vim.api.nvim_set_hl(0, 'RenderMarkdownH4Fg', { fg = 'NvimLightBlue' }) - - vim.api.nvim_set_hl(0, 'RenderMarkdownH6Bg', { bg = 'NvimDarkRed' }) - vim.api.nvim_set_hl(0, 'RenderMarkdownH6Fg', { fg = 'NvimLightRed' }) - - vim.api.nvim_set_hl(0, '@markup.bold', { link = 'markdownBold' }) - vim.api.nvim_set_hl(0, '@markup.italic', { link = 'markdownItalic' }) - end), - }, - { - 'folke/zen-mode.nvim', - cmd = { 'ZenMode' }, - opts = { - window = { - height = 1, - options = { - number = false, - cursorline = false, - }, - }, - plugins = { - options = { - ruler = false, - showcmd = false, - laststatus = 0, - }, - gitsigns = { enabled = false }, - twilight = { enabled = true }, - }, - on_open = function() - vim.diagnostic.enable(false) - require('render-markdown').buf_disable() - end, - on_close = function() - vim.diagnostic.enable(true) - require('render-markdown').buf_enable() - end, - }, - dependencies = { - { - 'folke/twilight.nvim', - cmd = { 'Twilight' }, - opts = { - context = 24, - dimming = { - alpha = 0.3, - color = { 'Normal', '#ffffff' }, - }, - }, - }, - }, - }, -} diff --git a/.vim/lua/internal/plugins/zk.lua b/.vim/lua/internal/plugins/zk.lua deleted file mode 100644 index da108b0..0000000 --- a/.vim/lua/internal/plugins/zk.lua +++ /dev/null @@ -1,22 +0,0 @@ -return { - { - lazy = false, - 'zk-org/zk-nvim', - main = 'zk', - opts = { - picker = 'select', - }, - keys = { - -- these will work everywhere - { ';zc', ':ZkNew ', desc = 'zk: new note' }, - { ';zz', '<cmd>ZkNotes {sort={"modified"}}<cr>', desc = 'zk: list notes' }, - { ';zl', '<cmd>ZkLinks<cr>', desc = 'zk: list links' }, - { ';zb', '<cmd>ZkBacklinks<cr>', desc = 'zk: list backlinks' }, - { ';zt', '<cmd>ZkTags<cr>', desc = 'zk: list tags' }, - -- { ';zj', '<cmd>ZkNotes { dir = "500_journals" }<cr>' }, - }, - init = function() - require('internal.zk') - end, - }, -} diff --git a/.vim/lua/internal/snippets.lua b/.vim/lua/internal/snippets.lua deleted file mode 100644 index be00884..0000000 --- a/.vim/lua/internal/snippets.lua +++ /dev/null @@ -1,129 +0,0 @@ -local ls = require('luasnip') -local types = require('luasnip.util.types') - --- attach to builtin snippet hooks - -vim.snippet.expand = ls.lsp_expand - ----@diagnostic disable-next-line: duplicate-set-field -vim.snippet.active = function(filter) - filter = filter or {} - filter.direction = filter.direction or 1 - - if filter.direction == 1 then - return ls.expand_or_jumpable() - else - return ls.jumpable(filter.direction) - end -end - ----@diagnostic disable-next-line: duplicate-set-field -vim.snippet.jump = function(direction) - if direction == 1 then - if ls.expandable() then - return ls.expand_or_jump() - else - return ls.jumpable(1) and ls.jump(1) - end - else - return ls.jumpable(-1) and ls.jump(-1) - end -end - -vim.snippet.stop = ls.unlink_current - -local snip_env = { - -- snippet helpers - nl = function() - return ls.t({ '', '' }) - end, - exec = function(command) - return ls.f(function(_, _, ...) - local job = require('plenary.job'):new({ - command = vim.env.SHELL, - args = { '-c', ... }, - enable_recording = true, - }) - local res, exitcode = job:sync() - if not exitcode == 0 or #res == 0 then - error(string.format('exec "%s" failed', ...)) - end - return res - end, {}, { user_args = { command } }) - end, - -- condition helpers - cond = { - ts = function(capture) - return function() - return vim.tbl_contains(vim.treesitter.get_captures_at_cursor(), capture) - end - end, - }, -} - -ls.config.set_config({ - enable_autosnippets = true, - history = true, - updateevents = 'TextChanged,TextChangedI', - override_builtin = true, - snip_env = vim.tbl_deep_extend('error', ls.session.config.snip_env, snip_env), - ext_opts = { - [types.choiceNode] = { - active = { - virt_text = { { '◂ ', 'NonText' } }, - }, - }, - [types.insertNode] = { - active = { - virt_text = { { '◂ ', 'NonText' } }, - }, - }, - }, -}) - -require('luasnip.loaders.from_lua').lazy_load({ paths = './snippets' }) - -vim.keymap.set({ 'i', 's' }, '<c-j>', function() - return vim.snippet.active({ direction = 1 }) and vim.snippet.jump(1) -end, { silent = true, desc = 'snippet: jump next' }) - -vim.keymap.set({ 'i', 's' }, '<c-k>', function() - return vim.snippet.active({ direction = -1 }) and vim.snippet.jump(-1) -end, { silent = true, desc = 'snippet: jump prev' }) - -vim.keymap.set({ 'i', 's' }, '<c-n>', function() - if ls.choice_active() then - ls.change_choice(1) - end -end, { silent = true, desc = 'snippet: next choice' }) - -vim.keymap.set({ 'i', 's' }, '<c-p>', function() - if ls.choice_active() then - ls.change_choice(-1) - end -end, { silent = true, desc = 'snippet: prev choice' }) - -vim.api.nvim_create_user_command('EditSnippets', require('luasnip.loaders').edit_snippet_files, {}) - --- vim.api.nvim_create_autocmd('User', { --- pattern = 'LuasnipChoiceNodeEnter', --- callback = function() --- vim.schedule(function() --- assert(ls.session.active_choice_nodes[vim.api.nvim_get_current_buf()], 'No active choiceNode') --- vim.ui.select( --- ls.get_current_choices(), --- -- TODO: patch luasnip.extras.select_choice to fix missing prompt --- { prompt = 'LuaSnip: choice node', kind = 'luasnip' }, --- function(_, idx) --- if not idx then --- return --- end --- -- feed+immediately execute i to enter INSERT after vim.ui.input closes. --- vim.api.nvim_feedkeys('i', 'x', false) --- ls.set_choice(idx) --- ls.unlink_current() --- end --- ) --- end) --- end, --- }) diff --git a/.vim/lua/internal/zk.lua b/.vim/lua/internal/zk.lua deleted file mode 100644 index 4631e13..0000000 --- a/.vim/lua/internal/zk.lua +++ /dev/null @@ -1,73 +0,0 @@ -if not vim.env.ZK_NOTEBOOK_DIR then - vim.notify('Missing ZK_NOTEBOOK_DIR!', vim.log.levels.WARN) - return -end - -local api = require('zk.api') -local util = require('zk.util') - -local function insert_new_note() - -- TODO: catch error an delete note - api.new(nil, nil, function(err1, res1) - if not res1 then - error(err1) - end - - -- update index to include the new note - api.index(nil, nil, nil) - - local path = res1.path - local filename = vim.fs.basename(path) - local location = util.get_lsp_location_from_caret() - - api.link(filename, location, nil, {}, function(err2, res2) - if not res2 then - error(err2) - end - - -- open split - local buf = vim.api.nvim_create_buf(true, false) - vim.api.nvim_buf_set_name(buf, filename) - vim.api.nvim_buf_call(buf, function() - vim.cmd.edit(path) - end) - local win = vim.api.nvim_open_win(buf, false, { - split = 'below', - win = 0, - }) - -- move to split - vim.api.nvim_set_current_win(win) - vim.api.nvim_win_set_cursor(win, { -1, 0 }) - end) - end) -end - -local function on_attach() - if not vim.env.ZK_NOTEBOOK_DIR then - vim.notify('Missing ZK_NOTEBOOK_DIR!', vim.log.levels.WARN) - return - end - - -- enable virtual_text diagnostics to show link titles - vim.diagnostic.config({ virtual_text = true }) - - local opts = { remap = true, silent = false, buffer = true } - - -- -- list zettelkasten - -- vim.keymap.set('n', '-', ':call feedkeys(";zz")<cr>', opts) - - -- follow links - -- TODO: should this also work on outgoing links? - vim.keymap.set('n', '<cr>', '<cmd>lua vim.lsp.buf.definition()<cr>', opts) - - -- insert ref to new note and open note in split - vim.keymap.set({ 'n', 'i' }, ';zi', insert_new_note, opts) -end - --- setup binds to run when entering zettel buffers -vim.api.nvim_create_autocmd({ 'BufEnter' }, { - pattern = vim.env.ZK_NOTEBOOK_DIR .. '/*.md', - callback = on_attach, - group = vim.api.nvim_create_augroup('zk-on-attach', { clear = true }), - once = true, -}) diff --git a/.vim/plugin/_globals.lua b/.vim/plugin/_globals.lua deleted file mode 100644 index 5bf99a4..0000000 --- a/.vim/plugin/_globals.lua +++ /dev/null @@ -1,3 +0,0 @@ -_G.feedkeys = function(keys) - vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes(keys, true, false, true), 'n', true) -end diff --git a/.vim/plugin/auto.lua b/.vim/plugin/auto.lua deleted file mode 100644 index 98f0ef1..0000000 --- a/.vim/plugin/auto.lua +++ /dev/null @@ -1,38 +0,0 @@ -local augroup = vim.api.nvim_create_augroup -local autocmd = vim.api.nvim_create_autocmd - -do - local group = augroup('EasyQuit', { clear = true }) - autocmd('FileType', { - pattern = { - 'help', - 'qf', - 'dap-float', - 'gitsigns-blame', - 'git', - }, - callback = function() - vim.keymap.set('n', 'q', '<cmd>close<cr>', { silent = true, buffer = 0 }) - end, - group = group, - }) - autocmd('FileType', { - pattern = { 'gitgraph' }, - callback = function() - vim.keymap.set('n', 'q', '<cmd>bdel!<cr>', { silent = true, buffer = 0 }) - end, - group = group, - }) - autocmd('FileType', { - pattern = { 'DiffviewFiles' }, - callback = function() - vim.keymap.set('n', 'q', '<cmd>tabclose<cr>', { silent = true, buffer = 0 }) - end, - group = group, - }) - -- autocmd('TermClose', { - -- pattern = { 'term://*' }, - -- command = [[ if !v:event.status | exe 'bdelete! '..expand('<abuf>') | endif ]], - -- group = group, - -- }) -end diff --git a/.vim/plugin/darkmode.lua b/.vim/plugin/darkmode.lua deleted file mode 100644 index 6ffd06f..0000000 --- a/.vim/plugin/darkmode.lua +++ /dev/null @@ -1,47 +0,0 @@ --- this plugin registers registers and autocommand that switches colorschemes on UIEnter based on --- the system's preference for dark/light mode - -local state = { enabled = true } - -if not state.enabled then - return -end - -local set_darkmode = function(enabled) - if enabled then - vim.opt.background = 'dark' - vim.cmd.colorscheme(vim.g.darkmode_colorscheme_dark or 'default') - else - vim.opt.background = 'light' - vim.cmd.colorscheme(vim.g.darkmode_colorscheme_light or 'default') - end -end - --- returns if system is configured to use darkmode -local discover = function() - require('plenary.job') - :new({ - command = 'porta', - args = { 'settings', 'org.freedesktop.appearance', 'color-scheme' }, - enable_recording = true, - on_exit = vim.schedule_wrap(function(job, exitcode) - local darkmode_enabled = true - local res = job:result() - if exitcode == 0 and #res then - darkmode_enabled = not (res[1] == 'prefer-light') - end - set_darkmode(darkmode_enabled) - end), - }) - :start() -end - --- setup autogroup -local aug = vim.api.nvim_create_augroup('darkmode', { clear = true }) - --- setup color-scheme detection via desktop portal apis -vim.api.nvim_create_autocmd({ 'UIEnter', 'VimResume' }, { callback = discover, group = aug }) -vim.api.nvim_create_autocmd({ 'Signal' }, { pattern = 'SIGUSR1', callback = discover, group = aug }) - --- fix ColorColumn not being defined -vim.api.nvim_set_hl(0, 'ColorColumn', { link = 'CursorColumn', force = true }) diff --git a/.vim/plugin/diagnostics.lua b/.vim/plugin/diagnostics.lua deleted file mode 100644 index 93ee621..0000000 --- a/.vim/plugin/diagnostics.lua +++ /dev/null @@ -1,63 +0,0 @@ -vim.diagnostic.config({ - signs = { - text = { - [vim.diagnostic.severity.ERROR] = '✗', - [vim.diagnostic.severity.WARN] = '▷', - [vim.diagnostic.severity.INFO] = 'ℹ', - [vim.diagnostic.severity.HINT] = '🞶', - }, - linehl = { - -- [vim.diagnostic.severity.ERROR] = 'Search', - -- [vim.diagnostic.severity.WARN] = '', - -- [vim.diagnostic.severity.INFO] = '', - -- [vim.diagnostic.severity.HINT] = '', - }, - numhl = { - [vim.diagnostic.severity.ERROR] = 'DiagnosticSignError', - [vim.diagnostic.severity.WARN] = 'DiagnosticSignWarn', - [vim.diagnostic.severity.INFO] = 'DiagnosticSignInfo', - [vim.diagnostic.severity.HINT] = 'DiagnosticSignHint', - }, - }, - severity_sort = true, - underline = { - severity = { min = vim.diagnostic.severity.WARN }, - }, - float = false, - virtual_text = false, - virtual_lines = false, -}) - -local commonhl = { undercurl = true, force = true } -vim.api.nvim_set_hl(0, 'DiagnosticUnderlineError', commonhl) -vim.api.nvim_set_hl(0, 'DiagnosticUnderlineWarn', commonhl) -vim.api.nvim_set_hl(0, 'DiagnosticUnderlineInfo', commonhl) -vim.api.nvim_set_hl(0, 'DiagnosticUnderlineHint', commonhl) - -vim.keymap.set('n', '[d', function() - vim.diagnostic.jump({ count = 1, float = true }) -end, { desc = 'diagnostic: next' }) - -vim.keymap.set('n', ']d', function() - vim.diagnostic.jump({ count = -1, float = true }) -end, { desc = 'diagnostic: prev' }) - -vim.keymap.set('n', 'DD', vim.diagnostic.open_float, { desc = 'diagnostic: current line' }) - -vim.keymap.set('n', '<leader>td', function() - -- NOTE: this can be used to switch between multiple sets of diagnostics display - -- currently it only toggles virtual_text - local visible = vim.diagnostic.config().virtual_text - - if visible then - -- vim.diagnostic.hide(nil, 0) - vim.diagnostic.config({ virtual_text = false }) - else - -- vim.diagnostic.show(nil, 0) - vim.diagnostic.config({ virtual_text = true }) - end -end, { desc = 'diagnostic: toggle visibility' }) - -vim.keymap.set('n', '<leader>tD', function() - vim.diagnostic.enable(not vim.diagnostic.is_enabled()) -end, { desc = 'diagnostic: toggle all' }) diff --git a/.vim/plugin/hardmode.lua b/.vim/plugin/hardmode.lua deleted file mode 100644 index f18a5ef..0000000 --- a/.vim/plugin/hardmode.lua +++ /dev/null @@ -1,10 +0,0 @@ --- hard mode means we're not using the arrow keys! - -local bail = function() - vim.cmd([[silent! echohl ErrorMsg | echo "HARD MODE: hjkl operation only" | echohl None]]) -end - -vim.keymap.set({ 'v', 'i' }, '<up>', bail) -vim.keymap.set({ 'v', 'i' }, '<down>', bail) -vim.keymap.set({ 'v', 'i' }, '<left>', bail) -vim.keymap.set({ 'v', 'i' }, '<right>', bail) diff --git a/.vim/plugin/keymaps.lua b/.vim/plugin/keymaps.lua deleted file mode 100644 index f7cdf20..0000000 --- a/.vim/plugin/keymaps.lua +++ /dev/null @@ -1,49 +0,0 @@ -local set = vim.keymap.set - -set('n', 'gb', '<cmd>bnext<cr>', { desc = 'Next buffer' }) -set('n', 'gB', '<cmd>bprevious<cr>', { desc = 'Prev buffer' }) -set( - 'n', - 'g<bs>', - '<cmd>lua vim.notify("Use <lt>C-o> and <lt>C-i>!", vim.log.levels.WARN)<cr>', - { desc = 'Last buffer' } -) - -set('n', ';yp', function() - local payload = (vim.fn.expand('%:p') .. ':' .. vim.fn.line('.')) - vim.fn.setreg('+', payload) - vim.notify(payload) -end, { desc = 'Yank current buffer path and line number' }) - -set('n', ';yP', function() - local payload = vim.fn.expand('%:p') - vim.fn.setreg('+', payload) - vim.notify(payload) -end, { desc = 'Yank current buffer path' }) - -set('n', ';yn', function() - local payload = vim.fs.basename(vim.fn.expand('%:p')) - vim.fn.setreg('+', payload) - vim.notify(payload) -end, { desc = 'Yank current buffer name' }) - -set('t', '<esc>', [[ <c-\><c-n> ]], { desc = 'Terminal: Exit INSERT mode' }) - -set('v', '<', '<gv', { desc = 'indent' }) -set('v', '>', '>gv', { desc = 'outdent' }) - -set('n', '<s-esc>', '<cmd>nohlsearch<cr>', { desc = 'Clear search highlights' }) --- set('n', '<tab>', '<cmd>normal! za<cr>', { desc = 'Toggle fold under cursor' }) -set('n', '<s-tab>', '<cmd>normal! zA<cr>', { desc = 'Toggle fold under cursor (recursive)' }) - -set('n', '<a-j>', '<cmd>cnext<cr>', { desc = 'Next in quickfix' }) -set('n', '<a-k>', '<cmd>cprev<cr>', { desc = 'Prev in quickfix' }) - -set('n', '<leader><bs>', '@:', { desc = 'Rerun last command' }) - -set( - 'n', - 'gx', - '<cmd>lua vim.ui.open(vim.fn.expand("<cfile>"))<cr>', - { desc = 'Open file under cursor' } -) diff --git a/.vim/plugin/options.lua b/.vim/plugin/options.lua deleted file mode 100644 index dba726a..0000000 --- a/.vim/plugin/options.lua +++ /dev/null @@ -1,39 +0,0 @@ -local opt = vim.opt - -opt.number = true -opt.cursorline = true - --- connect system clipboard -opt.clipboard:prepend({ 'unnamedplus' }) - --- preview supported ops in split buffer -opt.inccommand = 'split' - --- show whitespace indicators -opt.list = true -opt.listchars:append({ - trail = '¬', - tab = '> ', - -- space = '·', - lead = '·', -}) -opt.showbreak = '↪ ' - --- show indicator and wrap text at 80 chars -opt.colorcolumn = '+1' -opt.textwidth = 79 -opt.wrap = true - -opt.conceallevel = 2 -opt.concealcursor = nil - --- use treesitter to determine folds -opt.foldmethod = 'expr' -opt.foldexpr = 'v:lua.vim.treesitter.foldexpr()' -opt.foldlevel = 99 - --- https://fosstodon.org/@rockorager/114183888444195197 -opt.mousescroll = 'ver:1,hor:6' - --- load local vim config (will as to allow it) -opt.exrc = true diff --git a/.vim/plugin/statuscolumn.lua b/.vim/plugin/statuscolumn.lua deleted file mode 100644 index 06e8988..0000000 --- a/.vim/plugin/statuscolumn.lua +++ /dev/null @@ -1,11 +0,0 @@ -function _G.statuscolumn() - local sc = '' - - sc = sc .. [[%l%r%s%C]] - - sc = sc .. '│' - - return sc -end - --- vim.opt.statuscolumn = '%{%v:lua.statuscolumn()%}' diff --git a/.vim/plugin/statusline.lua b/.vim/plugin/statusline.lua deleted file mode 100644 index fed6d33..0000000 --- a/.vim/plugin/statusline.lua +++ /dev/null @@ -1,152 +0,0 @@ -function _G.statusline() - local bufnr = vim.fn.bufnr() or 0 - local hi = statusline_color(vim.fn.mode()) - - local sl = hi - -- sl = sl .. statusline_append([[ ⢷]], 'StatusLineIcon', hi) - - sl = sl .. [[%-h%-w%-q%-f %-m%-r]] - - sl = sl .. statusline_append(statusline_git(bufnr, hi), 'StatusLineGit', hi) - - sl = sl .. statusline_append(statusline_grapple(bufnr, hi), 'StatusLineGrapple', hi) - - sl = sl .. [[ %= ]] -- spacer - - sl = sl .. statusline_append(statusline_lsp_diagnostics(bufnr, hi), 'StatusLineDiagnostics', hi) - - sl = sl .. statusline_append(statusline_dap(bufnr, hi), 'StatusLineDap', hi) - - -- sl = sl .. [[ %= ]] -- spacer - - sl = sl .. statusline_append(statusline_spinner(bufnr, hi), 'StatusLineJobs', hi) - - sl = sl .. [[%-l:%-v --%p%%-- %-Y]] - - return sl -end - -function _G.statusline_color(mode) - local hi = '%*' - if mode == 'i' then - -- hi = '%#StatusLineInsert#' - elseif mode == 'c' then - -- hi = '%#StatusLineCommand#' - elseif mode == 'v' or mode == 'V' or mode == '' then - hi = '%#StatusLineVisual#' - elseif mode == 'R' or mode == 'Rv' then - hi = '%#StatusLineReplace#' - end - -- return '%{g:actual_curwin==win_getid()?'.. hi ..':%#StatusLineNC#}' - return hi -end - --- does item highlighting and conditionnal spacing -function _G.statusline_append(element, hi, default_hi, opts) - if not element or element == '' then - return '' - end - opts = opts or { append_space = true } - - if hi ~= nil then - hi = '%#' .. hi .. '#' - end - if not (default_hi == '%*') then - hi = default_hi - end - local el = hi .. element .. default_hi - if opts.append_space then - el = el .. ' ' - end - return el -end - -function _G.statusline_combine_hi(outer_name, inner_name) - local outer = vim.api.nvim_get_hl(0, { name = outer_name, create = false }) - local inner = vim.api.nvim_get_hl(0, { name = inner_name, create = false }) - -- try to find a predefined hl - local name = (outer_name .. inner_name) - if vim.api.nvim_get_hl(0, { name = name, create = false }) then - return name - end - -- generate one new one automatically - name = ('autohi_' .. outer_name .. inner_name) - vim.api.nvim_get_hl(0, { name = name, create = true }) - local hi = vim.tbl_extend('force', inner, { bg = inner.fg }, { fg = outer.bg }) - vim.api.nvim_set_hl(0, name, hi) - return name -end - -function _G.statusline_lsp_diagnostics(bufnr, default_hi) - local signs = vim.diagnostic.config().signs.text or {} - local error_num = vim.diagnostic.get(bufnr, { severity = vim.diagnostic.severity.ERROR }) - local warn_num = vim.diagnostic.get(bufnr, { severity = vim.diagnostic.severity.WARN }) - - local s = '' - if #error_num > 0 then - local errs = signs[vim.diagnostic.severity.ERROR] .. ' ' .. #error_num - s = s - .. statusline_append(errs, statusline_combine_hi('StatusLine', 'DiagnosticError'), default_hi) - end - if #warn_num > 0 then - local warns = signs[vim.diagnostic.severity.WARN] .. ' ' .. #warn_num - s = s - .. statusline_append(warns, statusline_combine_hi('StatusLine', 'DiagnosticWarn'), default_hi) - end - return vim.trim(s) -end - -function _G.statusline_git(_, hi) - if vim.b.gitsigns_status and vim.b.gitsigns_status ~= '' then - return statusline_append('[' .. vim.b.gitsigns_status .. ']', 'StatusLineGitChanges', hi) - end -end - -function _G.statusline_grapple(_, _) - local g = package.loaded.grapple - if not g then - return '' - end - return g.statusline() - -- if not g or not g.exists({ buffer = bufnr }) then - -- return '' - -- end - -- return '➥ ' .. g.key({ buffer = bufnr }) -end - -function _G.statusline_spinner(bufnr, _) - local sp = package.loaded.spinner - if not sp then - return '' - end - return sp.status(bufnr) -end - -function _G.statusline_dap(_, _) - local dap = package.loaded.dap - if not dap then - return '' - end - local s = dap.status() - if s == '' then - return s - end - return '[DAP: ' .. s .. ']' -end - -local hi = function(name, opts) - vim.api.nvim_set_hl(0, name, opts) -end - -local statusline = vim.api.nvim_get_hl(0, { name = 'StatusLine', create = false }) -hi('StatusLineDiagnosticError', { fg = 'NvimDarkRed', bg = statusline.bg, bold = true }) -hi('StatusLineDiagnosticWarn', { fg = 'NvimDarkYellow', bg = statusline.bg, bold = true }) - -vim.opt.statusline = '%{%v:lua.statusline()%}' - --- WINBAR -- --- vim.opt.winbar = [[%h%w%q%f %-m %-r %= %#WinBarCwd#%{%getcwd()%}%*]] -- keep it simple --- function _G.winbar() --- return [[%<%F %-m %-r]] --- end --- vim.opt.winbar = '%{%v:lua.winbar()%}' diff --git a/.vim/plugin/syncbg.lua b/.vim/plugin/syncbg.lua deleted file mode 100644 index c11bef6..0000000 --- a/.vim/plugin/syncbg.lua +++ /dev/null @@ -1,73 +0,0 @@ --- this plugin registers two autocmds that trigger when openeing and closing the editor, setting the --- background of the terminal to the color used by our colorscheme using CSI control codes. - -local state = { enabled = false } - -if not state.enabled then - return -end - -local set_bg = function(clear) - if not (state.tty and state.normal) then - return - end - if clear then - -- emit CSI to unset custom background - os.execute('printf "\\033]111\\007" > ' .. state.tty) - else - -- emit CSI to change terminal background to Normal.bg - os.execute( - 'printf "\\033]11;' .. string.format('#%06x', state.normal.bg) .. '\\007" > ' .. state.tty - ) - -- set colorscheme Normal.bg to NONE, making it transparent - vim.cmd([[hi Normal ctermbg=NONE guibg=NONE]]) - end -end - -local discover = function() - if not state.tty then - -- get tty handle - local ok, tty_handle = pcall(io.popen, 'tty') - if (not ok) or tty_handle == nil then - return - end - local tty = tty_handle:read('*l') - tty_handle:close() - if tty:find('not a tty') then - return - end - state.tty = tty - end - - if not state.normal then - -- get colorscheme Normal highlight - local normal = vim.api.nvim_get_hl(0, { name = 'Normal', create = false }) - if normal.bg == nil then - return - end - -- cache old value for use with VimResume - state.normal = normal - end - - -- vim.notify('syncbg: ' .. vim.inspect(state), vim.log.levels.DEBUG) -end - --- setup autogroup -local aug = vim.api.nvim_create_augroup('syncbg', { clear = true }) - --- register update hook -vim.api.nvim_create_autocmd({ 'ColorScheme', 'UIEnter', 'VimResume' }, { - group = aug, - callback = vim.schedule_wrap(function() - discover() - set_bg(false) - end), -}) - --- register reset hook -vim.api.nvim_create_autocmd({ 'UILeave' }, { - group = aug, - callback = vim.schedule_wrap(function() - set_bg(true) - end), -}) diff --git a/.vim/plugin/termopen.lua b/.vim/plugin/termopen.lua deleted file mode 100644 index 951857f..0000000 --- a/.vim/plugin/termopen.lua +++ /dev/null @@ -1,72 +0,0 @@ -local function termopen(opts) - opts = opts or {} - - -- setup the buffer - local buf = vim.api.nvim_create_buf(false, true) - vim.api.nvim_set_option_value('bufhidden', 'wipe', { buf = buf }) - vim.api.nvim_set_option_value('modifiable', false, { buf = buf }) - - -- setup keymappings - vim.keymap.set('n', 'q', '<cmd>close<cr>', { buffer = buf }) - vim.keymap.set('n', '<esc>', '<cmd>close<cr>', { buffer = buf }) - - -- setup the window - local w = math.ceil(vim.o.columns * 1.0) - local h = math.ceil(vim.o.lines * 0.4) - local win = vim.api.nvim_open_win(buf, true, { - style = 'minimal', - relative = 'editor', - width = w, - height = h, - row = math.ceil(vim.o.lines - h), - col = vim.o.columns, - border = { ' ', '─', ' ', ' ', ' ', '─', ' ', ' ' }, - }) - vim.api.nvim_set_current_win(win) - - -- spawn the command - if #opts.cmd == 0 then - opts.cmd = { vim.env.SHELL } - end - vim.fn.termopen(opts.cmd, { - on_exit = function() - -- if vim.api.nvim_win_is_valid(win) then - -- vim.api.nvim_win_close(win, true) - -- end - end, - }) - - -- put into insert mode - vim.cmd.startinsert() -end - --- provide user commands -vim.api.nvim_create_user_command('Termopen', function(a) - termopen({ cmd = a.fargs }) -end, { nargs = '*' }) - --- alias -vim.api.nvim_create_user_command('T', function(a) - termopen({ cmd = a.fargs }) -end, { nargs = '*' }) - --- helper to spawn &makeprg -vim.api.nvim_create_user_command('Make', function(a) - if vim.opt_local.makeprg == nil then - vim.ui.input({ prompt = 'Enter makeprg: ' }, function(input) - vim.opt_local.makeprg = input - end) - end - - local cmd = vim.split(vim.opt_local.makeprg:get(), ' ') - cmd = vim.tbl_map(function(p) - p, _ = string.gsub(p, [[%$%*]], a.args) - p, _ = vim.fn.expand(p) - return p - end, cmd) - termopen({ cmd = cmd }) -end, { nargs = '*' }) - --- setup keymappings -vim.keymap.set('n', '<leader><leader>m', '<cmd>Make<cr>', { desc = 'Run :Make' }) -vim.keymap.set('n', '<leader><leader>t', '<cmd>Termopen<cr>', { desc = 'Run :Termopen' }) diff --git a/.vim/plugin/undo.lua b/.vim/plugin/undo.lua deleted file mode 100644 index aed6195..0000000 --- a/.vim/plugin/undo.lua +++ /dev/null @@ -1,10 +0,0 @@ --- persistent undo - -local undodir = vim.fn.stdpath('cache') .. '/undodir' - -if vim.fn.isdirectory(undodir) == 0 then - vim.fn.mkdir(undodir, 'p', '0700') -end - -vim.g.undodir = undodir -vim.opt.undofile = true diff --git a/.vim/snippets/all.lua b/.vim/snippets/all.lua deleted file mode 100644 index 2e9d975..0000000 --- a/.vim/snippets/all.lua +++ /dev/null @@ -1,112 +0,0 @@ ----@diagnostic disable: undefined-global -local events = require('luasnip.util.events') - -local fromglob = function(pattern, opts) - local choices = {} - for _, path in ipairs(vim.fn.glob(pattern, false, true, false)) do - choices[#choices + 1] = f(function(_, _, uargs) - return vim.fn.readfile(uargs) - end, {}, { user_args = { path } }) - end - return sn(nil, { c(1, choices, opts) }) -end - -local commentwrap = function(opts) - return vim.tbl_extend('error', opts or {}, { - callbacks = { - [-1] = { - [events.leave] = function(node) - local start_ln = node:get_buf_position()[1] + 1 - local end_ln = start_ln + #node:get_text() - 1 - require('vim._comment').toggle_lines(start_ln, end_ln) - end, - }, - }, - }) -end - -return { - -- mini symbols - s('check', t([[✔]])), - s('cross', t([[✖]])), - s('...', t([[…]])), - s('->', t([[➞ ]])), - - s( - 'memail', - c(1, { - t([[robert@gnzler.de]]), - t([[robert@gnzler.io]]), - }) - ), - s('mename', t([[Robert Günzler]])), - s('date', exec([[date --rfc-email]])), - s('mfg', t([[Mit freundlichen Grüßen]])), - s('sehr', t([[Sehr geehrte Damen und Herren]])), - s('sign', t([[ - Robert]])), - - s( - 'today', - f(function() - return os.date('%Y-%m-%d') - end, {}) - ), - s( - 'now', - f(function() - return os.date('%Y-%m-%dT%H:%M:%SZ') - end, {}) - ), - - s( - { trig = 'license' }, - d(1, function() - local pattern = vim.fn.stdpath('config') .. '/snippets/license_*.txt' - return fromglob(pattern, { name = 'LICENSE templates' }) - end, nil) - ), - - s( - { trig = 'spdx' }, - d(1, function() - local pattern = vim.fn.stdpath('config') .. '/snippets/spdx_*.txt' - return fromglob(pattern, { name = 'SPDX header templates' }) - end), - commentwrap(nil) - ), - - s( - { trig = 'todo' }, - isn(1, { - c(1, { - sn(nil, { i(1, 'TODO') }), - sn(nil, { i(1, 'NOTE') }), - sn(nil, { i(1, 'XXX') }), - }), - c(2, { - sn(nil, { i(1) }), - sn(nil, { t('('), i(1, 'robertgzr'), t(')') }), - }), - t(': '), - i(3, 'your comment here'), - }, ''), - commentwrap(nil) - ), - - s( - { trig = '#!/bin' }, - d(1, function() - local pattern = vim.fn.stdpath('config') .. '/snippets/sh_*.txt' - return fromglob(pattern, { name = 'Shell script template' }) - end, {}), - { - callbacks = { - [-1] = { - [events.pre_expand] = function() - vim.opt_local.filetype = 'sh' - end, - }, - }, - } - ), -} diff --git a/.vim/snippets/html.lua b/.vim/snippets/html.lua deleted file mode 100644 index af7be73..0000000 --- a/.vim/snippets/html.lua +++ /dev/null @@ -1,49 +0,0 @@ ----@diagnostic disable: undefined-global -return { - s( - 'html:5', - fmt( - [[ -<!DOCTYPE html> -<html lang="en"> - -<head> - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1.0"> - <meta name="color-scheme" content="dark light"> - <title>{title}</title> - <link href="{style}" rel="stylesheet"> - <script src="{script}"></script> -</head> - -<body> - {body} -</body> - -</html> - ]], - { - title = i(1, 'my title'), - style = i(2, 'style.css'), - script = i(3, 'main.js'), - body = i(0), - } - ) - ), - s('anchor', fmt([[<a href="{}">{}</a>]], { i(1), i(2) })), - s( - 'journal', - fmt( - [[ -<article> - <h2>{}</h2> - <p>{}</p> -</article> - ]], - { - i(1, os.date('%Y-%m-%d, %a')), - i(0), - } - ) - ), -} diff --git a/.vim/snippets/javascript.lua b/.vim/snippets/javascript.lua deleted file mode 100644 index 4c7b8e3..0000000 --- a/.vim/snippets/javascript.lua +++ /dev/null @@ -1,26 +0,0 @@ ----@diagnostic disable: undefined-global - -local jsdoc_s = function(ctx, snip) - return s(ctx, snip, { - show_condition = cond.ts('comment'), - }) -end - -return { - s({ trig = 'jsdoc', name = 'JSDoc comment' }, { - t('/**'), - nl(), - t(' * '), - i(1), - nl(), - t(' */'), - }), - jsdoc_s( - { trig = 'param', name = 'JSDoc @param' }, - { t('@param '), t('{'), i(1), t('}'), t(' '), i(2) } - ), - jsdoc_s( - { trig = 'return', name = 'JSDoc @return' }, - { t('@return '), t('{'), i(1), t('}'), t(' ') } - ), -} diff --git a/.vim/snippets/license_eupl.txt b/.vim/snippets/license_eupl.txt deleted file mode 100644 index 4153cd3..0000000 --- a/.vim/snippets/license_eupl.txt +++ /dev/null @@ -1,287 +0,0 @@ - EUROPEAN UNION PUBLIC LICENCE v. 1.2 - EUPL © the European Union 2007, 2016 - -This European Union Public Licence (the ‘EUPL’) applies to the Work (as defined -below) which is provided under the terms of this Licence. Any use of the Work, -other than as authorised under this Licence is prohibited (to the extent such -use is covered by a right of the copyright holder of the Work). - -The Work is provided under the terms of this Licence when the Licensor (as -defined below) has placed the following notice immediately following the -copyright notice for the Work: - - Licensed under the EUPL - -or has expressed by any other means his willingness to license under the EUPL. - -1. Definitions - -In this Licence, the following terms have the following meaning: - -- ‘The Licence’: this Licence. - -- ‘The Original Work’: the work or software distributed or communicated by the - Licensor under this Licence, available as Source Code and also as Executable - Code as the case may be. - -- ‘Derivative Works’: the works or software that could be created by the - Licensee, based upon the Original Work or modifications thereof. This Licence - does not define the extent of modification or dependence on the Original Work - required in order to classify a work as a Derivative Work; this extent is - determined by copyright law applicable in the country mentioned in Article 15. - -- ‘The Work’: the Original Work or its Derivative Works. - -- ‘The Source Code’: the human-readable form of the Work which is the most - convenient for people to study and modify. - -- ‘The Executable Code’: any code which has generally been compiled and which is - meant to be interpreted by a computer as a program. - -- ‘The Licensor’: the natural or legal person that distributes or communicates - the Work under the Licence. - -- ‘Contributor(s)’: any natural or legal person who modifies the Work under the - Licence, or otherwise contributes to the creation of a Derivative Work. - -- ‘The Licensee’ or ‘You’: any natural or legal person who makes any usage of - the Work under the terms of the Licence. - -- ‘Distribution’ or ‘Communication’: any act of selling, giving, lending, - renting, distributing, communicating, transmitting, or otherwise making - available, online or offline, copies of the Work or providing access to its - essential functionalities at the disposal of any other natural or legal - person. - -2. Scope of the rights granted by the Licence - -The Licensor hereby grants You a worldwide, royalty-free, non-exclusive, -sublicensable licence to do the following, for the duration of copyright vested -in the Original Work: - -- use the Work in any circumstance and for all usage, -- reproduce the Work, -- modify the Work, and make Derivative Works based upon the Work, -- communicate to the public, including the right to make available or display - the Work or copies thereof to the public and perform publicly, as the case may - be, the Work, -- distribute the Work or copies thereof, -- lend and rent the Work or copies thereof, -- sublicense rights in the Work or copies thereof. - -Those rights can be exercised on any media, supports and formats, whether now -known or later invented, as far as the applicable law permits so. - -In the countries where moral rights apply, the Licensor waives his right to -exercise his moral right to the extent allowed by law in order to make effective -the licence of the economic rights here above listed. - -The Licensor grants to the Licensee royalty-free, non-exclusive usage rights to -any patents held by the Licensor, to the extent necessary to make use of the -rights granted on the Work under this Licence. - -3. Communication of the Source Code - -The Licensor may provide the Work either in its Source Code form, or as -Executable Code. If the Work is provided as Executable Code, the Licensor -provides in addition a machine-readable copy of the Source Code of the Work -along with each copy of the Work that the Licensor distributes or indicates, in -a notice following the copyright notice attached to the Work, a repository where -the Source Code is easily and freely accessible for as long as the Licensor -continues to distribute or communicate the Work. - -4. Limitations on copyright - -Nothing in this Licence is intended to deprive the Licensee of the benefits from -any exception or limitation to the exclusive rights of the rights owners in the -Work, of the exhaustion of those rights or of other applicable limitations -thereto. - -5. Obligations of the Licensee - -The grant of the rights mentioned above is subject to some restrictions and -obligations imposed on the Licensee. Those obligations are the following: - -Attribution right: The Licensee shall keep intact all copyright, patent or -trademarks notices and all notices that refer to the Licence and to the -disclaimer of warranties. The Licensee must include a copy of such notices and a -copy of the Licence with every copy of the Work he/she distributes or -communicates. The Licensee must cause any Derivative Work to carry prominent -notices stating that the Work has been modified and the date of modification. - -Copyleft clause: If the Licensee distributes or communicates copies of the -Original Works or Derivative Works, this Distribution or Communication will be -done under the terms of this Licence or of a later version of this Licence -unless the Original Work is expressly distributed only under this version of the -Licence — for example by communicating ‘EUPL v. 1.2 only’. The Licensee -(becoming Licensor) cannot offer or impose any additional terms or conditions on -the Work or Derivative Work that alter or restrict the terms of the Licence. - -Compatibility clause: If the Licensee Distributes or Communicates Derivative -Works or copies thereof based upon both the Work and another work licensed under -a Compatible Licence, this Distribution or Communication can be done under the -terms of this Compatible Licence. For the sake of this clause, ‘Compatible -Licence’ refers to the licences listed in the appendix attached to this Licence. -Should the Licensee's obligations under the Compatible Licence conflict with -his/her obligations under this Licence, the obligations of the Compatible -Licence shall prevail. - -Provision of Source Code: When distributing or communicating copies of the Work, -the Licensee will provide a machine-readable copy of the Source Code or indicate -a repository where this Source will be easily and freely available for as long -as the Licensee continues to distribute or communicate the Work. - -Legal Protection: This Licence does not grant permission to use the trade names, -trademarks, service marks, or names of the Licensor, except as required for -reasonable and customary use in describing the origin of the Work and -reproducing the content of the copyright notice. - -6. Chain of Authorship - -The original Licensor warrants that the copyright in the Original Work granted -hereunder is owned by him/her or licensed to him/her and that he/she has the -power and authority to grant the Licence. - -Each Contributor warrants that the copyright in the modifications he/she brings -to the Work are owned by him/her or licensed to him/her and that he/she has the -power and authority to grant the Licence. - -Each time You accept the Licence, the original Licensor and subsequent -Contributors grant You a licence to their contributions to the Work, under the -terms of this Licence. - -7. Disclaimer of Warranty - -The Work is a work in progress, which is continuously improved by numerous -Contributors. It is not a finished work and may therefore contain defects or -‘bugs’ inherent to this type of development. - -For the above reason, the Work is provided under the Licence on an ‘as is’ basis -and without warranties of any kind concerning the Work, including without -limitation merchantability, fitness for a particular purpose, absence of defects -or errors, accuracy, non-infringement of intellectual property rights other than -copyright as stated in Article 6 of this Licence. - -This disclaimer of warranty is an essential part of the Licence and a condition -for the grant of any rights to the Work. - -8. Disclaimer of Liability - -Except in the cases of wilful misconduct or damages directly caused to natural -persons, the Licensor will in no event be liable for any direct or indirect, -material or moral, damages of any kind, arising out of the Licence or of the use -of the Work, including without limitation, damages for loss of goodwill, work -stoppage, computer failure or malfunction, loss of data or any commercial -damage, even if the Licensor has been advised of the possibility of such damage. -However, the Licensor will be liable under statutory product liability laws as -far such laws apply to the Work. - -9. Additional agreements - -While distributing the Work, You may choose to conclude an additional agreement, -defining obligations or services consistent with this Licence. However, if -accepting obligations, You may act only on your own behalf and on your sole -responsibility, not on behalf of the original Licensor or any other Contributor, -and only if You agree to indemnify, defend, and hold each Contributor harmless -for any liability incurred by, or claims asserted against such Contributor by -the fact You have accepted any warranty or additional liability. - -10. Acceptance of the Licence - -The provisions of this Licence can be accepted by clicking on an icon ‘I agree’ -placed under the bottom of a window displaying the text of this Licence or by -affirming consent in any other similar way, in accordance with the rules of -applicable law. Clicking on that icon indicates your clear and irrevocable -acceptance of this Licence and all of its terms and conditions. - -Similarly, you irrevocably accept this Licence and all of its terms and -conditions by exercising any rights granted to You by Article 2 of this Licence, -such as the use of the Work, the creation by You of a Derivative Work or the -Distribution or Communication by You of the Work or copies thereof. - -11. Information to the public - -In case of any Distribution or Communication of the Work by means of electronic -communication by You (for example, by offering to download the Work from a -remote location) the distribution channel or media (for example, a website) must -at least provide to the public the information requested by the applicable law -regarding the Licensor, the Licence and the way it may be accessible, concluded, -stored and reproduced by the Licensee. - -12. Termination of the Licence - -The Licence and the rights granted hereunder will terminate automatically upon -any breach by the Licensee of the terms of the Licence. - -Such a termination will not terminate the licences of any person who has -received the Work from the Licensee under the Licence, provided such persons -remain in full compliance with the Licence. - -13. Miscellaneous - -Without prejudice of Article 9 above, the Licence represents the complete -agreement between the Parties as to the Work. - -If any provision of the Licence is invalid or unenforceable under applicable -law, this will not affect the validity or enforceability of the Licence as a -whole. Such provision will be construed or reformed so as necessary to make it -valid and enforceable. - -The European Commission may publish other linguistic versions or new versions of -this Licence or updated versions of the Appendix, so far this is required and -reasonable, without reducing the scope of the rights granted by the Licence. New -versions of the Licence will be published with a unique version number. - -All linguistic versions of this Licence, approved by the European Commission, -have identical value. Parties can take advantage of the linguistic version of -their choice. - -14. Jurisdiction - -Without prejudice to specific agreement between parties, - -- any litigation resulting from the interpretation of this License, arising - between the European Union institutions, bodies, offices or agencies, as a - Licensor, and any Licensee, will be subject to the jurisdiction of the Court - of Justice of the European Union, as laid down in article 272 of the Treaty on - the Functioning of the European Union, - -- any litigation arising between other parties and resulting from the - interpretation of this License, will be subject to the exclusive jurisdiction - of the competent court where the Licensor resides or conducts its primary - business. - -15. Applicable Law - -Without prejudice to specific agreement between parties, - -- this Licence shall be governed by the law of the European Union Member State - where the Licensor has his seat, resides or has his registered office, - -- this licence shall be governed by Belgian law if the Licensor has no seat, - residence or registered office inside a European Union Member State. - -Appendix - -‘Compatible Licences’ according to Article 5 EUPL are: - -- GNU General Public License (GPL) v. 2, v. 3 -- GNU Affero General Public License (AGPL) v. 3 -- Open Software License (OSL) v. 2.1, v. 3.0 -- Eclipse Public License (EPL) v. 1.0 -- CeCILL v. 2.0, v. 2.1 -- Mozilla Public Licence (MPL) v. 2 -- GNU Lesser General Public Licence (LGPL) v. 2.1, v. 3 -- Creative Commons Attribution-ShareAlike v. 3.0 Unported (CC BY-SA 3.0) for - works other than software -- European Union Public Licence (EUPL) v. 1.1, v. 1.2 -- Québec Free and Open-Source Licence — Reciprocity (LiLiQ-R) or Strong - Reciprocity (LiLiQ-R+). - -The European Commission may update this Appendix to later versions of the above -licences without producing a new version of the EUPL, as long as they provide -the rights granted in Article 2 of this Licence and protect the covered Source -Code from exclusive appropriation. - -All other changes or additions to this Appendix require the production of a new -EUPL version. diff --git a/.vim/snippets/license_mit0.txt b/.vim/snippets/license_mit0.txt deleted file mode 100644 index a5f0b4b..0000000 --- a/.vim/snippets/license_mit0.txt +++ /dev/null @@ -1,18 +0,0 @@ -MIT No Attribution - -Copyright 2024 Robert Günzler - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/.vim/snippets/mail.lua b/.vim/snippets/mail.lua deleted file mode 100644 index e57902c..0000000 --- a/.vim/snippets/mail.lua +++ /dev/null @@ -1,17 +0,0 @@ ----@diagnostic disable: undefined-global -return { - s( - 'Sehr geehrte', - fmt( - [[ -Sehr geehrte Damen und Herren, - -{} - -Mit freundlichen Grüßen, -{} -]], - { i(0), i(1) } - ) - ), -} diff --git a/.vim/snippets/markdown.lua b/.vim/snippets/markdown.lua deleted file mode 100644 index 221f301..0000000 --- a/.vim/snippets/markdown.lua +++ /dev/null @@ -1,20 +0,0 @@ ----@diagnostic disable: undefined-global -return { - s( - 'bugs', - fmt( - [[ -## bugs, help, patches? - -submit them to my [public-inbox](https://lists.sr.ht/~robertgzr/public-inbox) by sending an email to [~robertgzr/public-inbox@lists.sr.ht](mailto:~robertgzr/public-inbox@lists.sr.ht?Subject=%5B{proj}%5D%20) -]], - { proj = i(1, 'project name') } - ) - ), - - s('date', { - t('<span class="date">'), - i(1), - t('</span>'), - }), -} diff --git a/.vim/snippets/sh_script.txt b/.vim/snippets/sh_script.txt deleted file mode 100644 index eab45a3..0000000 --- a/.vim/snippets/sh_script.txt +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -set -eu -[ -n "${DEBUG:-}" ] && set -x - -main() { - printf 'Hello world\n' -} - -main "$@" diff --git a/.vim/snippets/zig.lua b/.vim/snippets/zig.lua deleted file mode 100644 index 3a7d12f..0000000 --- a/.vim/snippets/zig.lua +++ /dev/null @@ -1,13 +0,0 @@ ----@diagnostic disable: undefined-global -return { - s('str', t('[]const u8')), - s('fn_C', fmt('fn {}({}) callconv(.C) {}', { i(0), i(1), i(2) })), - s('debug', { - t('std.log.debug("'), - i(1, '{any}'), - t('", .{'), - i(2), - t('});'), - i(0), - }), -} |