Skip to content

Cannot change style of annotation in LazyVim #215

Open
@G00Z-G00Z

Description

@G00Z-G00Z

I'm trying to change the documentation style in lazy vim using their LazyVim.extras using their documentation. However It does not seem to be working. I do not know if its a problem with LazyVim itself. Here is the snippet that does not work:

return {
  "danymat/neogen",
  dependencies = LazyVim.has("mini.snippets") and { "mini.snippets" } or {},
  cmd = "Neogen",
  keys = {
    {
      "<leader>cn",
      function()
        require("neogen").generate()
      end,
      desc = "Generate Annotations (Neogen)",
    },
  },
  opts = function(_, opts)
    if opts.snippet_engine ~= nil then
      return
    end

    local map = {
      ["LuaSnip"] = "luasnip",
      ["mini.snippets"] = "mini",
      ["nvim-snippy"] = "snippy",
      ["vim-vsnip"] = "vsnip",
    }

    for plugin, engine in pairs(map) do
      if LazyVim.has(plugin) then
        opts.snippet_engine = engine
        return
      end
    end

    if vim.snippet then
      opts.snippet_engine = "nvim"
    end

    -- Does not seem to work
    opts.languages = {
      python = {
        template = {
          annotation_convention = "google", -- for a full list of annotation_conventions, see supported-languages below,
        },
      },
    }
  end,
}

I tried putting the configuration in the table, but it does not seem to work

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @G00Z-G00Z

        Issue actions

          Cannot change style of annotation in LazyVim · Issue #215 · danymat/neogen