-- https://valentjn.github.io/ltex/settings.html

local ft = {
  "c",
  "clojure",
  "coffeescript",
  "cpp",
  "csharp",
  "dart",
  "elixir",
  "elm",
  "erlang",
  "fortran-modern",
  "fsharp",
  "gitcommit",
  "go",
  "groovy",
  "haskell",
  "html",
  "java",
  "javascript",
  "julia",
  "kotlin",
  "lisp",
  "lua",
  "markdown",
  "matlab",
  "org",
  "pandoc",
  "perl",
  "perl6",
  "php",
  "plaintex",
  "puppet",
  "python",
  "r",
  "ruby",
  "rust",
  "rust",
  "scala",
  "shellscript",
  "sql",
  "swift",
  "tex",
  "text",
  "toml",
  "typescript",
  "typescript",
  "typescriptreact",
  "vb",
  "verilog",
  "yaml",
}

return {
  filetypes = ft,
  settings = {
    ltex = {
      -- It's for checks comments in different languages
      -- https://github.com/valentjn/ltex-ls/blob/develop/src/main/kotlin/org/bsplines/ltexls/parsing/program/ProgramCommentRegexs.kt
      enabled = ft,
      checkFrequency = "save",
      language = "en-US",
      diagnosticSeverity = "information",
      setenceCacheSize = 5000,
      additionalRules = {
        enablePickyRules = true,
      },
    },
  },
}
