repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

neovim: puts image.nvim and diagram.nvim into incubator

aa675f3bad37bc262d9975cd1c2b91003cd8664f

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Changed files (5)

neovim/README.md

Modified
8 8 init.lua
9 9 : main entry point
10 -\
11 11 puk.nu
12 12 : out-of-band plugin manager
13 -\
14 14 lua/patches
15 15 : overrides to built-in lua functions of neovim
16 -\
17 17 lua/std
18 18 : standard lib. can only depend on itself and neovim apis.
19 -\
20 20 lua/bugabinga
21 21 : config modules, that in aggregation, define all of the configuration and may
22 -only depend on itself, std and plugins.
23 -\
22 + only depend on itself, std and plugins.
24 24 lua/bugabinga/plugins
25 25 : third party plugins and their config glue integrating it into the config.
26 -\
27 27 colors/nugu
28 28 : color theme
29 -\
30 30 ftplugin
31 31 : file type specific config
32 -\
33 -after\queries
33 +after/queries
34 34 : additional treesitter queries
35 -\
49 49 # todo
51 -* configure friendly-snippets with blink.cmp
52 -* is it worth integrating yazi into neovim?
53 -* check out <https://github.com/garymjr/nvim-snippets>
54 51 * steal <https://github.com/olrtg/nvim-emmet>
55 -* create skeleton-plugin for default file content based on file type
56 - * user command for creating new file
57 - * :Skeletor java class -> java files with correct package and boilerplate (class, interface, record,...)
58 - * Use <https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#snippet_syntax> as template syntax

neovim/lua/bugabinga/format.lua

Modified
3 3 local puk = require 'std.puk'
4 4 local dbg = require 'std.dbg'
5 5 local map = require 'std.map'
6 6 local user_command = require 'std.user_command'
8 -local format = function ()
9 - require 'conform'.format( { async = false }, function ( err )
8 +local format = function()
9 + require 'conform'.format({ async = false }, function(err)
10 10 if err and dbg.get() then
11 - vim.print( 'Format failed', err )
11 + vim.print('Format failed', err)
13 - end )
13 + end)
15 15 vim.lsp.buf.format {
16 - filter = function ( client )
16 + filter = function(client)
17 17 local ok = client.supports_method 'textDocument/formatting' ---@diagnostic disable-line: param-type-mismatch, missing-parameter
18 - if ok and dbg.get() then print( 'Using LSP formatter: ' .. client.name ) end
18 + if ok and dbg.get() then print('Using LSP formatter: ' .. client.name) end
19 19 return ok
20 20 end,
21 21 async = false,
27 27 command = format,
30 -user_command.Format 'Format the current buffer' ( format )
30 +user_command.Format 'Format the current buffer' (format)
32 32 vim.o.formatexpr = "v:lua.require'conform'.formatexpr()"
34 -puk.defer 'conform' ( function ( conform )
34 +puk.defer 'conform' (function(conform)
35 35 conform.setup {
36 36 formatters_by_ft = {
37 37 toml = { 'taplo' },
48 48 formatters = {
49 49 mdslw = {
50 - prepend_args = { '--stdin-filepath', '$FILENAME' },
50 + prepend_args = { '--features', 'keep-linebreaks,collate-link-defs,outsource-inline-links', '--stdin-filepath', '$FILENAME' },
53 53 log_level = dbg.get() and vim.log.levels.TRACE or vim.log.levels.INFO,
55 -end )
55 +end)

neovim/lua/bugabinga/incubator.lua

Modified
126 126 -------------------------------------------------------------------------------
127 127 puk.defer 'hlchunk' (function(hlchunk)
128 - require('hlchunk').setup({
128 + hlchunk.setup {
129 129 chunk = {
130 130 enable = true
132 - })
133 +end)
134 +-------------------------------------------------------------------------------
135 +puk.defer 'image' (function(image)
136 + image.setup {
137 + backend = 'kitty',
138 + processor = 'magick_cli',
139 + window_overlap_clear_ft_ignore = ignored.filetypes,
140 + integrations = {
141 + markdown = {
142 + clear_in_insert_mode = true,
143 + only_render_image_at_cursor = true,
144 + },
145 + },
146 + editor_only_render_when_focused = true,
148 +end)
149 +-------------------------------------------------------------------------------
150 +puk.defer 'diagram' (function(diagram)
151 + diagram.setup {}
134 153 -------------------------------------------------------------------------------

neovim/puk.plugins.nuon

Modified
311 311 "474ec5d0f220158afa83aaefab32402e710d3032",
315 + image,
316 + github,
317 + 3rd/image.nvim,
318 + master,
319 + "4c51d6202628b3b51e368152c053c3fb5c5f76f2",
320 + null
321 + ],
323 + diagram,
324 + github,
325 + 3rd/diagram.nvim,
326 + master,
327 + "84fe677aa940605ef248f36c0ea23561690c95eb",
328 + null

neovim/skeleton/lua/plugin.lua

Deleted
deleted file mode 100644
1 -return function()
2 - return [[
3 -local puk = require 'std.puk'
5 -puk.defer'{{ NAME }}'(function({{ NAME }})
6 - {{ CURSOR }}
7 -end)
8 -]]
9 -end