repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

neovim: adds plugin to convert case conventions

d19f18dc4784c91d7a49e8271bf946e25fbff975

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

unsigned

Browse filesCompare with HEAD

Changed files (7)

neovim/README.md

Modified
39 39 # todo
41 41 * navic highlights do not fit winbar
42 -* neogen does not generate JavDoc
43 -* pandoc with lua filters for diagrams for generating documents and previewing --> https://github.com/tex/vimpreviewpandoc
44 42 * command for toggling case conventions
45 43 * make highlights more visible when expanding snippets
46 -* cursor restore position on (session?) load jumps one location to somewhere after correct location
44 +* cursor restore position on (session?) load jumps one location to somewhere
45 + after correct location
47 46 * check out `vim.snippet`
48 47 * use `vim.base64` in wezterm plugin
49 -* LuaLS is getting crazy diagnosing non-stop...
50 48 * integrate language tool?
51 49 * refactor mark.lua
52 50 * adapt config to respect `vim.g.nerdfont` (std.constants?)
53 -* Do I want multiple LSPs per buffer? In case of markdown and text it seems useful, for code it seems like a headache...
51 +* Do I want multiple LSPs per buffer?
52 + In case of markdown and text it seems useful, for code it seems like a
53 + headache...
54 54 * use ltex-ls for markdown, code comments and commit messages
55 55 * setup DAP
56 56 * nvim spell for camel case words
62 62 * split parts of config into plugins
63 63 * add support for Java multi line string in autopairs
64 64 * try Termdebug with gdb
65 -* pandoc with lua filters for diagrams for generating documents and previewing
66 - --> https://github.com/tex/vimpreviewpandoc
67 - outside of vim?

neovim/lazy-lock.json

Modified
51 51 "nvim-surround": { "branch": "main", "commit": "a4e30d33add8a9743b4f518b3a788b3c8e5def71" },
52 52 "nvim-tree.lua": { "branch": "master", "commit": "ddd1d6eb21c45433bdc65cc8015f2457998f2bf2" },
53 53 "nvim-treesitter": { "branch": "master", "commit": "b350369740e885c85f0f62dd8fe645c6f887ddc6" },
54 + "nvim-treesitter-context": { "branch": "master", "commit": "c24a7a6dc5fde325af844d165323aa6f7082866e" },
54 55 "nvim-treesitter-endwise": { "branch": "master", "commit": "60e8c288e011403f248b5f6478dde12bed8a6c55" },
55 56 "nvim-treesitter-textobjects": { "branch": "master", "commit": "23b820146956b3b681c19e10d3a8bc0cbd9a1d4c" },
56 57 "nvim-ts-autotag": { "branch": "main", "commit": "531f48334c422222aebc888fd36e7d109cb354cd" },
74 75 "telescope-symbols.nvim": { "branch": "master", "commit": "a6d0127a53d39b9fc2af75bd169d288166118aec" },
75 76 "telescope-zoxide": { "branch": "main", "commit": "68966349aa1b8e9ade403e18479ecf79447389a7" },
76 77 "telescope.nvim": { "branch": "master", "commit": "6312868392331c9c0f22725041f1ec2bef57c751" },
78 + "text-case.nvim": { "branch": "main", "commit": "d62c63a4e9a996c7321885937ab89920fca2c1c8" },
77 79 "tint.nvim": { "branch": "master", "commit": "862835626941d263466754b9c8e2ce2cb004f5ac" },
78 80 "todo-comments.nvim": { "branch": "main", "commit": "a7e39ae9e74f2c8c6dc4eea6d40c3971ae84752d" },
79 81 "tree-sitter-nu": { "branch": "main", "commit": "b090676f0205f52debb93745b9ad788385583276" },

neovim/lua/bugabinga/diagnostic.lua

Modified
45 45 float = {
46 46 focusable = false,
47 47 style = 'minimal',
48 - border = vim.g.border_style,
49 48 source = 'if_many',
50 49 header = 'Diagnostic',
51 50 prefix = prefix_format,

neovim/lua/bugabinga/options/behaviour.lua

Modified
14 14 vim.opt.whichwrap:append 'h'
15 15 vim.opt.whichwrap:append 'l'
17 +-- treat words separated by a dash as one word. used in snail-case-convention
18 +vim.opt.iskeyword:append '-'
17 20 -- Tabs and Spaces, i like 'em 2 spaces wide
18 21 -- only insert spaces for tabs if language configuration explicitly declares so
19 22 vim.opt.expandtab = false

neovim/lua/bugabinga/plugins/neogen.lua

Modified
3 3 local map = require 'std.map'
5 5 map.normal {
6 6 description = 'Generate doc comment for outer element',
7 7 category = 'editing',
8 - keys = '<leader>gd',
8 + keys = '<leader>gdd',
9 9 command = function () require 'neogen'.generate() end,
12 12 map.normal {
13 13 name = 'Generate Doc Comment for Function',
14 14 category = 'editing',
15 - keys = '<leader>gdf',
15 + keys = '<leader>gdm',
16 16 command = function () require 'neogen'.generate { type = 'func', } end,
19 19 map.normal {
20 20 description = 'Generate Doc Comment for File',
21 21 category = 'editing',
22 - keys = '<leader>gdF',
22 + keys = '<leader>gdf',
23 23 command = function () require 'neogen'.generate { type = 'file', } end,
28 28 command = function () require 'neogen'.generate { type = 'class', } end,
31 +map.normal {
32 + description = 'Generate Doc Comment for Type',
33 + category = 'editing',
34 + keys = '<leader>gdt',
35 + command = function () require 'neogen'.generate { type = 'type', } end,
31 38 return {
32 39 'danymat/neogen',
33 40 dependencies = { 'nvim-treesitter/nvim-treesitter', },
34 - opts = {},
41 + opts = {
42 + snippet_engine = 'luasnip',
43 + },

neovim/lua/bugabinga/plugins/text-case.lua

Added
new file mode 100644
1 +return {
2 + 'johmsalas/text-case.nvim',
3 + dependencies = { 'nvim-telescope/telescope.nvim', },
4 + config = function ()
5 + require 'textcase'.setup {}
6 + require 'telescope'.load_extension 'textcase'
7 + end,
8 + keys = {
9 + 'ga', -- Default invocation prefix
10 + { 'gA', '<cmd>TextCaseOpenTelescope<CR>', mode = { 'n', 'x', }, desc = 'Telescope', },
11 + },
12 + cmd = {
13 + 'TextCaseOpenTelescope',
14 + 'TextCaseOpenTelescopeQuickChange',
15 + 'TextCaseOpenTelescopeLSPChange',
16 + 'TextCaseStartReplacingCommand',
17 + },
18 + -- If you want to use the interactive feature of the `Subs` command right away, text-case.nvim
19 + -- has to be loaded on startup. Otherwise, the interactive feature of the `Subs` will only be
20 + -- available after the first executing of it or after a keymap of text-case.nvim has been used.
21 + lazy = false,

neovim/lua/bugabinga/plugins/treesitter.lua

Modified
19 19 'nvim-treesitter/nvim-treesitter-textobjects',
20 20 'windwp/nvim-ts-autotag',
21 21 'RRethy/nvim-treesitter-endwise',
22 + 'nvim-treesitter/nvim-treesitter-context',
22 23 'nushell/tree-sitter-nu',
24 25 config = function ()
209 + require 'treesitter-context'.setup {
210 + enable = true, -- Enable this plugin (Can be enabled/disabled later via commands)
211 + max_lines = 0, -- How many lines the window should span. Values <= 0 mean no limit.
212 + min_window_height = 0, -- Minimum editor window height to enable context. Values <= 0 mean no limit.
213 + line_numbers = true,
214 + multiline_threshold = 20, -- Maximum number of lines to show for a single context
215 + trim_scope = 'outer', -- Which context lines to discard if `max_lines` is exceeded. Choices: 'inner', 'outer'
216 + mode = 'cursor', -- Line used to calculate context. Choices: 'cursor', 'topline'
217 + -- Separator between context and content. Should be a single character string, like '-'.
218 + -- When separator is set, the context will only show up when there are at least 2 lines above cursorline.
219 + separator = nil,
220 + zindex = 20, -- The Z-index of the context window
221 + on_attach = nil, -- (fun(buf: integer): boolean) return false to disable attaching