-
-
Notifications
You must be signed in to change notification settings - Fork 250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(haskell): make haskell-tools respect the options
table
#571
fix(haskell): make haskell-tools respect the options
table
#571
Conversation
Review ChecklistDoes this PR follow the [Contribution Guidelines](development guidelines)? Following is a partial checklist: Proper conventional commit scoping:
|
- Since version 2.1.0, haskell-tools.nvim calls this automatically if both `nvim-dap` and `haskell-debug-adapter` are installed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small minor change, but seems alright.
Note: This does add a weird level of abstraction that isn't accounted for in the haskell-tools
documentation which could be something that will confuse users, but I'll leave that decision up to the community since core AstroNvim doesn't maintain these packages. As an alternative, with the original approach the user can use the config
function to modify the default vim.g.haskell_tools
variable.
Co-authored-by: Micah Halter <[email protected]>
Co-authored-by: Micah Halter <[email protected]>
That's a good point...
I'm not really familiar with lazy.nvim. Wouldn't it be possible for users to override the |
@mrcjkb Yes they can, but it it will override the original |
opts
table
Oh, I see. That does seem a bit unergonomic... |
Maybe what we should do @mrcjkb is just keep it how it was with the |
Although... If I understand correctly, this means that they would also have to remember to call |
{
"mrcjkb/haskell-tools.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
{ "nvim-telescope/telescope.nvim", optional = true },
{ "mfussenegger/nvim-dap", optional = true },
},
version = "^2",
init = function()
astronvim.lsp.skip_setup = utils.list_insert_unique(astronvim.lsp.skip_setup, "hls")
vim.g.haskell_tools = vim.tbl_deep_extend("keep", vim.g.haskell_tools or {}, {
hls = {
on_attach = function(client, bufnr, _) require("astronvim.utils.lsp").on_attach(client, bufnr) end,
},
})
end,
-- load the plugin when opening one of the following file types
ft = { "haskell", "lhaskell", "cabal", "cabalproject" },
}, This is probably a good spec to use. It doesn't enable the Also to answer your most recent message, yes. If the user overrides the |
You mean to set the default in Sounds fine to me. |
No @mrcjkb , I sent a config that illustrates what I said. I think configuring the options through the |
also instead of |
Lgtm. I'll update later today when I'm back home. |
opts
tableoptions
table
ok cool no worries, I can actually make the push now and get this merged in. Thanks for brainstorming through this with me! |
Thanks 🙏 |
options
tableoptions
table
📑 Description
This PR is stacked on top of #570, which should be merged first.
haskell-tools.nvim
to v2.0.0 #553 (comment), the haskell-tools plugin is not user-configurableopts
table incommunity.lua
.As mentioned in #553, I don't feel strongly about this, so please close this PR if you don't agree with this approach.