repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

neovim: profile startup on windows. slight improvement wezterm: change keybinds for font sizes

5c56c5765cf2388ef5002a02e9c50ca5d84d17a7

Oliver Krylow <o.krylow@isp-insoft.de> ·

unsigned

Browse filesCompare with HEAD

Changed files (17)

neovim/.editorconfig

Modified
1 1 root = true
4 -spell = true
4 +spell = false
6 6 [*.lua]
7 +number = true
8 +relativenumber = true
7 9 diagnostic = true
9 11 # see https://github.com/CppCXY/EmmyLuaCodeStyle

neovim/colors/nugu.lua

Modified
1 1 if vim.g.colors_name == nil then
2 - -- Get the current hour
3 - local current_hour = tonumber( os.date '%H' )
5 - -- Set the background based on the time of day
6 - if current_hour >= 9 and current_hour < 17 then
7 - -- print"setting background to light"
8 - vim.opt.background = 'light'
9 - else
10 - -- print"setting background to dark"
11 - vim.opt.background = 'dark'
12 - end
2 + vim.opt.background = 'dark'
13 3 else
14 4 -- Reset all highlights if another colorscheme was previously set
15 5 vim.cmd [[ highlight clear ]]

neovim/init.lua

Modified
16 16 ---create special global, that serves as a more graceful alternative to `require`
17 17 prequire = require 'std.prequire'
19 -local ok, loaded
21 --- set general neovim editor settings
22 -ok, loaded = pcall( require, 'bugabinga.options' )
23 -if not ok then
24 - vim.print( 'error while loading options', loaded )
25 -end
27 --- extends default editorconfig options
28 -ok, loaded = pcall( require, 'bugabinga.editorconfig' )
29 -if not ok then
30 - vim.print( 'error while loading editorconfig extensions', loaded )
31 -end
33 --- install plugin manager and declare plugins to use
34 -ok, loaded = pcall( require, 'bugabinga.lazy' )
35 -if not ok then
36 - vim.print( 'error while loading lazy', loaded )
37 -end
39 --- configures the vim diagnostic subsystem
40 -ok, loaded = pcall( require, 'bugabinga.diagnostic' )
41 -if not ok then
42 - vim.print( 'error while loading diagnostic', loaded )
43 -end
45 --- project local save actions
46 -ok, loaded = pcall( require, 'bugabinga.save_actions' )
47 -if not ok then
48 - vim.print( 'error while loading save_actions', loaded )
49 -end
51 --- visualize marks in signcolumn
52 -ok, loaded = pcall( require, 'bugabinga.mark' )
53 -if not ok then
54 - vim.print( 'error while loading mark', loaded )
55 -end
57 --- save and load sessions
58 -ok, loaded = pcall( require, 'bugabinga.sessions' )
59 -if not ok then
60 - vim.print( 'error while loading sessions', loaded )
61 -end
63 --- configure builtin terminal
64 -ok, loaded = pcall( require, 'bugabinga.terminal' )
65 -if not ok then
66 - vim.print( 'error while loading terminal', loaded )
67 -end
69 --- setup lsp clients
70 -ok, loaded = pcall( require, 'bugabinga.lsp' )
71 -if not ok then
72 - vim.print( 'error while loading lsp', loaded )
73 -end
19 +prequire 'bugabinga.options'
20 +prequire 'bugabinga.lazy'
21 +prequire 'bugabinga.editorconfig'
22 +prequire 'bugabinga.diagnostic'
23 +prequire 'bugabinga.save_actions'
24 +-- prequire 'bugabinga.mark'
25 +prequire 'bugabinga.sessions'
26 +prequire 'bugabinga.terminal'
27 +prequire 'bugabinga.lsp'

neovim/lua/bugabinga/editorconfig.lua

Modified
24 24 -- even those options are the same as my togglers, the code is not shared for the
25 25 -- small off chance, that this ever gets shared as a neovim plugin
26 -expose_option( 'spell', tobool )
27 -expose_option( 'number', tobool )
28 -expose_option( 'cursorline', tobool )
29 -expose_option( 'virtualedit', tostring )
26 +expose_option( 'spell', tobool )
27 +expose_option( 'number', tobool )
28 +expose_option( 'relativenumber', tobool )
29 +expose_option( 'cursorline', tobool )
30 +expose_option( 'virtualedit', tostring )
31 32 editorconfig.properties.diagnostic = function ( bufnr, value )
32 33 local option = tobool( value )
33 34 if option then
34 35 vim.diagnostic.enable( true, { bufnr = bufnr, } )
35 36 else
36 - vim.diagnostic.enable( false, { bufnr = bufnr } )
37 + vim.diagnostic.enable( false, { bufnr = bufnr, } )

neovim/lua/bugabinga/lazy.lua

Modified
20 20 local icon = require 'std.icon'
22 22 local overrides = require 'std.localrc' ( '.lazy.specs.lua', 'table' )
23 ---- a couple of vim events, that collectively represent "a file has been opened".
24 ---- this is useful for plugins that want to be lazy loaded, when some file is shown in a buffer/window
25 -vim.g.FILE_LOADED_EVENTS = { 'BufRead', 'BufNew', 'SessionLoadPost', }
27 24 lazy.setup {
28 25 spec = { { import = 'bugabinga.plugins', }, overrides, },
94 91 'spellfile_plugin',
95 92 'matchit',
96 93 'matchparen',
94 + 'man',
97 95 'tohtml',
98 96 'tutor',

neovim/lua/bugabinga/lsp/clients/java.lua

Modified
1 1 local project = require 'std.project'
2 2 local auto = require 'std.auto'
4 -local find_jdks = function ()
5 - local host = vim.uv.os_gethostname()
6 - local jdk11 = {
7 - name = 'JavaSE-11',
8 - }
9 - local jdk17 = {
10 - name = 'JavaSE-17',
11 - }
12 - local jdk21 = {
13 - name = 'JavaSE-21',
14 - }
16 - if host == 'velma' then
17 - jdk11.path = '/usr/lib64/jvm/java-11-openjdk-11'
18 - jdk17.path = '/usr/lib64/jvm/java-17-openjdk-17'
19 - jdk21.path = '/usr/lib64/jvm/java-21-openjdk-21'
20 - elseif host == 'fedora' then
21 - jdk11.path = '/usr/lib/jvm/java-11-openjdk'
22 - jdk17.path = '/usr/lib/jvm/java-17-openjdk'
23 - jdk21.path = '/usr/lib/jvm/java-21-openjdk'
24 - elseif host == 'NB-00718' then
25 - jdk11.path = 'C:/Users/okr/scoop/apps/openjdk11/current'
26 - jdk17.path = 'C:/Users/okr/scoop/apps/openjdk17/current'
27 - jdk21.path = 'C:/Users/okr/scoop/apps/openjdk21/current'
28 - else
29 - vim.notify 'missing jdk paths in java settings for lsp'
30 - end
32 - return { jdk11, jdk17, jdk21, }
33 -end
35 4 local java_settings = {
36 5 signatureHelp = { enabled = true, },
37 6 sources = {
38 - autobuild = { enabeld = true, },
7 + autobuild = { enabled = true, },
39 8 signatureHelp = { enabled = true, },
40 9 saveActions = { origanizeImports = true, },
41 10 organizeImports = {
54 23 configuration = {
55 24 updateBuildConfiguration = 'interactive',
56 - runtimes = find_jdks(),
58 26 maven = { downloadSources = true, },
59 27 implementationsCodeLens = { enabled = true, },

neovim/lua/bugabinga/options/ui.lua

Modified
37 37 -- force English messages
38 -vim.cmd [[ language mes en_US.utf8 ]]
38 +vim.cmd [[ language en_US.utf8 ]]
40 40 -- do not spam the cmdline with every little input
41 41 vim.opt.showcmd = false

neovim/lua/bugabinga/plugins/colorizer.lua

Modified
1 1 return {
3 3 'JosefLitos/colorizer.nvim',
4 - event = vim.g.FILE_LOADED_EVENTS,
4 + event = 'VeryLazy',
5 5 opts = {
6 6 filetypes = { '*', },
7 7 user_default_options = {

neovim/lua/bugabinga/plugins/indent_blankline.lua

Modified
4 4 local icon = require 'std.icon'
6 6 return {
7 7 'lukas-reineke/indent-blankline.nvim',
8 8 version = '3.*',
9 9 main = 'ibl',
10 - event = vim.g.FILE_LOADED_EVENTS,
10 + event = 'VeryLazy',
11 11 opts = {
12 12 debounce = 250,
13 13 indent = {

neovim/lua/bugabinga/plugins/oil.lua

Modified
5 5 description = 'Open parent directory in buffer.',
6 6 category = 'files',
7 7 keys = '-',
8 - -- command = function () require 'oil'.open_float() end,
9 8 command = function () require 'oil'.open() end,

neovim/lua/bugabinga/plugins/telescope.lua

Modified
119 119 local actions = require 'telescope.actions'
120 120 local themes = require 'telescope.themes'
122 - local ivy = themes.get_ivy { hidden = true, layout_config = { preview_width = 0.69, }, }
122 + local ivy = themes.get_ivy { layout_config = { preview_width = 0.23, }, }
124 124 telescope.setup {
125 125 defaults = {
126 - hidden = true,
127 126 prompt_prefix = icon.telescope .. ' ',
128 127 selection_caret = icon.arrow_right .. ' ',
129 - path_display = {'shorten'},
130 - dynamic_preview_title = true,
131 128 file_ignore_patterns = {
132 129 '%.git/',
133 130 '%.git/',

neovim/lua/bugabinga/plugins/todo-comments.lua

Modified
2 2 return {
3 3 'folke/todo-comments.nvim',
4 4 version = '1.*',
5 5 dependencies = { 'nvim-lua/plenary.nvim', },
6 - event = vim.g.FILE_LOADED_EVENTS,
6 + event = 'VeryLazy',
7 7 opts = {},

neovim/lua/bugabinga/plugins/treesitter.lua

Modified
5 5 { name = 'TreeSitter CLI', name_of_executable = 'tree-sitter', }
6 6 { name_of_executable = 'tar', }
8 -local events = { 'VeryLazy', }
9 -table.insert( events, vim.g.FILE_LOADED_EVENTS )
11 8 return {
12 9 'nvim-treesitter/nvim-treesitter',
13 10 -- version = '0.9.*',
11 + -- branch = 'main', -- next gen version
14 12 branch = 'master',
15 - event = events,
13 + event = 'VeryLazy',
16 14 init = function ( plugin )
17 15 -- PERF: add nvim-treesitter queries to the rtp and it's custom query predicates early
18 16 -- This is needed because a bunch of plugins no longer `require("nvim-treesitter")`, which
23 21 require 'nvim-treesitter.query_predicates'
25 23 build = function ()
26 - require 'nvim-treesitter.install'.update { with_sync = false, }
24 + require 'nvim-treesitter.install'.update { with_sync = true, }
28 26 dependencies = {
29 - 'nvim-treesitter/playground',
27 + -- 'nvim-treesitter/playground',
30 28 'nvim-treesitter/nvim-treesitter-textobjects',
31 29 'windwp/nvim-ts-autotag',
32 30 'RRethy/nvim-treesitter-endwise',
33 31 'nvim-treesitter/nvim-treesitter-context',
34 - 'nushell/tree-sitter-nu',
36 33 config = function ()
37 34 local install = require 'nvim-treesitter.install'
40 37 install.prefer_git = false
41 38 install.compilers = { 'zig', 'clang', 'gcc', 'cl', 'cc', vim.fn.getenv 'CC', }
44 40 local should_disable = function ( _, bufnr )
45 41 local max_filesize = 5 * 1024 * 1024 --MiB
46 42 local ok, stats = pcall( vim.loop.fs_stat, vim.api.nvim_buf_get_name( bufnr or 0 ) )
53 49 ---@diagnostic disable-next-line: missing-fields
54 50 configs.setup {
55 51 sync_install = false,
56 - ensure_installed = {
57 - 'bash',
58 - 'c',
59 - 'comment',
60 - 'diff',
61 - 'dot',
62 - 'dtd',
63 - 'git_config',
64 - 'gitattributes',
65 - 'gitcommit',
66 - 'gitignore',
67 - 'ini',
68 - 'java',
69 - 'just',
70 - 'jsonc',
71 - 'lua',
72 - 'luap',
73 - 'luadoc',
74 - 'markdown',
75 - 'markdown_inline',
76 - 'muttrc',
77 - 'nasm',
78 - 'nix',
79 - 'nu',
80 - 'passwd',
81 - 'pem',
82 - 'properties',
83 - 'proto',
84 - 'printf',
85 - 'query',
86 - 'regex',
87 - 'ssh_config',
88 - 'toml',
89 - 'udev',
90 - 'vim',
91 - 'vimdoc',
92 - 'xml',
93 - 'zig',
94 - },
52 + -- ensure_installed = {
53 + -- 'bash',
54 + -- 'c',
55 + -- 'comment',
56 + -- 'diff',
57 + -- 'dot',
58 + -- 'dtd',
59 + -- 'git_config',
60 + -- 'gitattributes',
61 + -- 'gitcommit',
62 + -- 'gitignore',
63 + -- 'ini',
64 + -- 'java',
65 + -- 'just',
66 + -- 'jsonc',
67 + -- 'lua',
68 + -- 'luap',
69 + -- 'luadoc',
70 + -- 'markdown',
71 + -- 'markdown_inline',
72 + -- 'muttrc',
73 + -- 'nasm',
74 + -- 'nix',
75 + -- 'nu',
76 + -- 'passwd',
77 + -- 'pem',
78 + -- 'properties',
79 + -- 'proto',
80 + -- 'printf',
81 + -- 'query',
82 + -- 'regex',
83 + -- 'ssh_config',
84 + -- 'toml',
85 + -- 'udev',
86 + -- 'vim',
87 + -- 'vimdoc',
88 + -- 'xml',
89 + -- 'zig',
90 + -- },
96 92 ignore_install = { 'oil', },
98 - auto_install = true,
94 + auto_install = false,
100 96 autotag = { enable = true, disable = should_disable, },
101 97 endwise = { enable = true, disable = should_disable, },
120 - indent = { enable = true, },
116 + indent = { enable = true, disable = should_disable, },
122 - playground = {
123 - enable = true,
124 - disable = should_disable,
125 - updatetime = 25,
126 - persist_queries = false,
127 - keybindings = {
128 - toggle_query_editor = 'o',
129 - toggle_hl_groups = 'i',
130 - toggle_injected_languages = 't',
131 - toggle_anonymous_nodes = 'a',
132 - toggle_language_display = 'I',
133 - focus_language = 'f',
134 - unfocus_language = 'F',
135 - update = 'R',
136 - goto_node = '<cr>',
137 - show_help = '?',
138 - },
139 - },
118 + -- playground = {
119 + -- enable = true,
120 + -- disable = should_disable,
121 + -- updatetime = 25,
122 + -- persist_queries = false,
123 + -- keybindings = {
124 + -- toggle_query_editor = 'o',
125 + -- toggle_hl_groups = 'i',
126 + -- toggle_injected_languages = 't',
127 + -- toggle_anonymous_nodes = 'a',
128 + -- toggle_language_display = 'I',
129 + -- focus_language = 'f',
130 + -- unfocus_language = 'F',
131 + -- update = 'R',
132 + -- goto_node = '<cr>',
133 + -- show_help = '?',
134 + -- },
135 + -- },
141 137 textobjects = {
142 138 select = {
174 170 include_surroundig_whitespace = true,
177 - swap = {
178 - enable = true,
179 - disable = should_disable,
180 - swap_next = {
181 - ['<leader>rn'] = { query = '@parameter.inner', desc = 'Swap parameter with next', },
182 - },
183 - swap_previous = {
184 - ['<leader>rp'] = { query = '@parameter.inner', desc = 'Swap parameter with previous', },
185 - },
186 - },
188 - lsp_interop = {
189 - enable = true,
190 - disable = should_disable,
191 - border = vim.g.border_style,
192 - floating_preview_opts = {},
193 - peek_definition_code = {
194 - ['<leader>lp'] = { query = '@function.outer', desc = 'Peek definition of outer function.', },
195 - ['<leader>lP'] = { query = '@class.outer', desc = 'Peek definition of outer class.', },
196 - },
197 - },
199 173 move = {
200 174 enable = true,
201 175 disable = should_disable,
202 176 set_jumps = true,
203 177 goto_next = {
204 178 [']f'] = { query = '@call.outer', desc = 'Goto next function call', },
205 - [']m'] = { query = '@fucntion.outer', desc = 'Goto next function definition', },
179 + [']m'] = { query = '@function.outer', desc = 'Goto next function definition', },
206 180 [']c'] = { query = '@class.outer', desc = 'Goto next class', },
207 181 [']o'] = { query = '@conditional.outer', desc = 'Goto next conditional', },
208 182 [']p'] = { query = '@parameter.outer', desc = 'Goto next parameter', },
220 194 require 'treesitter-context'.setup {
221 195 enable = true, -- Enable this plugin (Can be enabled/disabled later via commands)
196 + disable = should_disable,
222 197 max_lines = 0, -- How many lines the window should span. Values <= 0 mean no limit.
223 198 min_window_height = 0, -- Minimum editor window height to enable context. Values <= 0 mean no limit.
224 199 line_numbers = true,
225 200 multiline_threshold = 20, -- Maximum number of lines to show for a single context
226 201 trim_scope = 'outer', -- Which context lines to discard if `max_lines` is exceeded. Choices: 'inner', 'outer'
227 - mode = 'cursor', -- Line used to calculate context. Choices: 'cursor', 'topline'
202 + mode = 'topline', -- Line used to calculate context. Choices: 'cursor', 'topline'
228 203 -- Separator between context and content. Should be a single character string, like '-'.
229 204 -- When separator is set, the context will only show up when there are at least 2 lines above cursorline.
230 205 separator = '-',

neovim/lua/bugabinga/plugins/virt-column.lua

Modified
3 3 local ignored = require 'std.ignored'
5 5 return {
6 6 'lukas-reineke/virt-column.nvim',
7 7 version = '2.*',
8 - event = vim.g.FILE_LOADED_EVENTS,
8 + event = 'VeryLazy',
9 9 opts = {
10 10 char = { '┆', '╎', '│', },
11 11 exclude = {

neovim/spell/nerd.utf-8.add

Modified
65 65 Asciidoc
66 66 AsciidocFX
67 67 GraalVM
68 +Validierung
69 +JUnit4
70 +Nullability
71 +EclipseStore
72 +gRPC
73 +UUIDs
74 +FKs
75 +FIXMEs
76 +JSpecify

neovim/spell/nerd.utf-8.add.spl

Modified

Previous version contains binary or non-UTF-8 data.

Current version contains binary or non-UTF-8 data.

wezterm/bugabinga/key_binds.lua

Modified
20 20 { key = 'Escape', action = 'PopKeyTable' },
22 22 [font_size_mode] = {
23 - { key = '+', action = wez.action.IncreaseFontSize },
24 - { key = '-', action = wez.action.DecreaseFontSize },
23 + { key = 'j', action = wez.action.DecreaseFontSize },
24 + { key = 'k', action = wez.action.IncreaseFontSize },
25 25 { key = '=', action = wez.action.ResetFontSize },
27 27 { key = 'Escape', action = 'PopKeyTable' },