repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

neovim: back baby tresor: new secrets

6bf371a10cfc5f3a48df4df7aa84a87bbb23b63b

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Changed files (16)

neovim/.lsp.settings.lua

Modified
4 4 return {
5 5 LuaLS = {
6 6 Lua = {
7 7 diagnostics = { globals = { 'vim', 'prequire', }, },
8 8 runtime = { version = 'LuaJIT', },
9 9 workspace = {
10 - library = { prequire 'neodev.config'.types(), },
10 + library = vim.api.nvim_get_runtime_file("",true),

neovim/coco.lua

Deleted
deleted file mode 100644
1 -local vim = _G['vim'] or error 'where is my vim'
2 -local co = coroutine
4 -local function current_non_main_co()
5 - local data = { coroutine.running(), }
7 - if select( '#', unpack( data ) ) == 2 then
8 - local co, is_main = unpack( data )
9 - if is_main then
10 - return nil
11 - end
12 - return co
13 - end
15 - return unpack( data )
16 -end
18 -local function wrap( func, argc, opts )
19 - opts = vim.tbl_extend( 'keep', opts or {}, { strict = true, } )
20 - vim.validate { func = { func, 'function', }, argc = { argc, 'number', }, }
21 - local protected = function ( ... )
22 - local args = { ..., }
23 - local cb = args[argc]
24 - args[argc] = function ( ... )
25 - cb( true, ... )
26 - end
27 - xpcall( func, function ( err )
28 - cb( false, err, debug.traceback() )
29 - end, unpack( args, 1, argc ) )
30 - end
32 - return function ( ... )
33 - if not current_non_main_co() then
34 - if opts.strict then
35 - error 'Cannot call async function from non-async context'
36 - end
37 - return func( ... )
38 - end
40 - local ret = { coroutine.yield( argc, protected, ... ), }
41 - local success = ret[1]
42 - if not success then
43 - error( ('Wrapped function failed: %s\n%s'):format( ret[2], ret[3] ) )
44 - end
45 - return unpack( ret, 2, table.maxn( ret ) )
46 - end
47 -end
49 -local dbg = function ( fmt, ... )
50 - vim.print( string.format( fmt, ... ) )
51 -end
53 -local load_version = function ( prg, callback )
54 - vim.validate {
55 - prg = { prg, 'string', },
56 - callback = { callback, 'function', },
57 - }
59 - return co.create( function ()
60 - local current_thread = co.running()
61 - local stdin = nil;
62 - local stdout = vim.uv.new_pipe();
63 - local stderr = vim.uv.new_pipe();
64 - local process_result = {}
65 - local process_error = {}
66 - local handle, pid = vim.uv.spawn( prg, {
67 - stdio = { stdin, stdout, stderr, },
68 - args = { '--version', },
69 - hide = true,
70 - }, function ( code, signal )
71 - dbg( 'process done with code: %d, signal: %s', code, signal )
72 - callback( process_error, process_result, code, signal )
73 - co.resume( current_thread )
74 - end )
75 - if not handle then
76 - error( string.format( 'program %s could not be spawned', prg ) )
77 - end
79 - -- dbg( 'process open with handle: %s and pid %d', handle, pid )
81 - vim.uv.read_start( stdout, function ( err, data )
82 - if err then
83 - dbg( err )
84 - elseif data then
85 - -- dbg( 'chunk of stdout: %s', data )
86 - table.insert( process_result, data )
87 - else
88 - -- dbg 'stdout done'
89 - end
90 - end )
92 - vim.uv.read_start( stderr, function ( err, data )
93 - if err then
94 - dbg( err )
95 - elseif data then
96 - -- dbg( 'chunk of stderr: %s', data )
97 - table.insert( process_error, data )
98 - else
99 - -- dbg 'stderr done'
100 - end
101 - end )
103 - co.yield()
104 - end )
105 -end
109 -local java = load_version( 'java', function ( err, result, code, signal )
110 - if #err ~= 0 then
111 - dbg( 'err: %s, code: %s, signal: %s', table.concat( err ), code, signal )
112 - else
113 - dbg( 'java version is: %s', table.concat( result ) )
114 - end
115 -end )
117 -local cargo = load_version( 'cargo', function ( err, result )
118 - dbg( 'cargo version is: %s', table.concat( result ) )
119 -end )
121 -local nvim = load_version( 'nvim', function ( err, result )
122 - dbg( 'nvim version is: %s', table.concat( result ) )
123 -end )
128 --- vim.uv.run()
129 --- vim.uv.run 'once'
130 --- vim.wait( 300, function ()
131 --- dbg '---'
132 --- end, 300 )

neovim/init2.lua

Deleted
deleted file mode 100644
1 -local puck = require 'puck'
2 -local gh = puck.plugin_types.github.type
3 -local cb = puck.plugin_types.codeberg.type
4 -local srht = puck.plugin_types.sourcehut.type
5 -local dev = puck.plugin_types.development.type
7 --- TODO move this outside
8 --- testing the puck
9 -local plugins = {
10 - { dev, 'bugabinga/venn.nvim', },
11 - { gh, 'nyoom-engineering/oxocarbon.nvim', 'c5846d10cbe4131cc5e32c6d00beaf59cb60f6a2', },
12 - { srht, '~adigitoleo/haunt.nvim', 'e3e3c8f45663fed8225ba5efb0af00a2df14a736', },
13 - { cb, 'jthvai/lavender.nvim', 'a5187e6f4afe4b1f2fbcd0fe0bad34c40002ba48', },
14 - { dev, 'bugabinga/auto-dark-mode.nvim', },
15 -}
17 -puck.setup {
18 - plugins = plugins,
19 - -- TODO change Workspace on win32
20 - workspace = '~/Workspace',
21 -}

neovim/lazy-lock.json

Modified
9 9 "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
10 10 "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
11 11 "colorizer.nvim": { "branch": "master", "commit": "c1602ff3f11566bb7f16f90985b0c59d3d7db0ef" },
12 - "conform.nvim": { "branch": "master", "commit": "0ebe875d9c306f5fc829db38492ffff2a70d8e9d" },
12 + "conform.nvim": { "branch": "master", "commit": "936f2413e6c57185cd873623a29a0685bce4b423" },
13 13 "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
14 14 "dressing.nvim": { "branch": "master", "commit": "c5775a888adbc50652cb370073fcfec963eca93e" },
15 15 "fidget.nvim": { "branch": "main", "commit": "ef99df04a1c53a453602421bc0f756997edc8289" },
19 19 "heirline.nvim": { "branch": "master", "commit": "0d797435e54645a5f98bad7ad6046aac1ef95c1e" },
20 20 "indent-blankline.nvim": { "branch": "master", "commit": "3fe94b8034dd5241cb882bb73847303b58857ecf" },
21 21 "lazy.nvim": { "branch": "main", "commit": "48b52b5cfcf8f88ed0aff8fde573a5cc20b1306d" },
22 + "lazydev.nvim": { "branch": "main", "commit": "491452cf1ca6f029e90ad0d0368848fac717c6d2" },
22 23 "lspkind.nvim": { "branch": "master", "commit": "cff4ae321a91ee3473a92ea1a8c637e3a9510aec" },
24 + "luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" },
23 25 "mini.bracketed": { "branch": "main", "commit": "833d66df6e0588222312a963780c6ec42ed7437d" },
24 26 "mini.bufremove": { "branch": "main", "commit": "1ee294a97e091d3cf967974df622c0d887890dc2" },
25 27 "mkdir.nvim": { "branch": "main", "commit": "c55d1dee4f099528a1853b28bb28caa802eba217" },
26 - "neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" },
27 28 "neogen": { "branch": "main", "commit": "e932ba918b56723436b77aa3efb844a11b2851ab" },
28 29 "nrpattern.nvim": { "branch": "master", "commit": "f862ce687761078ef3155688151c55f69d28453e" },
29 30 "nui.nvim": { "branch": "main", "commit": "61574ce6e60c815b0a0c4b5655b8486ba58089a1" },
36 37 "nvim-lsp-file-operations": { "branch": "master", "commit": "92a673de7ecaa157dd230d0128def10beb56d103" },
37 38 "nvim-navbuddy": { "branch": "master", "commit": "f22bac988f2dd073601d75ba39ea5636ab6e38cb" },
38 39 "nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" },
39 - "nvim-neoclip.lua": { "branch": "main", "commit": "709c97fabec9da7d04f7d2f5e207423af8c02871" },
40 + "nvim-neoclip.lua": { "branch": "main", "commit": "32e05f2d23dc5b6a284a688c0535a83d1bfc633f" },
40 41 "nvim-spectre": { "branch": "master", "commit": "ba7fb777edff6c1fbbeffd343e113af64c04e90a" },
41 42 "nvim-surround": { "branch": "main", "commit": "ec2dc7671067e0086cdf29c2f5df2dd909d5f71f" },
42 43 "nvim-tree.lua": { "branch": "master", "commit": "d41b4ca013ed89e41b9c0ecbdae5f1633e42f7fa" },
43 - "nvim-treesitter": { "branch": "master", "commit": "4770d9a1a77b0cc2b723c646c3dbe43a9133e5db" },
44 + "nvim-treesitter": { "branch": "master", "commit": "6a3c6a42a6e24414bdf337b05a84a0ea013dd155" },
44 45 "nvim-treesitter-context": { "branch": "master", "commit": "e6cc783b74606d97ca9eff6494e3f5c2ca603a50" },
45 46 "nvim-treesitter-endwise": { "branch": "master", "commit": "8b34305ffc28bd75a22f5a0a9928ee726a85c9a6" },
46 47 "nvim-treesitter-textobjects": { "branch": "master", "commit": "bf8d2ad35d1d1a687eae6c065c3d524f7ab61b23" },
48 49 "nvim-ts-context-commentstring": { "branch": "main", "commit": "375c2d86cee6674afd75b4f727ce3a80065552f7" },
49 50 "nvim-web-devicons": { "branch": "master", "commit": "9793801f974bba70e4ac5d7eae6c4f5659993d8e" },
50 51 "nvim-window": { "branch": "main", "commit": "81f29840ac3aaeea6fc2153edfabebd00d692476" },
51 - "oil.nvim": { "branch": "master", "commit": "1fe476daf0b3c108cb8ee1fc1226cc282fa2c9c1" },
52 + "oil.nvim": { "branch": "master", "commit": "1eb9fb35a4613518f79790117ed82c367a0b4a22" },
52 53 "pair-ls.nvim": { "branch": "master", "commit": "ccf3280d8cafec48e4947dd827abbc456435dfad" },
53 54 "playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" },
54 55 "plenary.nvim": { "branch": "master", "commit": "ec289423a1693aeae6cd0d503bac2856af74edaa" },

neovim/lua/bugabinga/lazy.lua

Modified
31 31 -- version = '*',
32 32 -- useful to globally disable plugins
33 33 -- cond = function ( plugin_spec )
34 - -- return plugin_spec.name:find 'oil'
34 + -- return plugin_spec.name:find 'oil'
35 35 -- end,
37 37 install = {
104 104 patterns = { 'bugabinga', },
105 105 path = win32 and 'W:/' or '~/Workspace',
107 + profiling = {
108 + loader = true,
109 + require = true,
110 + },
109 113 local map = require 'std.map'

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

Modified
1 -local table = require 'std.table'
2 1 local project = require 'std.project'
3 2 local auto = require 'std.auto'
4 -local map = require 'std.map'
6 4 local find_jdks = function ()
7 5 local host = vim.uv.os_gethostname()
62 60 referencesCodeLens = { enabled = true, },
63 61 references = { includeDecompiledSources = true, },
64 62 inlayHints = { parameterNames = { enabled = 'all', }, },
65 - format = {
66 - enabled = true,
67 - -- TODO: set these here with my preferred settings
68 - -- set these on a project level -> read intellij /eclipse settings?
69 - -- settings = {
70 - -- url = 'TODO',
71 - -- profile = 'TODO',
72 - -- },
73 - },
63 + format = { enabled = true, },
76 66 local on_attach = function ()

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

Modified
7 7 root_dir = project.find_lua_project_root,
8 8 single_file_support = true,
9 9 workspaces = true,
10 - before_init = prequire 'neodev.lsp'.before_init,
11 10 settings = {
12 11 Lua = {
13 12 addonManager = { enable = false, },
15 14 hint = { enable = true, setType = true, },
16 15 telemetry = { enable = false, },
17 16 window = { progressBar = false, statusBar = false, },
18 - workspace = { checkThirdParty = false, },
17 + workspace = {
18 + checkThirdParty = false,
19 + library = nil,
20 + },

neovim/lua/bugabinga/lsp/init.lua

Modified
77 77 ['config.single_file_support'] = { config.single_file_support, 'boolean', true, },
78 78 ['config.settings'] = { config.settings, 'table', true, },
79 79 ['config.workspaces'] = { config.workspaces, 'boolean', true, },
80 - ['config.before_init'] = { config.before_init, 'function', true, },
80 + ['config.before_init'] = { config.before_init, {'function', 'table'}, true, },
81 81 ['config.init_options'] = { config.init_options, 'table', true, },
82 82 ['config.capabilities'] = { config.capabilities, 'table', true, },
83 83 ['config.custom_start'] = { config.custom_start, 'function', true, },

neovim/lua/bugabinga/plugins/cmp.lua

Modified
94 94 local sources = {
95 - { name = 'neodev', },
96 95 { name = 'nvim_lua', },
97 96 { name = 'nvim_lsp', },
98 97 { name = 'path', },

neovim/lua/bugabinga/plugins/lazydev.lua

Added
new file mode 100644
1 +return {
2 + {
3 + 'folke/lazydev.nvim',
4 + ft = 'lua', -- only load on lua files
5 + opts = {
6 + library = {
7 + -- See the configuration section for more details
8 + -- Load luvit types when the `vim.uv` word is found
9 + { path = 'luvit-meta/library', words = { 'vim%.uv', }, },
10 + },
11 + },
12 + },
13 + { 'Bilal2453/luvit-meta', lazy = true, }, -- optional `vim.uv` typings
14 + { -- optional completion source for require statements and module annotations
15 + 'hrsh7th/nvim-cmp',
16 + opts = function ( _, opts )
17 + opts.sources = opts.sources or {}
18 + table.insert( opts.sources, {
19 + name = 'lazydev',
20 + group_index = 0, -- set group index to 0 to skip loading LuaLS completions
21 + } )
22 + end,
23 + },
24 + -- { "folke/neodev.nvim", enabled = false }, -- make sure to uninstall or disable neodev.nvim

neovim/lua/bugabinga/plugins/neodev.lua

Deleted
deleted file mode 100644
1 -return {
2 - 'folke/neodev.nvim',
3 - opts = {
4 - -- With lspconfig, Neodev will automatically setup your lua-language-server
5 - -- If you disable this, then you have to set {before_init=require("neodev.lsp").before_init}
6 - -- in your lsp start options
7 - lspconfig = false,
8 - setup_jsonls = false,
9 - -- override = function ( root_dir, library )
10 - -- vim.print( root_dir, library )
11 - -- end,
12 - },
13 -}

neovim/lua/config/oxocarbon.lua

Deleted
deleted file mode 100644
1 -local puck = require'puck'
2 -puck.load 'oxocarbon'
3 -vim.cmd.colorscheme 'oxocarbon'

neovim/lua/puck.lua

Deleted
deleted file mode 100644
1 --- [x] Install tarballs into data dir
2 --- [x] Put local plugins on runtimepath
3 --- Generate helptags ALL
4 --- project local plugin settings ?
5 --- make this module async --> emit PuckDone event?
6 --- Install treesitter parser into data dir
7 --- Build parsers and put them where?
8 --- vim.validate all input in functions
9 ---
10 --- [x] Cache lua byte code? not necessary anymore thanks to vim.loader
12 --- TODO export some kind of structure
13 ---
14 -local dev = 'plugin_under_development'
15 -local gh = 'plugin_from_github'
16 -local srht = 'plugin_from_srht'
17 -local cb = 'plugin_from_codeberg'
18 -local gh_format = 'https://github.com/%s/archive/%s.tar.gz'
19 -local cb_format = 'https://codeberg.org/%s/archive/%s.tar.gz'
20 -local srht_format = 'https://git.sr.ht/%s/archive/%s.tar.gz'
22 -local plugins = {}
24 -local as_name = function ( plugin_coords )
25 - return vim.fs.basename( plugin_coords ):gsub( '(%w+)%.?%w*', '%1' )
26 -end
28 -local configure_plugin = function ( plugin_name )
29 - local config = 'config.' .. plugin_name
30 - vim.schedule( function ()
31 - local ok = pcall( require, config )
32 - if not ok then
33 - vim.notify( string.format( 'unable to load configuration for %s at %s', plugin_name, config ), vim.log.levels.WARN )
34 - end
35 - end )
36 -end
38 -local download_plugin_into = function ( puck_root, plugin_name, plugin_tarball_url, plugin_install_path )
39 - vim.validate {
40 - puck_root = { puck_root, 'string', },
41 - plugin_name = { plugin_name, 'string', },
42 - plugin_tarball_url = { plugin_tarball_url, 'string', },
43 - plugin_install_path = { plugin_install_path, 'string', },
44 - }
46 - assert( vim.fn.executable 'curl', 'curl not found' )
47 - assert( vim.fn.executable 'tar', 'tar not found' )
49 - -- local tmp_dir = vim.uv.fs_mkdtemp(vim.fs.joinpath(vim.uv.os_tmpdir(),'puck_tmp_install_path_XXXXXX'))
50 - -- vim.fn.mkdir( plugin_install_path, 'p' )
52 - local tarball_data_stream = vim.uv.new_pipe( true )
54 - local curl_handle, curl_pid = vim.uv.spawn( 'curl',
55 - {
56 - args = { '--silent', '--location', plugin_tarball_url, },
57 - cwd = puck_root,
58 - stdio = { nil, tarball_data_stream, nil, },
59 - hide = true,
60 - },
61 - function ( code, signal )
62 - if code ~= 0 then
63 - error( 'curl', code, signal )
64 - end
65 - end )
66 - local tar_handle, tar_pid = vim.uv.spawn( 'tar',
67 - {
68 - args = { '--extract', '--gzip', '--file', '-', },
69 - cwd = puck_root,
70 - stdio = { tarball_data_stream, nil, nil, },
71 - hide = true,
72 - },
73 - function ( code, signal )
74 - if code ~= 0 then
75 - error( 'tar done', code, signal )
76 - end
78 - local contains_name = function ( name, path )
79 - return name:find( plugin_name,
80 - 0, true )
81 - end
82 - local extracted_dir = vim.fs.find( contains_name,
83 - { path = puck_root, type = 'directory', limit = 1, } )
84 - assert( #extracted_dir ~= 0, 'No directory was found in tarball' )
85 - assert( #extracted_dir == 1,
86 - 'Too many directories were found in tarball. Expected one!' )
87 - -- FIXME: filter out files and folders, that are unnecessary for neovim plugins
88 - local ok = vim.uv.fs_rename( extracted_dir[1], plugin_install_path )
89 - assert( ok,
90 - string.format( 'Failed to move extracted plugin from %s to %s.',
91 - extracted_dir[1], plugin_install_path ) )
92 - configure_plugin( plugin_name )
93 - end )
95 - vim.uv.shutdown( tarball_data_stream, function ()
96 - vim.uv.close( curl_handle )
97 - vim.uv.close( tar_handle )
98 - end )
99 -end
101 -local delete_directory_recursive = function ( path )
102 - local stat = vim.uv.fs_stat( path )
103 - if stat and stat.type == 'directory' then
104 - local dir = vim.uv.fs_scandir( path )
105 - if dir then
106 - while true do
107 - local name, type = vim.uv.fs_scandir_next( dir )
108 - if not name then
109 - break
110 - end
112 - local full_path = vim.fs.joinpath( path, name )
113 - if type == 'directory' then
114 - return delete_directory_recursive( full_path )
115 - else
116 - return vim.uv.fs_unlink( full_path )
117 - end
118 - end
119 - end
120 - return vim.uv.fs_rmdir( path )
121 - else
122 - return false
123 - end
124 -end
126 -local as_url_format = function ( plugin_type )
127 - assert( plugin_type ~= dev, 'local plugins need not have an url format!' )
128 - if plugin_type == gh then return gh_format end
129 - if plugin_type == cb then return cb_format end
130 - if plugin_type == srht then return srht_format end
132 - error( 'unknown plugin type ' .. plugin_type .. ' given.' )
133 -end
135 -local install_plugin = function ( puck_root, plugin_type, plugin_coords, plugin_rev )
136 - local plugin_name = as_name( plugin_coords )
137 - local plugin_install_path = vim.fs.normalize( vim.fs.joinpath( puck_root, plugin_name ) )
138 - local plugin_install_path_stat = vim.uv.fs_stat( plugin_install_path )
139 - local plugin_already_exists = plugin_install_path_stat and plugin_install_path_stat.type == 'directory'
141 - local plugin_install_rev_path = vim.fs.normalize( vim.fs.joinpath( puck_root, plugin_name .. '.rev' ) )
143 - -- either do nothing or update/fresh install
144 - if (vim.uv.fs_access( plugin_install_rev_path, 'R' )) then
145 - local plugin_install_rev_file = io.open( plugin_install_rev_path, 'r' )
146 - if not plugin_install_rev_file then
147 - vim.notify( 'Unable to read rev file ' .. plugin_install_rev_path,
148 - vim.log.levels.ERROR )
149 - end
150 - local current_rev = plugin_install_rev_file:read()
151 - plugin_install_rev_file:close()
152 - if current_rev == plugin_rev then
153 - configure_plugin( plugin_name )
154 - return
155 - end
156 - end
157 - -- rev is different, must be update (we don`t care if up or down) or fresh install
158 - local removed = delete_directory_recursive( plugin_install_path )
159 - local url_format = as_url_format( plugin_type )
160 - local plugin_tarball_url = url_format:format( plugin_coords, plugin_rev )
161 - download_plugin_into( puck_root, plugin_name, plugin_tarball_url, plugin_install_path, callback )
162 - local mode = vim.uv.fs_access( plugin_install_rev_path, 'W' ) and 'w+' or 'w'
163 - local plugin_install_rev_file = io.open( plugin_install_rev_path, mode )
164 - if not plugin_install_rev_file then
165 - vim.notify( 'Unable to write rev file ' .. plugin_install_rev_path,
166 - vim.log.levels.ERROR )
167 - end
168 - plugin_install_rev_file:write( plugin_rev )
169 - plugin_install_rev_file:close()
170 - if removed then
171 - vim.notify( 'Plugin ' .. plugin_coords .. '@' .. plugin_rev .. ' updated!', vim.log.levels.INFO )
172 - else
173 - vim.notify( 'Plugin ' .. plugin_coords .. '@' .. plugin_rev .. ' installed!', vim.log.levels.INFO )
174 - end
175 -end
177 -local delete_unused_plugins = function ( puck_root ) end
179 -local register_local_plugin = function ( workspace, plugin_coords )
180 - local plugin_path = vim.fs.normalize( vim.fs.joinpath( workspace, vim.fs.basename( plugin_coords ) ) )
181 - local plugin_path_stat = vim.uv.fs_stat( plugin_path )
183 - if (plugin_path_stat and plugin_path_stat.type == 'directory') then
184 - vim.opt.runtimepath:prepend( plugin_path )
185 - else
186 - vim.notify( 'Failed to load local plugin ' .. plugin_path .. '!', vim.log.levels.ERROR )
187 - end
188 -end
190 -local load_local_plugin = function ( plugin_coords )
191 - local plugin_name = as_name( plugin_coords )
192 - local plugin_init = {}
193 - vim.tbl_extend( 'keep', plugin_init, vim.api.nvim_get_runtime_file( 'plugin/' .. plugin_name .. '.vim', false ) )
194 - vim.tbl_extend( 'keep', plugin_init, vim.api.nvim_get_runtime_file( 'plugin/' .. plugin_name .. '.lua', false ) )
195 - for _, init in pairs( plugin_init ) do
196 - vim.cmd.source( init )
197 - end
198 -end
200 -local load_registered_plugin = function ( plugin_name )
201 - vim.cmd.packadd( plugin_name )
202 - -- vim.cmd.helptags(plugin_name)
203 - return require( plugin_name )
204 -end
206 -local setup = function ( options )
207 - options = options or {}
208 - vim.validate {
209 - ['options.workspace'] = { options.workspace, 'string', },
210 - }
212 - options.plugins = options.plugins or {}
213 - plugins = options.plugins
214 - -- take control of loading plugins.
215 - -- that means we have to take care of builtin plugins later
216 - vim.opt.loadplugins = false
218 - local puck_root = vim.fs.normalize( vim.fn.stdpath 'data' .. '/site/pack/puck/opt' )
219 - vim.fn.mkdir( puck_root, 'p' )
221 - for _, plugin in pairs( plugins ) do
222 - local plugin_type = plugin[1]
223 - local plugin_coords = plugin[2]
224 - local plugin_rev = plugin[3]
225 - if plugin_type == dev then
226 - register_local_plugin( options.workspace, plugin_coords )
227 - -- TODO def v plugins need configure too
228 - -- configure_plugin(plugin_name)
229 - else
230 - install_plugin( puck_root, plugin_type, plugin_coords, plugin_rev )
231 - end
232 - end
234 - delete_unused_plugins( puck_root )
236 - -- manually load builtin plugins, that we disabled earlier
237 - -- loads only a subset of builtins, that i find useful.
238 - load_local_plugin 'plugin/shada.vim'
239 - load_local_plugin 'plugin/tutor.vim'
240 - load_local_plugin 'plugin/spellfile.vim'
241 - load_local_plugin 'plugin/osc52.lua'
242 - -- can this be useful on win32?
243 - -- load_local_plugin 'plugin/man.lua'
244 - load_local_plugin 'plugin/editorconfig.lua'
245 -end
247 -return {
248 - -- FIXME: load needs to handle registerd and local plugin loading
249 - load = load_registered_plugin,
250 - setup = setup,
251 - plugin_types = {
252 - github = { type = gh, format = gh_format, },
253 - codeberg = { type = cb, format = cb_format, },
254 - sourcehut = { type = srht, format = srht_format, },
255 - development = { type = dev, format = nil, },
256 - },

neovim/lua/std/prequire.lua

Modified
41 41 table.insert( mods, mod )
42 42 else
43 43 printStackTrace()
44 - vim.notify_once( string.format( 'Missing module: %s', arg ), vim.log.levels.WARN )
44 + vim.notify_once( string.format( 'Prequire is missing a module: %s', arg ), vim.log.levels.WARN )
45 45 -- Return a proxy item that returns itself, so we can do things like
46 46 -- prequire("module").setup()
47 47 local proxy = {}

nushell/config.nu

Modified
17 17 # some experimental options
18 - buffer_editor: "nvim --clean"
18 + buffer_editor: ["nvim" "--clean"]
19 19 highlight_resolved_externals : true
20 20 use_kitty_protocol : true
21 21 render_right_prompt_on_last_line: true

nushell/gen-aliases.nu

Modified
21 21 aka tar bsdtar
22 22 aka walk yazi
23 23 aka tree tre
24 -aka imgcat 'wezterm imgcat'
24 +aka imgcat wezterm imgcat
26 +aka ll ls '--long'
27 +aka la ls '--long' '--all'
26 29 aka browse firefox