-
-
Notifications
You must be signed in to change notification settings - Fork 240
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(nix): Fix wrong lsp in nix pack. #882
Conversation
Review ChecklistDoes this PR follow the [Contribution Guidelines](development guidelines)? Following is a partial checklist: Proper conventional commit scoping:
|
R? @AstroNvim/astrocommunity-maintainers |
i changed it locally to https://github.com/nix-community/nixd (via https://github.com/nix-community/nixd/blob/main/nixd/docs/editor-setup.md) return {
{
"nvim-treesitter/nvim-treesitter",
optional = true,
opts = function(_, opts)
if opts.ensure_installed ~= "all" then
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, { "nix" })
end
end,
},
{
"AstroNvim/astrolsp",
-- we must use the function override because table merging
-- does not play nicely with list-like tables
---@param opts AstroLSPOpts
opts = function(plugin, opts)
-- safely extend the servers list
opts.servers = opts.servers or {}
vim.list_extend(opts.servers, {
"nixd",
-- add more servers as needed...
})
end,
},
{
"nvimtools/none-ls.nvim",
optional = true,
opts = function(_, opts)
local nls = require "null-ls"
if type(opts.sources) == "table" then
vim.list_extend(opts.sources, {
nls.builtins.code_actions.statix,
nls.builtins.formatting.alejandra,
nls.builtins.diagnostics.deadnix,
})
end
end,
},
{
"stevearc/conform.nvim",
optional = true,
opts = {
formatters_by_ft = {
nix = { "nixfmt" },
},
},
},
-- {
-- "mfussenegger/nvim-lint",
-- optional = true,
-- opts = {
-- linters_by_ft = {
-- nix = { "statix", "nix" },
-- },
-- },
-- },
} and i guess it makes sense to add deadnix |
That’s outside of the scope of this PR. |
still not sure if it makes sense to merge this and then switch to the official lsp when it is in stable next month |
It’s still a month away. |
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.
lgtm
No description provided.