icewind / ltex-client.nvim

Adds code action handlers for ltex-ls like: addToDictionary, disableRule, hideFalsePositive
MIT License
8 stars 0 forks source link

Works but maybe you could enhance README file #3

Closed metal3d closed 3 weeks ago

metal3d commented 4 weeks ago

Hello and, at first, thanks for this nice plugin.

I spent a few time to understand why the plugin didn't work (no command and add to dictionary failed).

I agree that you mentioned to call the setup() function, but it's a bit confused with LazyVim.

Actually, to ensure that LazyVim calls the setup function, you need to pass the opts as non-null content (it could be empty).

So, on my side:

return {
  {
    "icewind/ltex-client.nvim",
    opts = {},
  },
}

To ensure that Mason includes ltex-ls it's also possible to give:

return {
  -- ensure mason istalls ltex-ls
  {
    "williamboman/mason.nvim",
    opts = function(_, opts)
      vim.list_extend(opts.ensure_installed, { "ltex-ls" })
    end,
  },
  {
    "icewind/ltex-client.nvim",
    opts = {},
  },
}

It works

icewind commented 3 weeks ago

Hello, thank you for your feedback. To my understanding, we can use config = true to make lazy.nvim automatically call setup function. At least it works in my setup that way. I've updated the README, please feel free to comment if there is something I can add to make it more helpful.

metal3d commented 3 weeks ago

Ha maybe I missed the "config" attribute. Right.

I will take a look. Thanks a lot, because having the "add to dictionary" is a must have, and I didn't had the time to implement it on my side 😁

Le lun. 28 oct. 2024, 19:55, Nikolay Osaulenko @.***> a écrit :

Hello, thank you for your feedback. To my understanding, we can use config = true to make lazy.nvim automatically call setup function. At least it works in my setup that way. I've updated the README, please feel free to comment if there is something I can add to make it more helpful.

— Reply to this email directly, view it on GitHub https://github.com/icewind/ltex-client.nvim/issues/3#issuecomment-2442380304, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAYN4BDA2JKTLNAAQNSZRTZ52CANAVCNFSM6AAAAABQXMS4PWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINBSGM4DAMZQGQ . You are receiving this because you authored the thread.Message ID: @.***>

metal3d commented 3 weeks ago

Hi, Here: https://lazy.folke.io/developers it is mentioned that we should use opts to an empty table.

icewind commented 3 weeks ago

Hello, Oh, I see. Thank you. I updated the readme.