dotfiles bugabingas dorkfiles
owned by bugabinga
README Source History Refs Compare Notes Search neovim: clean up lsp config and add terminal and patterns
a38f4ab5e449e5eaed485fbc3b17122659fffdb4
Oliver Jan Krylow <oliver@bugabinga.net > · 9 Dec 2024
unsigned
Browse files Compare with HEAD
Changed files (27) 53 52 * learn mini.operators
54 53 * create skeleton-plugin for default file content based on file type
12 - require 'std.dbg' .toggle()
12 + vim.g.bugabinga_debug_mode
= true 14 14 local start_time
= vim.uv.hrtime()
15 15 local auto
= require 'std.auto' 62 62 require 'bugabinga.surround' 63 63 require 'bugabinga.textobjects' 64 64 require 'bugabinga.key_preview' 65 + require 'bugabinga.patterns' 66 + require 'bugabinga.terminal' 66 68 require 'bugabinga.incubator' neovim/lua/bugabinga/diagnostic.lua Modified 18 18 local diagnostic
= vim.diagnostic
19 - diagnostic.enable(
false )
19 + diagnostic.enable(
false )
21 21 auto
'disable_diagnostic_initially' {
22 22 description =
'Disable Diagnostics initially, when attaching an LSP client to a buffer' ,
23 23 events =
'LspAttach' ,
24 - command =
function () diagnostic.enable(
false , {
bufnr =
0 } )
end ,
24 + command =
function () diagnostic.enable(
false , {
bufnr =
0 })
end ,
27 - local diagnostic_format = function ( context )
28 - return string .
format (
'%s: %s' , display_name[context.severity], context.message )
27 + local diagnostic_format = function (context)
28 + return string .
format (
'%s: %s' , display_name[context.severity], context.message)
31 - local prefix_format = function ( context, index, total )
32 - return string .
format (
'%s/%s %s %s ' , index, total, context.source, diagnostic_icons[context.severity] ),
33 - 'DiagnosticVirtualText' .. display_name[context.severity]
31 + local prefix_format = function (context, index, total)
32 + return string .
format (
'%s/%s %s %s ' , index, total, context.source, diagnostic_icons[context.severity]),
33 + 'DiagnosticVirtualText' .. display_name[context.severity]
36 36 diagnostic.config {
50 50 prefix
= prefix_format,
52 52 update_in_insert
= false ,
55 + [vim.diagnostic.severity.ERROR] = diagnostic_icons.error,
56 + [vim.diagnostic.severity.WARN] = diagnostic_icons.warn,
57 + [vim.diagnostic.severity.INFO] = diagnostic_icons.info,
58 + [vim.diagnostic.severity.HINT] = diagnostic_icons.hint,
54 61 severity_sort
= true ,
57 - local sign = function ( options )
58 - vim.fn.sign_define( options.name, {
59 - text = options.text,
60 - texthl = options.name,
67 - sign {
name =
'DiagnosticSignError' ,
text = diagnostic_icons.error }
68 - sign {
name =
'DiagnosticSignWarn' ,
text = diagnostic_icons.warn }
69 - sign {
name =
'DiagnosticSignHint' ,
text = diagnostic_icons.hint }
70 - sign {
name =
'DiagnosticSignInfo' ,
text = diagnostic_icons.info }
74 66 description =
'Toggle diagnostics' ,
75 67 category =
'diagnostic' ,
76 68 keys =
'<leader>td' ,
77 - command =
function ()
69 + command =
function ()
78 70 if not diagnostic.is_enabled()
then 79 71 diagnostic.enable()
80 72 vim.notify
'Enabling Diagnostics' 82 - diagnostic.enable(
false )
74 + diagnostic.enable(
false )
83 75 vim.notify
'Disabling Diagnostics' 99 91 command
= diagnostic.setqflist,
102 - local show_diagnostics_in_buffer = function ()
103 - local builtin
= require 'telescope.builtin' 104 - builtin.diagnostics {
bufnr =
0 }
108 - description =
'Show all diagnostics in buffer' ,
109 - category =
'diagnostic' ,
111 - command = show_diagnostics_in_buffer,
114 - local show_diagnostics_in_workspace = function ()
115 - local builtin
= require 'telescope.builtin' 116 - builtin.diagnostics()
120 - description =
'Show all diagnostics in workspace' ,
121 - category =
'diagnostic' ,
123 - command = show_diagnostics_in_workspace,
128 - local dia = function ( severity, line )
129 - local ns
= vim.api.nvim_create_namespace(
'test' .. tostring ( severity ) )
130 - local bufnr
= vim.api.nvim_get_current_buf()
136 - severity = severity,
137 - message =
'This is a test ' .. tostring ( severity )
.. ' diagnostic' ,
140 - vim.diagnostic.set( ns, bufnr, { options } )
141 - vim.diagnostic.show( ns, bufnr, { options } )
144 - local send_dia = function ()
145 - dia( vim.diagnostic.severity.ERROR,
1 )
146 - dia( vim.diagnostic.severity.WARN,
2 )
147 - dia( vim.diagnostic.severity.INFO,
3 )
148 - dia( vim.diagnostic.severity.HINT,
4 )
151 - vim.g.send_dia
= send_dia
neovim/lua/bugabinga/lsp.lua Added new file mode 100644 1 + local puk
= require 'std.puk' 2 + local project
= require 'std.project' 3 + local dbg
= require 'std.dbg' 4 + local icon
= require 'std.icon' 5 + local map
= require 'std.map' 6 + local auto
= require 'std.auto' 7 + local table = require 'std.table' 8 + local localrc
= require 'std.localrc' 11 + vim.lsp.set_log_level(
'debug' )
14 + local language_servers
= {
16 + root_dir = project.find_lua_project_root,
19 + hint = {
enable =
true ,
setType =
true , },
20 + telemetry = {
enable =
false , },
25 + root_dir = project.find_java_project_root,
28 + signatureHelp = {
enabled =
true , },
30 + autobuild = {
enabled =
true , },
31 + signatureHelp = {
enabled =
true , },
32 + saveActions = {
origanizeImports =
true , },
34 + starThreshold =
9999 ,
35 + staticStarThreshold =
9999 ,
39 + template =
'${object.className}{${member.name()}=${member.value()}, ${otherMembers}}' ,
41 + hashCodeEquals = {
useJava7Objects =
true , },
44 + eclipse = {
downloadSources =
true , },
47 + updateBuildConfiguration =
'interactive' ,
49 + maven = {
downloadSources =
true , },
50 + implementationsCodeLens = {
enabled =
true , },
51 + referencesCodeLens = {
enabled =
true , },
52 + references = {
includeDecompiledSources =
true , },
53 + inlayHints = {
parameterNames = {
enabled =
'all' , }, },
54 + format = {
enabled =
true , },
58 + zls = {
root_dir = project.find_zig_project_root, },
59 + ziggy = {
root_dir = project.find_zig_project_root, },
60 + ziggy_schema = {
root_dir = project.find_zig_project_root, },
66 + spelled_numbers =
true ,
68 + sentence_capitalization =
false ,
69 + unclosed_quotes =
true ,
70 + wrong_quotes =
true ,
71 + long_sentences =
true ,
72 + repeated_words =
true ,
75 + correct_number_suffix =
true ,
76 + number_suffix_capitalization =
true ,
77 + multiple_sequential_pronouns =
true ,
78 + linking_verbs =
true ,
79 + avoid_curses =
true ,
80 + terminating_conjunctions =
true 92 + docker_compose_language_service = {},
98 + emmet_language_server = {},
108 + markdown_oxide = {},
115 + rust_analyzer = {},
123 + local lspconfig
= puk
'lspconfig' 124 + for server, config
in pairs (language_servers)
do 125 + local capabilities
= vim.lsp.protocol.make_client_capabilities()
126 + config.capabilities
= require (
'bugabinga.completion' ).get_lsp_capabilities(config.capabilities)
127 + capabilities
= table .extend(
'force' , capabilities, config.capabilities)
128 + local settings
= config.settings
or {}
132 + lspconfig[server].setup(config)
135 + local lsp_attach = function (args)
136 + local bufnr
= args.buf
137 + local client_id
= args.data.client_id
138 + local client
= vim.lsp.get_client_by_id(client_id)
139 + if not client
then return end 141 + vim.lsp.completion.enable(
true , client_id, bufnr)
143 + if client.server_capabilities.inlayHintProvider
then 145 + description =
'Toggle inlay hints' ,
148 + keys =
'<leader>ti' ,
149 + command =
function ()
150 + vim.lsp.inlay_hint.enable(
not vim.lsp.inlay_hint.is_enabled())
157 + description =
'lsp: client attached to buffer' ,
158 + events =
'LspAttach' ,
159 + command = lsp_attach,
162 + local completion_icons
= {
163 + Class = icon.class,
164 + Color = icon.color,
165 + Constant = icon.constant,
166 + Constructor = icon.constructor,
168 + EnumMember = icon.enum_member,
169 + Field = icon.field,
171 + Folder = icon.folder,
172 + Function = icon[
'function' ],
173 + Interface = icon.interface,
174 + Keyword = icon.keyword,
175 + Method = icon.method,
176 + Module = icon.module,
177 + Property = icon.property,
178 + Snippet = icon.snippet,
179 + Struct = icon.struct,
182 + Value = icon.value,
183 + Variable = icon.variable,
186 + local completion_kinds
= vim.lsp.protocol.CompletionItemKind
187 + for i, kind
in ipairs (completion_kinds)
do 188 + completion_kinds[i]
= completion_icons[kind]
or kind
neovim/lua/bugabinga/lsp/clients/asm.lua Deleted deleted file mode 100644 1 - local project
= require 'std.project' 6 - filetypes = {
'asm' ,
'vmasm' , },
7 - root_dir = project.find_vcs_project_root,
8 - single_file_support =
true ,
neovim/lua/bugabinga/lsp/clients/c.lua Deleted deleted file mode 100644 1 - local project
= require 'std.project' 5 - root_dir = project.find_vcs_project_root,
9 - editsNearCursor =
true ,
12 - offsetEncoding = {
'utf-8' ,
'utf-16' , },
neovim/lua/bugabinga/lsp/clients/graphviz.lua Deleted deleted file mode 100644 1 - local project
= require 'std.project' 5 - command = {
'dot-language-server' ,
'--stdio' , },
7 - root_dir = project.find_vcs_project_root,
8 - single_file_support =
true ,
neovim/lua/bugabinga/lsp/clients/init.lua Deleted deleted file mode 100644 2 - require 'bugabinga.lsp.clients.java' ,
3 - require 'bugabinga.lsp.clients.lua' ,
4 - require 'bugabinga.lsp.clients.asm' ,
5 - require 'bugabinga.lsp.clients.c' ,
6 - require 'bugabinga.lsp.clients.graphviz' ,
7 - require 'bugabinga.lsp.clients.markdown' ,
8 - require 'bugabinga.lsp.clients.nu' ,
9 - require 'bugabinga.lsp.clients.rust' ,
10 - require 'bugabinga.lsp.clients.toml' ,
11 - require 'bugabinga.lsp.clients.vim' ,
12 - require 'bugabinga.lsp.clients.xml' ,
13 - require 'bugabinga.lsp.clients.zig' ,
neovim/lua/bugabinga/lsp/clients/java.lua Deleted deleted file mode 100644 1 - local project
= require 'std.project' 2 - local auto
= require 'std.auto' 4 - local java_settings
= {
5 - signatureHelp = {
enabled =
true , },
7 - autobuild = {
enabled =
true , },
8 - signatureHelp = {
enabled =
true , },
9 - saveActions = {
origanizeImports =
true , },
11 - starThreshold =
9999 ,
12 - staticStarThreshold =
9999 ,
16 - template =
'${object.className}{${member.name()}=${member.value()}, ${otherMembers}}' ,
18 - hashCodeEquals = {
useJava7Objects =
true , },
21 - eclipse = {
downloadSources =
true , },
24 - updateBuildConfiguration =
'interactive' ,
26 - maven = {
downloadSources =
true , },
27 - implementationsCodeLens = {
enabled =
true , },
28 - referencesCodeLens = {
enabled =
true , },
29 - references = {
includeDecompiledSources =
true , },
30 - inlayHints = {
parameterNames = {
enabled =
'all' , }, },
31 - format = {
enabled =
true , },
34 - local on_attach = function ()
35 - vim.lsp.codelens.refresh()
36 - auto
'refresh_codelens' {
37 - events =
'BufWritePost' ,
38 - description =
'Refreshes LSP CodeLens after java file is written.' ,
40 - command =
function ()
pcall ( vim.lsp.codelens.refresh )
end ,
48 - root_dir = project.find_java_project_root,
49 - single_file_support =
true ,
51 - settings = {
java = java_settings, },
52 - on_attach = on_attach,
neovim/lua/bugabinga/lsp/clients/ltex.lua Deleted deleted file mode 100644neovim/lua/bugabinga/lsp/clients/lua.lua Deleted deleted file mode 100644 1 - local project
= require 'std.project' 5 - root_dir = project.find_lua_project_root,
8 - hint = {
enable =
true ,
setType =
true , },
9 - telemetry = {
enable =
false , },
neovim/lua/bugabinga/lsp/clients/markdown.lua Deleted deleted file mode 100644 1 - local project
= require 'std.project' 5 - command = {
'marksman' ,
'server' , },
6 - filetypes =
'markdown' ,
7 - root_dir =
function ( path )
9 - {
name =
'.marksman.toml' ,
weight =
10 , },
11 - return project.find_project_root( path, markers )
13 - single_file_support =
true ,
neovim/lua/bugabinga/lsp/clients/nu.lua Deleted deleted file mode 100644 1 - local project
= require 'std.project' 5 - command = {
'nu' ,
'--lsp' },
6 - filetypes = {
'nu' },
7 - root_dir = project.find_project_root,
8 - single_file_support =
true ,
neovim/lua/bugabinga/lsp/clients/rust.lua Deleted deleted file mode 100644 1 - local project
= require 'std.project' 4 - local function reload_workspace ( bufnr )
5 - local clients
= vim.lsp.get_active_clients {
name =
'rust_analyzer' ,
bufnr = bufnr, }
6 - for _, client
in ipairs ( clients )
do 7 - vim.notify
'Reloading Cargo Workspace' 8 - client.request(
'rust-analyzer/reloadWorkspace' ,
nil ,
function ( err )
10 - error (
tostring ( err ) )
12 - vim.notify
'Cargo workspace reloaded' 17 - local is_descendant = function ( root, path )
18 - if not path
then return false end 20 - for directory
in vim.fs.parents( path )
do 21 - if vim.fs.normalize( root )
== vim.fs.normalize( directory )
then return true end 27 - local function is_library ( fname )
28 - local user_home
= vim.fs.normalize( vim.env.HOME )
29 - local cargo_home
= os .
getenv 'CARGO_HOME' or vim.fs.joinpath( user_home,
'.cargo' )
30 - local registry
= vim.fs.joinpath( cargo_home,
'registry' ,
'src' )
31 - local git_registry
= vim.fs.joinpath( cargo_home,
'git' ,
'checkouts' )
33 - local rustup_home
= os .
getenv 'RUSTUP_HOME' or vim.fs.joinpath( user_home,
'.rustup' )
34 - local toolchains
= vim.fs.joinpath( rustup_home,
'toolchains' )
36 - for _, item
in ipairs { toolchains, registry, git_registry, }
do 37 - if is_descendant( item, fname )
then 38 - local clients
= vim.lsp.get_active_clients {
name =
'rust_analyzer' , }
39 - return # clients
> 0 and clients[
# clients].config.root_dir
or nil 46 - name =
'rust-analyzer' ,
47 - command =
'rust-analyzer' ,
49 - root_dir =
function ( path )
50 - local library_root
= is_library( path )
51 - if library_root
then return library_root
end 52 - return project.find_rust_project_root( path )
56 - serverStatusNotification =
true ,
62 - reload_workspace(
0 )
64 - description =
'Reload current cargo workspace' ,
neovim/lua/bugabinga/lsp/clients/toml.lua Deleted deleted file mode 100644 1 - local project
= require 'std.project' 5 - command = {
'taplo' ,
'lsp' ,
'stdio' , },
6 - root_dir = project.find_vcs_project_root,
8 - single_file_support =
true ,
neovim/lua/bugabinga/lsp/clients/vim.lua Deleted deleted file mode 100644 1 - local project
= require 'std.project' 5 - command = {
'vim-language-server' ,
'--stdio' , },
7 - root_dir = project.find_vcs_project_root,
8 - single_file_support =
true ,
11 - iskeyword =
'@,48-57,_,192-255,-#' ,
14 - diagnostic = {
enable =
true , },
19 - projectRootPatterns = {
'runtime' ,
'nvim' ,
'.git' ,
'autoload' ,
'plugin' , },
21 - suggest = {
fromVimruntime =
true ,
fromRuntimepath =
true , },
neovim/lua/bugabinga/lsp/clients/xml.lua Deleted deleted file mode 1006441 - local project
= require 'std.project' 6 - filetypes = {
'xml' ,
'xsd' ,
'xsl' ,
'xslt' ,
'svg' , },
7 - root_dir = project.find_vcs_project_root,
8 - single_file_support =
true ,
neovim/lua/bugabinga/lsp/clients/zig.lua Deleted deleted file mode 100644 1 - local project
= require 'std.project' 6 - filetypes = {
'zig' ,
'zir' },
7 - root_dir = project.find_zig_project_root,
8 - single_file_support =
true ,
neovim/lua/bugabinga/lsp/init.lua Deleted deleted file mode 100644 1 - local puk
= require 'std.puk' 2 - local project
= require 'std.project' 3 - local dbg
= require 'std.dbg' 4 - local icon
= require 'std.icon' 5 - local map
= require 'std.map' 6 - local auto
= require 'std.auto' 7 - local table = require 'std.table' 8 - local localrc
= require 'std.localrc' 11 - vim.lsp.set_log_level(
'debug' )
14 - local language_servers
= {
16 - root_dir = project.find_lua_project_root,
19 - hint = {
enable =
true ,
setType =
true , },
20 - telemetry = {
enable =
false , },
25 - jdtls = {
root_dir = project.find_java_project_root, },
26 - zls = {
root_dir = project.find_zig_project_root, },
27 - ziggy = {
root_dir = project.find_zig_project_root, },
28 - ziggy_schema = {
root_dir = project.find_zig_project_root, },
33 - spelled_numbers =
true ,
35 - sentence_capitalization =
true ,
36 - unclosed_quotes =
true ,
37 - wrong_quotes =
true ,
38 - long_sentences =
true ,
39 - repeated_words =
true ,
42 - correct_number_suffix =
true ,
43 - number_suffix_capitalization =
true ,
44 - multiple_sequential_pronouns =
true ,
45 - linking_verbs =
true ,
46 - avoid_curses =
true ,
47 - terminating_conjunctions =
true 52 - root_dir = project.find_vcs_project_root,
57 - docker_compose_language_service = {},
62 - emmet_language_server = {},
72 - markdown_oxide = {},
87 - local lspconfig
= puk
'lspconfig' 88 - for server, config
in pairs (language_servers)
do 89 - local capabilities
= vim.lsp.protocol.make_client_capabilities()
90 - config.capabilities
= require (
'bugabinga.completion' ).get_lsp_capabilities(config.capabilities)
91 - capabilities
= table .extend(
'force' , capabilities, config.capabilities)
92 - local settings
= config.settings
or {}
96 - lspconfig[server].setup(config)
99 - local lsp_attach = function (args)
100 - local bufnr
= args.buf
101 - local client_id
= args.data.client_id
102 - local client
= vim.lsp.get_client_by_id(client_id)
103 - if not client
then return end 105 - vim.lsp.completion.enable(
true , client_id, bufnr)
107 - if client.server_capabilities.inlayHintProvider
then 109 - description =
'Toggle inlay hints' ,
112 - keys =
'<leader>ti' ,
113 - command =
function ()
114 - vim.lsp.inlay_hint.enable(
not vim.lsp.inlay_hint.is_enabled())
121 - description =
'lsp: client attached to buffer' ,
122 - events =
'LspAttach' ,
123 - command = lsp_attach,
126 - local completion_icons
= {
127 - Class = icon.class,
128 - Color = icon.color,
129 - Constant = icon.constant,
130 - Constructor = icon.constructor,
132 - EnumMember = icon.enum_member,
133 - Field = icon.field,
135 - Folder = icon.folder,
136 - Function = icon[
'function' ],
137 - Interface = icon.interface,
138 - Keyword = icon.keyword,
139 - Method = icon.method,
140 - Module = icon.module,
141 - Property = icon.property,
142 - Snippet = icon.snippet,
143 - Struct = icon.struct,
146 - Value = icon.value,
147 - Variable = icon.variable,
150 - local completion_kinds
= vim.lsp.protocol.CompletionItemKind
151 - for i, kind
in ipairs (completion_kinds)
do 152 - completion_kinds[i]
= completion_icons[kind]
or kind
neovim/lua/bugabinga/options/behaviour.lua Modified 6 6 description
= 'briefly highlight yanked text' ,
7 7 events
= 'TextYankPost' ,
9 - command = function ()
10 - vim.highlight.on_yank {
11 11 higroup =
'TextYankPost' ,
18 18 description
= 'Hide columns in buffers, that do not show source code.' ,
19 19 events
= {
'FileType' },
20 20 pattern
= ignored.filetypes,
21 - command = function ( data )
21 + command = function (data)
22 22 vim.opt_local.colorcolumn
= {}
23 23 vim.opt_local.signcolumn
= 'no' 24 24 vim.opt_local.foldcolumn
= '0' 30 30 description
= 'Reloads the current theme, when USR1 signal is received' ,
31 31 events
= {
'Signal' },
32 32 pattern
= 'SIGUSR1' ,
33 - command = function ()
33 + command = function ()
34 34 dbg.print
'received signal USR1! Attempting to reload colorscheme.' 35 35 vim.cmd.colorscheme
'nugu' 41 - local restore_cursor = function ()
41 + local restore_cursor = function ()
43 43 if vim.bo.buftype
~= '' then return end 46 - if vim.tbl_contains( ignored.filetypes, vim.bo.filetype )
then return end 46 + if vim.tbl_contains(ignored.filetypes, vim.bo.filetype)
then return end 49 - local cursor_line
= vim.api.nvim_win_get_cursor(
0 )[
1 ]
49 + local cursor_line
= vim.api.nvim_win_get_cursor(
0 )[
1 ]
50 50 if cursor_line
> 1 then return end 53 - local mark_line
= vim.api.nvim_buf_get_mark(
0 ,
[["]] )[
1 ]
54 - local n_lines
= vim.api.nvim_buf_line_count(
0 )
53 + local mark_line
= vim.api.nvim_buf_get_mark(
0 ,
[["]] )[
1 ]
54 + local n_lines
= vim.api.nvim_buf_line_count(
0 )
55 55 if not (
1 <= mark_line
and mark_line
<= n_lines)
then return end 65 65 auto
'restore_cursor_position_setup' {
66 66 description =
'Setup function to restore cursor position' ,
67 67 events =
'BufReadPre' ,
68 - command =
function ( data )
68 + command =
function (data)
69 69 auto
'restore_cursor_position' {
70 70 description =
'Restores last known cursor position when opening a buffer.' ,
71 71 events =
'FileType' ,
neovim/lua/bugabinga/options/commands.lua Modified 1 1 local user_command
= require 'std.user_command' 2 2 local light_up
= require 'std.light_up' 4 - local light_up_current_buffer = function ()
4 + local light_up_current_buffer = function ()
5 5 local group_names
= light_up.get_vim_highlight_groups()
6 - light_up.buffer(
0 , group_names )
6 + light_up.buffer(
0 , group_names)
10 - 'Highlight hl-group names in current buffer' (
11 - light_up_current_buffer
9 + user_command.LightUp
'Highlight hl-group names in current buffer' (light_up_current_buffer)
neovim/lua/bugabinga/options/keymaps.lua Modified 34 - local function open_link_under_cursor ()
36 - local file_under_cursor
= vim.fn.expand
'<cfile>' 39 - if file_under_cursor
and file_under_cursor:match
'%a+://.+' then 42 - (const.win32
or const.wsl)
and {
'cmd.exe' ,
'/C' ,
'start' ,
'msedge' , file_under_cursor }
43 - or {
'firefox' , file_under_cursor },
45 - function ( completed )
46 - if completed.code
== 0 then 47 - vim.schedule(
function ()
48 - vim.notify(
'Opened ' .. file_under_cursor )
51 - error (
'Failed to open ' .. file_under_cursor
.. ' because: ' .. completed.stderr )
56 - vim.notify
'Found no url under cursor !' 61 - description =
'Open web link under cursor in browser' ,
62 - category =
'navigation' ,
64 - command = open_link_under_cursor,
68 35 description =
'Dismiss current search highlight' ,
69 36 category =
'search' ,
70 37 keys =
'<esc><esc>' ,
71 - command =
function ()
72 - vim.cmd
[[ nohlsearch ]] 38 + command = vim.cmd.nohlsearch
42 + description =
'Source current file' ,
44 + keys =
'<leader>xx' ,
45 + command =
function ()
47 + vim.notify(
'Sourcing current file...' )
77 52 description
= 'Toggle dark/light theme variant' ,
79 54 keys
= '<leader>tt' ,
80 - command = function ()
55 + command = function ()
82 56 if vim.opt.background:get()
== 'dark' then 83 57 vim.opt.background
= 'light' 85 59 vim.opt.background
= 'dark' 88 - vim.notify(
'Toggled background to ' .. vim.opt.background:get()
.. '.' )
61 + vim.notify(
'Toggled background to ' .. vim.opt.background:get()
.. '.' )
96 69 command
= vim.cmd.redo,
99 - for _, toggler
in ipairs ( togglers )
do 72 + for _, toggler
in ipairs (togglers)
do 100 73 local option_name
= toggler.options[
1 ].name
101 - local first_char
= string .
sub ( option_name,
1 ,
1 )
74 + local first_char
= string .
sub (option_name,
1 ,
1 )
104 77 description =
'Toggle ' .. option_name
.. ' option' ,
105 78 category =
'options' ,
106 79 keys =
'<leader>t' .. first_char,
107 - command =
function ()
80 + command =
function ()
neovim/lua/bugabinga/patterns.lua Added new file mode 100644 1 + local puk
= require 'std.puk' 3 + puk.defer
'mini.hipatterns' (
function (patterns)
7 + fixme = {
pattern =
'%f[%w]()FIXME()%f[%W]' ,
group =
'MiniHipatternsFixme' },
8 + hack = {
pattern =
'%f[%w]()HACK()%f[%W]' ,
group =
'MiniHipatternsHack' },
9 + todo = {
pattern =
'%f[%w]()TODO()%f[%W]' ,
group =
'MiniHipatternsTodo' },
10 + note = {
pattern =
'%f[%w]()NOTE()%f[%W]' ,
group =
'MiniHipatternsNote' },
13 + hex_color = patterns.gen_highlighter.hex_color(),
neovim/lua/bugabinga/terminal.lua Added new file mode 100644 1 + local puk
= require 'std.puk' 2 + local map
= require 'std.map' 4 + puk.defer
'neoterm' (
function (neoterm)
13 + map.normal.terminal {
14 + description =
'Toggle terminal' ,
15 + category =
'terminal' ,
16 + keys =
'<leader>tt' ,
17 + command = neoterm.toggle,
neovim/lua/bugabinga/treesitter.lua Modified 19 19 command = function (data)
20 20 local match
= data.match
21 21 if table .contains(ignored.filetypes, match)
then 22 - vim.notify(
'Ingore ' .. match
.. ' for treesitter.' )
22 + vim.notify(
'Ignore ' .. match
.. ' for treesitter.' , vim.log.levels.TRACE)
neovim/lua/std/ignored.lua Modified neovim/puk.plugins.nuon Modified 127 127 "3e92f6764e770ba392325cad3a4497adcada695f",
133 + "echasnovski/mini.hipatterns",
135 + "f34975103a38b3f608219a1324cdfc58ea660b8b",
303 311 "1518752906ba3fac0060d9efab6e4d3ec15d4b5a",