aboutsummaryrefslogtreecommitdiffstats
path: root/lua/plugins/code-annotation.lua
blob: eae61d09e85ce527bbde4d069e20be196a2f843e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
local neogeo_opts = {}

if not vim.g.vscode then
  neogeo_opts = {
    enabled = true,
    -- Only use luasnip as snippet engine if that is not vscode
    snippet_engine = "luasnip",
  }
end

return {
  -- JsDoc generator
  {
    "heavenshell/vim-jsdoc",
    ft = "javascript,typescript,typescriptreact,svelte",
    cmd = "JsDoc",
    keys = {
      { "<leader>jd", "<cmd>JsDoc<cr>", desc = "JsDoc" },
    },
    -- make sure that you will have lehre install locally on plugin folder, refer https://github.com/heavenshell/vim-jsdoc#manual-installation
    build = "make install",
  },
  {
    -- A better annotation generator. Supports multiple languages and annotation conventions.
    -- <C-n> to jump to next annotation, <C-p> to jump to previous annotation
    "danymat/neogen",
    vscode = true,
    dependencies = "nvim-treesitter/nvim-treesitter",
    opts = neogeo_opts,
    cmd = "Neogen",
    keys = {
      { "<leader>ci", "<cmd>Neogen<cr>", desc = "Neogen - Annotation generator" },
    },
  },
}