X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/9ae0a56deb3f1b4bc9682e07caf07fdee48b7f17..11256ca20fc0f6d3ce39d4ff81cb46eaf6e97efe:/nvim/lua/plugins/coding.lua diff --git a/nvim/lua/plugins/coding.lua b/nvim/lua/plugins/coding.lua index 4fe8c08..3f9a85a 100644 --- a/nvim/lua/plugins/coding.lua +++ b/nvim/lua/plugins/coding.lua @@ -1,22 +1,22 @@ ---@type LazySpec return { -- snippets - { - "L3MON4D3/LuaSnip", - -- disable luasnip bindings for and + { "l3mon4d3/luasnip", + build = "make install_jsregexp", -- optional dependencies = { - { - "honza/vim-snippets", - config = function() - require("luasnip.loaders.from_snipmate").lazy_load() - require("luasnip.loaders.from_lua").load({ paths = vim.fn.stdpath("config") .. "/lua/snippets" }) - end, - }, + { "honza/vim-snippets", }, }, + config = function() + local snippets = vim.fn.stdpath("config").."/snippets" + require("luasnip.loaders.from_snipmate").load({ paths = { snippets }}) + require("luasnip.loaders.from_lua").load({ paths = { snippets }}) + end, keys = function() return {} end, opts = { + history = true, + delete_check_events = "TextChanged", store_selection_keys = "", }, }, @@ -146,15 +146,34 @@ return { end, }, { "numToStr/Comment.nvim", + dependencies = { + { "JoosepAlviste/nvim-ts-context-commentstring", -- nested language commenting (f.ex markdown code blocks) + opts = { enable_autocmd = false, }, + } + }, + opts = function(_, opts) + local tscci = require('ts_context_commentstring.integrations.comment_nvim') + vim.tbl_deep_extend('force', opts, { + toggler = { + line = "gcc", + block = "gbb", + }, + mappings = { + basic = true, + extra = true, + }, + pre_hook = tscci.create_pre_hook() + }) + return opts + end, + }, + { "danymat/neogen", -- Generate annotations like doxygen + cmd = "Neogen", + keys = { + { "cn", function() require("neogen").generate() end, desc = "Generate Annotations (Neogen)", }, + }, opts = { - toggler = { - line = "gcc", - block = "gbb", - }, - mappings = { - basic = true, - extra = true, - }, + snippet_engine = "luasnip", }, }, { "folke/lazydev.nvim",