Skip to content
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

File randomly full of unused pattern variable errors for substrings of the code #1341

Open
Mehgugs opened this issue Jan 28, 2025 · 0 comments

Comments

@Mehgugs
Copy link

Mehgugs commented Jan 28, 2025

As described in title, this happens on 2.8.0 via neovim.

Using a config recommended via slack for combatting this issue, to no avail. I additionally swapped out elm-test for elm-test-rs.

local function custom_attach(client)
  if client.config.flags then
    client.config.flags.allow_incremental_sync = true
  end
end

return {
  "neovim/nvim-lspconfig",
  opts = {
    servers = {
      elmls = {
        mason = false,
        rootPatterns = { "elm.json" },
        init_options = {
          disableElmLSDiagnostics = false,
          elmReviewDiagnostics = "warning",
          elmPath = vim.fn.exepath("elm"),
          elmTestPath = vim.fn.exepath("elm-test-rs"),
          onlyUpdateDiagnosticsOnSave = true,
          rootPatterns = { "elm.json" },
          skipInstallPackageConfirmation = false,
          trace = {
            server = "messages",
          },
        },
      },
    },
    setup = {
      elmls = function(_, opts)
        local default_config = require("lspconfig.configs.elmls").default_config
        local final_config = vim.tbl_deep_extend("force", default_config, opts, { on_attach = custom_attach })

        require("lspconfig").elmls.setup(final_config)
        return true
      end,
    },
  },
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant