dotfiles bugabingas dorkfiles
owned by bugabinga
README Source History Refs Compare Notes Search neovim: renamed std.debug to std.dbg 5ea834118b9cb1d6af67fc62cff5ba2f0cb32712
Oliver Jan Krylow <oliver@bugabinga.net > · 5 Apr 2024
unsigned
Browse files Compare with HEAD
prevents confusion with builtin module `debug`.
Changed files (23) neovim/.lsp.settings.lua Modified 5 5 diagnostics = {
globals = {
'vim' ,
'prequire' , }, },
6 + runtime = {
version =
'LuaJIT' , },
34 + * toggling case conventions
34 35 * Move to treesitter main branch
35 36 * check out `vim.snippet`
36 37 * use `vim.base64` in wezterm plugin
37 38 * Bug: LuaLS is getting crazy diagnosing non-stop...
38 39 * integrate language tool?
39 40 * ]s [s to jump to spelling mistakes
41 + * learn marks and refactor mark.lua
40 42 * try Termdebug with gdb
41 43 * adapt config to respect `vim.g.nerdfont` (std.constants?)
42 44 * use ltex-ls for markdown, code comments and commit messages
43 45 * learn from <https://github.com/stevearc/dotfiles/blob/master/.config/nvim/plugin/exrc.lua> and maybe adapt `std.localrc`
45 47 * nvim spell for camel case words
46 - * learn marks and refactor mark.lua
47 48 * add nu-check to nvim-lint
48 49 * create skeleton-plugin for default file content based on file type (BufNewFile?)
49 50 * make lsp config extensible, so that plugin configs can hook into it (e.g. on_attach)
neovim/lua/bugabinga/lsp/clients/java.lua Modified 47 47 vim.list_extend( bundles,
49 53 vim.fn.glob( java_debug_path
.. '/extension/server/com.microsoft.java.debug.plugin-*.jar' ),
'\n' ) )
50 54 vim.list_extend( bundles, vim.split( vim.fn.glob( java_test_path
.. '/extension/server/*.jar' ),
'\n' ) )
110 114 vim.notify
'missing jdk paths in java settings for lsp' 113 - return { jdk11, jdk17, jdk21 }
117 + return { jdk11, jdk17, jdk21, }
116 120 local java_settings
= {
117 - signatureHelp = {
enabled =
true },
121 + signatureHelp = {
enabled =
true , },
119 - autobuild = {
enabeld =
true },
120 - signatureHelp = {
enabled =
true },
121 - saveActions = {
origanizeImports =
true },
123 + autobuild = {
enabeld =
true , },
124 + signatureHelp = {
enabled =
true , },
125 + saveActions = {
origanizeImports =
true , },
122 126 organizeImports = {
123 127 starThreshold =
9999 ,
124 128 staticStarThreshold =
9999 ,
128 132 template =
'${object.className}{${member.name()}=${member.value()}, ${otherMembers}}' ,
130 - hashCodeEquals
= {
useJava7Objects =
true },
134 + hashCodeEquals
= {
useJava7Objects =
true , },
131 135 useBlocks
= true ,
133 - eclipse
= {
downloadSources =
true },
137 + eclipse
= {
downloadSources =
true , },
135 139 configuration
= {
136 140 updateBuildConfiguration =
'interactive' ,
137 141 runtimes = find_jdks(),
139 - maven
= {
downloadSources =
true },
140 - implementationsCodeLens
= {
enabled =
true },
141 - referencesCodeLens
= {
enabled =
true },
142 - references
= {
includeDecompiledSources =
true },
143 - inlayHints
= {
parameterNames = {
enabled =
'all' } },
143 + maven
= {
downloadSources =
true , },
144 + implementationsCodeLens
= {
enabled =
true , },
145 + referencesCodeLens
= {
enabled =
true , },
146 + references
= {
includeDecompiledSources =
true , },
147 + inlayHints
= {
parameterNames = {
enabled =
'all' , }, },
166 170 local on_attach = function ()
167 171 local jdtls
= require 'jdtls' 168 172 vim.lsp.codelens.refresh()
169 - jdtls.setup_dap {
hotcodereplace =
'auto' }
173 + jdtls.setup_dap {
hotcodereplace =
'auto' , }
170 174 require 'jdtls.dap' .setup_dap_main_class_configs()
171 175 require 'jdtls.setup' .add_commands()
249 253 root_dir
= project.find_java_project_root,
250 254 single_file_support
= true ,
251 255 workspaces
= true ,
252 - settings
= {
java = java_settings },
256 + settings
= {
java = java_settings, },
253 257 on_attach
= on_attach,
255 259 bundles = get_bundles(),
256 260 extendedClientCapabilities = get_extended_capabilites(),
neovim/lua/bugabinga/lsp/clients/lua.lua Modified 13 13 addonManager = {
enable =
false , },
14 14 completion = {
callSnippet =
'Replace' , },
15 - diagnostics = {
workspaceRate =
50 , },
16 15 hint = {
enable =
true ,
setType =
true , },
17 16 telemetry = {
enable =
false , },
18 17 window = {
progressBar =
true ,
statusBar =
true , },
neovim/lua/bugabinga/lsp/init.lua Modified 1 - local debug = require 'std.debug' 1 + local debug = require 'std.dbg' 2 2 local icon
= require 'std.icon' 3 3 local defer
= require 'std.defer' 4 4 local map
= require 'std.map' 261 - local lsp_signature_ok, lsp_signature
= pcall (
require ,
'lsp_signature' )
262 - if lsp_signature_ok
then 263 - lsp_signature.on_attach( {}, bufnr )
266 261 if client.server_capabilities.documentHighlightProvider
then 268 263 local delay
= 300 neovim/lua/bugabinga/options/behaviour.lua Modified 1 - local debug = require 'std.debug' 1 + local debug = require 'std.dbg' 2 2 local auto
= require 'std.auto' neovim/lua/bugabinga/options/ui.lua Modified 26 26 vim.opt.listchars
= {
29 - tab = icon.tab
.. icon.middle_ellipsis,
30 31 trail = icon.trail,
31 32 extends = icon.extends,
32 33 precedes = icon.precedes,
neovim/lua/bugabinga/plugins/aerial.lua Deleted deleted file mode 100644 2 - local lazy_aerial
= setmetatable ( {}, {
3 - __index =
function ( _, k )
4 - return function (
... )
require 'aerial' [k](
... )
end 10 - 'stevearc/resession.nvim' ,
19 - 'stevearc/aerial.nvim' ,
21 - 'nvim-treesitter/nvim-treesitter' ,
22 - 'nvim-tree/nvim-web-devicons' ,
26 - cmd = {
'AerialToggle' ,
'AerialOpen' ,
'AerialNext' ,
'AerialPrev' , },
28 - {
'<leader>a' ,
'<cmd>AerialToggle!<CR>' ,
desc =
'[A]erial toggle' ,
mode =
'n' , },
29 - {
'<leader>A' ,
'<cmd>AerialNavToggle<CR>' ,
desc =
'[A]erial nav toggle' ,
mode =
'n' , },
30 - {
'[s' , lazy_aerial.prev,
desc =
'Previous aerial symbol' ,
mode = {
'n' ,
'v' , }, },
31 - {
']s' , lazy_aerial.next,
desc =
'Next aerial symbol' ,
mode = {
'n' ,
'v' , }, },
32 - {
'[u' , lazy_aerial.prev_up,
desc =
'Previous aerial parent symbol' ,
mode = {
'n' ,
'v' , }, },
33 - {
']u' , lazy_aerial.next_up,
desc =
'Next aerial parent symbol' ,
mode = {
'n' ,
'v' , }, },
38 - max_width = {
80 ,
0.2 , },
39 - default_direction =
'prefer_left' ,
44 - highlight_on_hover =
true ,
45 - close_automatic_events = {
52 - link_folds_to_tree =
true ,
53 - link_tree_to_folds =
true ,
57 - nerd_font = vim.g.nerdfont,
65 - [
'<' ] =
'actions.tree_decrease_fold_level' ,
66 - [
'>' ] =
'actions.tree_increase_fold_level' ,
69 - experimental_selection_range =
true ,
neovim/lua/bugabinga/plugins/cmp.lua Modified 1 1 local map
= require 'std.map' 2 2 local user_command
= require 'std.user_command' 5 - description =
'Trigger cmp autocomplete' ,
6 - category =
'completion' ,
8 - command =
function () prequire
'cmp' .complete()
end ,
12 - 'Display status information about the completion engine cmp' (
13 - prequire
'cmp' .status
3 + local icon
= require 'std.icon' 19 9 'hrsh7th/cmp-nvim-lsp' ,
20 10 'hrsh7th/cmp-buffer' ,
73 63 formatting.format
= lspkind.cmp_format {
98 - TypeParameter =
' ' ,
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,
neovim/lua/bugabinga/plugins/fidget.lua Modified 1 - local debug = require 'std.debug' 1 + local debug = require 'std.dbg' neovim/lua/bugabinga/plugins/format.lua Modified 1 - local debug = require 'std.debug' 1 + local debug = require 'std.dbg' 2 2 local map
= require 'std.map' 3 3 local user_command
= require 'std.user_command' neovim/lua/bugabinga/plugins/lsp_signature.lua Deleted deleted file mode 100644 2 - 'ray-x/lsp_signature.nvim' ,
5 - debug =
require 'std.debug' .get(),
neovim/lua/bugabinga/plugins/tests.lua Modified 1 - local debug = require 'std.debug' 1 + local debug = require 'std.dbg' 2 2 local icon
= require 'std.icon' 3 3 local map
= require 'std.map' neovim/lua/bugabinga/plugins/window.lua Modified 5 5 description
= 'Open window picker...' ,
6 6 category
= 'navigation' ,
8 - command = function ()
require 'nvim-window' .pick()
end ,
8 + command = function () prequire
'nvim-window' .pick()
end ,
11 11 user_command.PickWindow
12 12 'Pick a window with a simple char motion' (
13 - prequire
'nvim-window' .pick
13 + function () prequire
'nvim-window' .pick()
end neovim/lua/bugabinga/terminal.lua Modified 23 23 command
= [[ <C-\><C-n> ]] ,
26 + map.terminal.normal {
27 27 description =
'Close current terminal' ,
28 28 category =
'terminal' ,
neovim/lua/std/dbg.lua Added new file mode 100644 1 + local user_command
= require 'std.user_command' 3 + if vim.g.bugabinga_debug_mode
== nil then 4 + vim.g.bugabinga_debug_mode
= false 7 + local function is_debug_mode ()
8 + return vim.g.bugabinga_debug_mode
11 + local function print_debug ( message,
... )
12 + if is_debug_mode()
then 14 + vim.print( message,
... )
18 + local function toggle_debug_mode ()
19 + vim.g.bugabinga_debug_mode
= not vim.g.bugabinga_debug_mode
20 + vim.notify(
'Toggled debug mode to ' .. tostring ( is_debug_mode() ) )
23 + user_command.Debug
'Toggle global vim config debug mode.' ( toggle_debug_mode )
26 + print = print_debug,
27 + toggle = toggle_debug_mode,
28 + get = is_debug_mode,
neovim/lua/std/debug.lua Deleted deleted file mode 100644 1 - local user_command
= require 'std.user_command' 3 - if vim.g.bugabinga_debug_mode
== nil then 4 - vim.g.bugabinga_debug_mode
= false 7 - local function is_debug_mode ()
8 - return vim.g.bugabinga_debug_mode
11 - local function print_debug ( message,
... )
12 - if is_debug_mode()
then 14 - vim.print( message,
... )
18 - local function toggle_debug_mode ()
19 - vim.g.bugabinga_debug_mode
= not vim.g.bugabinga_debug_mode
20 - vim.notify(
'Toggled debug mode to ' .. tostring ( is_debug_mode() ) )
23 - user_command.Debug
'Toggle global vim config debug mode.' ( toggle_debug_mode )
26 - print = print_debug,
27 - toggle = toggle_debug_mode,
28 - get = is_debug_mode,
neovim/lua/std/icon.lua Modified 10 10 carriage_return
= '␍' ,
11 11 checkbox_mark
= '' ,
12 12 checkbox_unmark
= '' ,
18 18 constructor
= ' ' ,
52 54 middle_ellipsis
= '⋯' ,
100 + type_parameter
= ' ' ,
101 106 vertical_bar
= '│' ,
neovim/lua/std/localrc.lua Modified 1 - local debug = require 'std.debug' 1 + local debug = require 'std.dbg' neovim/lua/std/prequire.lua Modified 1 + local dbg
= require 'std.dbg' 3 + local function printStackTrace ()
6 + local info
= debug .
getinfo ( level,
'nSl' )
7 + if not info
then break end 8 + dbg.print(
string .
format (
"%s:%d in function '%s'" , info.short_src, info.currentline, info.name
or '' ) )
29 41 table .
insert ( mods, mod )
31 44 vim.notify_once(
string .
format (
'Missing module: %s' , arg ), vim.log.levels.WARN )
35 48 setmetatable ( proxy, {
36 49 __call =
function ()
neovim/lua/std/project.lua Modified 1 - local debug = require 'std.debug' 1 + local debug = require 'std.dbg' 2 2 local table = require 'std.table' 3 3 local join
= table .join
4 4 local dirname
= vim.fs.dirname
neovim/spell/nerd.utf-8.add Modified 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.