dotfiles
bugabingas dorkfiles
owned by bugabinga
Merge branch 'trunk' of github.com:bugabinga/dotfiles into trunk
7ff140a95d348dde5013caa1b6541e5342771571
Oliver Krylow <o.krylow@isp-insoft.de> ·
unsigned
Browse filesCompare with HEAD
Changed files (7)
41 41 * navic highlights do not fit winbar
42 -* does status bar fail to display if lsp fails to load?
42 +* neogen does not generate JavDoc
43 43 * pandoc with lua filters for diagrams for generating documents and previewing --> https://github.com/tex/vimpreviewpandoc
44 -* use gen.ai to generate docs
45 44 * command for toggling case conventions
46 -* Move to treesitter main branch
45 +* make highlights more visible when expanding snippets
46 +* cursor restore position on (session?) load jumps one location to somewhere after correct location
47 47 * check out `vim.snippet`
48 48 * use `vim.base64` in wezterm plugin
50 - LuaLS is getting crazy diagnosing non-stop...
49 +* LuaLS is getting crazy diagnosing non-stop...
51 50 * integrate language tool?
52 -* ]s [s to jump to spelling mistakes
53 -* learn marks and refactor mark.lua
54 -* try Termdebug with gdb
55 52 * adapt config to respect `vim.g.nerdfont` (std.constants?)
53 +* Do I want multiple LSPs per buffer? In case of markdown and text it seems useful, for code it seems like a headache...
56 54 * use ltex-ls for markdown, code comments and commit messages
58 - <https://github.com/stevearc/dotfiles/blob/master/.config/nvim/plugin/exrc.lua>
59 - and maybe adapt `std.localrc`
61 56 * nvim spell for camel case words
62 57 * add nu-check to nvim-lint
67 62 * split parts of config into plugins
68 63 * add support for Java multi line string in autopairs
64 +* try Termdebug with gdb
69 65 * pandoc with lua filters for diagrams for generating documents and previewing
70 66 --> https://github.com/tex/vimpreviewpandoc
neovim/ftplugin/lua.lua
Modified 3 3 vim.opt_local.include
= [[\v<((do|load)file|require)[^''"]*[''"]\zs[^''"]+]] 4 4 vim.opt_local.includeexpr
= "substitute(v:fname,'\\.','/','g')" 5 5 for _, path
in pairs( vim.api.nvim_list_runtime_paths() )
do 6 - vim.opt_local.path:append( path
.. '/lua' )
6 + vim.opt_local.path:append( path
.. '/lua' )
8 8 vim.opt_local.suffixesadd:prepend
'.lua' 9 9 vim.opt_local.conceallevel
= 1 10 10 local map
= require 'std.map' 13 - description =
'Wrap word under cursor with require call',
14 - keys =
'<leader>rq',
15 - category =
'refactor',
19 - command =
"ebi'<esc>ea'<esc>bbirequire <esc>www",
13 + description =
'Wrap word under cursor with require call',
14 + keys =
'<leader>rq',
15 + category =
'refactor',
19 + command =
"ebi'<esc>ea'<esc>bbirequire <esc>www",
25 25 prequire
'nvim-surround'.buffer_setup {
28 - add = {
'vim.print(',
')', },
29 - find =
'vim%.print%b()',
30 - delete =
'^(vim%.print%()().-(%))()$',
32 - target =
'^(vim%.print%()().-(%))()$',
28 + add = {
"require '",
"'", },
29 + find =
"require%b''",
31 + delete =
"^(require')().-(')()$",
33 + target =
"^(require')().-('()$",
37 + add = {
'vim.print(',
')', },
38 + find =
'vim%.print%b()',
39 + delete =
'^(vim%.print%()().-(%))()$',
41 + target =
'^(vim%.print%()().-(%))()$',
neovim/lazy-lock.json
Modified84 84 "virt-column.nvim": {
"branch":
"master",
"commit":
"b62b4ef0774d19452d4ed18e473e824c7a756f2f" },
85 85 "which-key.nvim": {
"branch":
"main",
"commit":
"ce741eb559c924d72e3a67d2189ad3771a231414" },
86 86 "zen-mode.nvim": {
"branch":
"main",
"commit":
"78557d972b4bfbb7488e17b5703d25164ae64e6a" }
neovim/lua/bugabinga/plugins/cmp.lua
Modified 1 -local map
= require 'std.map' 2 -local user_command
= require 'std.user_command' 3 1 local icon
= require 'std.icon' 9 - 'hrsh7th/cmp-nvim-lsp',
10 - 'hrsh7th/cmp-buffer',
12 - 'hrsh7th/cmp-nvim-lua',
13 - 'saadparwaiz1/cmp_luasnip',
14 - 'onsails/lspkind.nvim',
17 - config =
function ()
18 - local cmp
= require 'cmp' 19 - local luasnip
= require 'luasnip' 20 - local MAX_INDEX_FILE_SIZE
= 4000 7 + 'hrsh7th/cmp-nvim-lsp',
8 + 'hrsh7th/cmp-buffer',
10 + 'hrsh7th/cmp-nvim-lua',
11 + 'saadparwaiz1/cmp_luasnip',
12 + 'onsails/lspkind.nvim',
15 + config =
function ()
16 + local cmp
= require 'cmp' 17 + local luasnip
= require 'luasnip' 18 + local MAX_INDEX_FILE_SIZE
= 4000 22 - local has_words_before = function ()
23 - local line, col
= unpack( vim.api.nvim_win_get_cursor(
0 ) )
24 - return col
~= 0 and vim.api.nvim_buf_get_lines(
0, line
- 1, line,
true )[
1]:sub( col, col ):match
'%s' == nil 20 + local snippet_next = function ( fallback )
21 + if luasnip.expand_or_jumpable()
then 22 + luasnip.expand_or_jump()
23 + elseif cmp.visible()
then 24 + cmp.select_next_item()
27 - local snippet_next = function ( fallback )
28 - if luasnip.expand_or_jumpable()
then 29 - luasnip.expand_or_jump()
30 - elseif cmp.visible()
then 31 - cmp.select_next_item()
32 - elseif has_words_before()
then 30 + local snippet_prev = function ( fallback )
31 + if luasnip.jumpable(
-1 )
then 33 + elseif cmp.visible()
then 34 + cmp.select_prev_item()
39 - local snippet_prev = function ( fallback )
40 - if luasnip.jumpable(
-1 )
then 42 - elseif cmp.visible()
then 43 - cmp.select_prev_item()
40 + local mapping
= cmp.mapping.preset.insert {
41 + [
'<C-d>'] = cmp.mapping.scroll_docs(
-4 ),
42 + [
'<C-f>'] = cmp.mapping.scroll_docs(
4 ),
43 + [
'<C-e>'] = cmp.mapping.close(),
44 + [
'<C-y>'] = cmp.mapping.confirm {
behavior = cmp.ConfirmBehavior.Replace,
select =
true, },
45 + [
'<C-space>'] = cmp.mapping.complete(),
46 + [
'<Tab>'] = cmp.mapping( snippet_next, {
'i',
's', } ),
47 + [
'<S-Tab>'] = cmp.mapping( snippet_prev, {
'i',
's', } ),
49 - local mapping
= cmp.mapping.preset.insert {
50 - [
'<C-d>'] = cmp.mapping.scroll_docs(
-4 ),
51 - [
'<C-f>'] = cmp.mapping.scroll_docs(
4 ),
52 - [
'<C-e>'] = cmp.mapping.close(),
53 - [
'<C-y>'] = cmp.mapping.confirm {
behavior = cmp.ConfirmBehavior.Replace,
select =
true, },
54 - [
'<C-space>'] = cmp.mapping.complete(),
55 - [
'<Tab>'] = cmp.mapping( snippet_next, {
'i',
's', } ),
56 - [
'<S-Tab>'] = cmp.mapping( snippet_prev, {
'i',
's', } ),
50 + local formatting
= {}
51 + local ok, lspkind
= pcall(
require,
'lspkind' )
53 + formatting.format
= lspkind.cmp_format {
56 + Copilot = icon.copilot,
59 + Constant = icon.constant,
60 + Constructor = icon.constructor,
62 + EnumMember = icon.enum_member,
66 + Folder = icon.folder,
67 + Function = icon[
'function'],
68 + Interface = icon.interface,
69 + Keyword = icon.keyword,
70 + Method = icon.method,
71 + Module = icon.module,
72 + Operator = icon.operator,
73 + Property = icon.property,
74 + Reference = icon.reference,
75 + Snippet = icon.snippet,
76 + Struct = icon.struct,
78 + TypeParameter = icon.type_parameter,
81 + Variable = icon.variable,
86 + nvim_lua =
'[nvim]',
60 - local formatting
= {}
61 - local ok, lspkind
= pcall(
require,
'lspkind' )
63 - formatting.format
= lspkind.cmp_format {
66 - Copilot = icon.copilot,
69 - Constant = icon.constant,
70 - Constructor = icon.constructor,
72 - EnumMember = icon.enum_member,
76 - Folder = icon.folder,
77 - Function = icon[
'function'],
78 - Interface = icon.interface,
79 - Keyword = icon.keyword,
80 - Method = icon.method,
81 - Module = icon.module,
82 - Operator = icon.operator,
83 - Property = icon.property,
84 - Reference = icon.reference,
85 - Snippet = icon.snippet,
86 - Struct = icon.struct,
88 - TypeParameter = icon.type_parameter,
91 - Variable = icon.variable,
96 - nvim_lua =
'[nvim]',
94 + {
name =
'neodev', },
95 + {
name =
'nvim_lua', },
96 + {
name =
'nvim_lsp', },
98 + {
name =
'luasnip', },
99 + {
name =
'neorg', },
102 + keyword_length =
4,
104 + get_bufnrs =
function ()
106 + for _, bufnr
in ipairs( vim.api.nvim_list_bufs() )
do 108 + if vim.api.nvim_buf_is_loaded( bufnr )
and vim.api.nvim_buf_line_count( bufnr )
< MAX_INDEX_FILE_SIZE
then 109 + table.
insert( bufs, bufnr )
104 - {
name =
'nvim_lua', },
105 - {
name =
'nvim_lsp', },
106 - {
name =
'path', },
107 - {
name =
'luasnip', },
108 - {
name =
'neorg', },
111 - keyword_length =
4,
113 - get_bufnrs =
function ()
115 - for _, bufnr
in ipairs( vim.api.nvim_list_bufs() )
do 117 - if vim.api.nvim_buf_is_loaded( bufnr )
and vim.api.nvim_buf_line_count( bufnr )
< MAX_INDEX_FILE_SIZE
then 118 - table.
insert( bufs, bufnr )
120 + formatting = formatting,
129 - formatting = formatting,
123 + completion = {
autocomplete =
false, },
125 + expand =
function ( args ) luasnip.lsp_expand( args.body )
end,
132 - completion = {
autocomplete =
false, },
134 - expand =
function ( args )
135 - luasnip.lsp_expand( args.body )
neovim/lua/bugabinga/plugins/neoclip.lua
Deleteddeleted file mode 100644 1 -local map
= require 'std.map' 4 - description =
'Open clipboard history...',
5 - category =
'history',
7 - command =
function ()
8 - local telescope
= require 'telescope' 9 - telescope.load_extension
'neoclip' 10 - telescope.extensions.neoclip.default()
15 - 'AckslD/nvim-neoclip.lua',
16 - event =
'TextYankPost',
18 - 'nvim-telescope/telescope.nvim',
neovim/lua/bugabinga/plugins/telescope.lua
Modified 1 1 require 'bugabinga.health'.add_dependency
4 - name_of_executable =
'rg',
4 + name_of_executable =
'rg',
8 - name_of_executable =
'fd',
12 - name_of_executable =
'cmake',
8 + name_of_executable =
'fd',
12 + name_of_executable =
'cmake',
15 15 local map
= require 'std.map' 16 16 local icon
= require 'std.icon' 19 - description =
'Switch to recently used folders',
20 - category =
'navigation',
21 - keys =
'<c-p><c-z>',
22 - command =
function ()
require 'telescope'.extensions.zoxide.list()
end,
19 + description =
'Switch to recently used folders',
20 + category =
'navigation',
21 + keys =
'<c-p><c-z>',
22 + command =
function ()
require 'telescope'.extensions.zoxide.list()
end,
25 25 map.normal.visual.terminal {
26 - description =
'Search help files',
29 - command =
function ()
require 'telescope.builtin'.help_tags()
end,
26 + description =
'Search help files',
29 + command =
function ()
require 'telescope.builtin'.help_tags()
end,
33 - description =
'Open last search...',
34 - category =
'plugins',
36 - command =
function ()
require 'telescope.builtin'.resume()
end,
33 + description =
'Open last search...',
34 + category =
'plugins',
36 + command =
function ()
require 'telescope.builtin'.resume()
end,
40 - description =
'Open search for all files...',
41 - category =
'search',
42 - keys =
'<c-p><c-p>',
43 - command =
function ()
require 'telescope.builtin'.find_files()
end,
40 + description =
'Open search for all files...',
41 + category =
'search',
42 + keys =
'<c-p><c-p>',
43 + command =
function ()
require 'telescope.builtin'.find_files()
end,
47 - description =
'Open search for keymaps...',
48 - category =
'search',
49 - keys =
'<c-p><c-k>',
50 - command =
function ()
require 'telescope.builtin'.keymaps()
end,
47 + description =
'Open search for keymaps...',
48 + category =
'search',
49 + keys =
'<c-p><c-k>',
50 + command =
function ()
require 'telescope.builtin'.keymaps()
end,
54 - description =
'Open search for symbols...',
55 - category =
'search',
56 - keys =
'<c-p><c-s>',
57 - command =
function ()
require 'telescope.builtin'.symbols()
end,
54 + description =
'Open search for symbols...',
55 + category =
'search',
56 + keys =
'<c-p><c-s>',
57 + command =
function ()
require 'telescope.builtin'.symbols()
end,
61 - description =
'Open search for all file contents...',
62 - category =
'search',
63 - keys =
'<c-p><c-g>',
64 - command =
function ()
require 'telescope.builtin'.live_grep()
end,
61 + description =
'Open search for all file contents...',
62 + category =
'search',
63 + keys =
'<c-p><c-g>',
64 + command =
function ()
require 'telescope.builtin'.live_grep()
end,
68 - description =
'Open search for current buffer content...',
69 - category =
'search',
70 - keys =
'<c-p><c-/>',
71 - command =
function ()
require 'telescope.builtin'.current_buffer_fuzzy_find()
end,
68 + description =
'Open search for current buffer content...',
69 + category =
'search',
70 + keys =
'<c-p><c-/>',
71 + command =
function ()
require 'telescope.builtin'.current_buffer_fuzzy_find()
end,
75 - description =
'Open search for buffers...',
76 - category =
'search',
78 - command =
function ()
require 'telescope.builtin'.buffers()
end,
75 + description =
'Open search for buffers...',
76 + category =
'search',
78 + command =
function ()
require 'telescope.builtin'.buffers()
end,
82 + description =
'Open clipboard history...',
83 + category =
'history',
84 + keys =
'<c-p><c-v>',
85 + command =
function ()
86 + require 'telescope'.extensions.neoclip.default()
82 - 'nvim-telescope/telescope.nvim',
88 - 'nvim-telescope/telescope-fzf-native.nvim',
90 - function ( plugin_spec )
92 - result
= vim.system( {
'cmake',
'-S.',
'-Bbuild',
'-DCMAKE_BUILD_TYPE=Release', },
93 - {
text =
true,
cwd = plugin_spec.dir, } ):wait()
94 - if result.code
~= 0 then error( result.stderr )
end 95 - result
= vim.system( {
'cmake',
'--build',
'build',
'--config',
'Release', },
96 - {
text =
true,
cwd = plugin_spec.dir, } ):wait()
97 - if result.code
~= 0 then error( result.stderr )
end 98 - result
= vim.system( {
'cmake',
'--install',
'build',
'--prefix',
'build', },
99 - {
text =
true,
cwd = plugin_spec.dir, } ):wait()
100 - if result.code
~= 0 then error( result.stderr )
end 103 - 'nvim-lua/plenary.nvim',
104 - 'nvim-tree/nvim-web-devicons',
105 - 'nvim-telescope/telescope-symbols.nvim',
106 - 'jvgrootveld/telescope-zoxide',
108 - config =
function ()
109 - local telescope
= require 'telescope' 110 - local actions
= require 'telescope.actions' 111 - local themes
= require 'telescope.themes' 91 + 'nvim-telescope/telescope.nvim',
97 + 'nvim-telescope/telescope-fzf-native.nvim',
99 + function ( plugin_spec )
101 + result
= vim.system( {
'cmake',
'-S.',
'-Bbuild',
'-DCMAKE_BUILD_TYPE=Release', },
102 + {
text =
true,
cwd = plugin_spec.dir, } ):wait()
103 + if result.code
~= 0 then error( result.stderr )
end 104 + result
= vim.system( {
'cmake',
'--build',
'build',
'--config',
'Release', },
105 + {
text =
true,
cwd = plugin_spec.dir, } ):wait()
106 + if result.code
~= 0 then error( result.stderr )
end 107 + result
= vim.system( {
'cmake',
'--install',
'build',
'--prefix',
'build', },
108 + {
text =
true,
cwd = plugin_spec.dir, } ):wait()
109 + if result.code
~= 0 then error( result.stderr )
end 112 + 'nvim-lua/plenary.nvim',
113 + 'nvim-tree/nvim-web-devicons',
114 + 'nvim-telescope/telescope-symbols.nvim',
115 + 'jvgrootveld/telescope-zoxide',
116 + 'AckslD/nvim-neoclip.lua',
118 + config =
function ()
119 + local telescope
= require 'telescope' 120 + local actions
= require 'telescope.actions' 121 + local themes
= require 'telescope.themes' 113 - local ivy
= themes.get_ivy {
hidden =
true,
layout_config = {
preview_width =
0.69, }, }
114 - local dropdown
= themes.get_dropdown {
layout_config = {
width =
0.69, }, }
115 - local cursor
= themes.get_cursor {
layout_config = {
preview_width =
0.42,
width =
0.69, }, }
123 + local ivy
= themes.get_ivy {
hidden =
true,
layout_config = {
preview_width =
0.69, }, }
119 - selection_strategy =
'reset',
121 - scroll_strategy =
'limit',
122 - wrap_results =
true,
124 - horizontal = {
prompt_position =
'bottom',
preview_width =
0.69, },
125 - vertical = {
mirror =
false, },
128 - preview_cutoff =
124,
130 - prompt_prefix = icon.telescope
.. ' ',
131 - selection_caret = icon.arrow_right
.. ' ',
132 - file_ignore_patterns = {
148 - [
'<c-j>'] = actions.cycle_history_next,
149 - [
'<c-k>'] = actions.cycle_history_prev,
150 - [
'<c-n>'] = actions.move_selection_next,
151 - [
'<c-p>'] = actions.move_selection_previous,
152 - [
'<c-s>'] = actions.file_split,
153 - [
'g?'] = actions.which_key,
155 - n = {
q = actions.close, },
163 - keymaps = dropdown,
164 - diagnostics = dropdown,
167 - current_buffer_fuzzy_find = cursor,
169 - help_tags = dropdown,
172 - zoxide = {
prompt_title =
'Navigate deez nuts!', },
128 + prompt_prefix = icon.telescope
.. ' ',
129 + selection_caret = icon.arrow_right
.. ' ',
130 + file_ignore_patterns = {
146 + [
'<c-j>'] = actions.cycle_history_next,
147 + [
'<c-k>'] = actions.cycle_history_prev,
148 + [
'<c-n>'] = actions.move_selection_next,
149 + [
'<c-p>'] = actions.move_selection_previous,
150 + [
'<c-s>'] = actions.file_split,
151 + [
'g?'] = actions.which_key,
153 + n = {
q = actions.close, },
163 + current_buffer_fuzzy_find = ivy,
168 + zoxide = {
prompt_title =
'Navigate deez nuts!', },
176 - telescope.load_extension
'fzf' 177 - telescope.load_extension
'zoxide' 172 + require 'neoclip'.setup()
174 + telescope.load_extension
'fzf' 175 + telescope.load_extension
'zoxide' 176 + telescope.load_extension
'neoclip' neovim/lua/bugabinga/terminal.lua
Modified23 23 command
= [[ <C-\><C-n> ]],
26 - map.terminal.normal {
27 - description =
'Close current terminal',
28 - category =
'terminal',
31 - command =
[[ <C-\><C-n><cmd>q<cr> ]],
34 26 vim.opt_local.spell
= false 36 27 vim.cmd.startinsert()