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

Support extra user dictionaries #319

Open
legeana opened this issue Dec 19, 2024 · 0 comments
Open

Support extra user dictionaries #319

legeana opened this issue Dec 19, 2024 · 0 comments

Comments

@legeana
Copy link

legeana commented Dec 19, 2024

Hi,
Would the project be open to supporting additional user dictionaries?

Instead of

lspconfig.harper_ls.setup {
  settings = {
    ["harper-ls"] = {
      userDictPath = "~/dict.txt",
      fileDictPath = "~/.harper/",
    }
  },
}

I would like to be able to do this:

lspconfig.harper_ls.setup {
  settings = {
    ["harper-ls"] = {
      userDictPath = "~/dict.txt",
      extraUserDictPaths = { "~/extra-dict-1.txt", "~/extra-dict-2.txt" },
      fileDictPath = "~/.harper/",
    }
  },
}

This would load extra words into the global dictionary on startup and still allow the user to update their primary userDictPath with code actions as before. There will be no editing support for extraUserDictPaths within harper.

The reason I would like to have this is to allow

  • Autogenerated dictionaries such as lists of usernames automatically added to a dictionary via cron. I would prefer to avoid adding them manually into my user dictionary to avoid unnecessary bloating, but having them in the global dictionary prevents false positives.
  • Having a separate primary user dictionary for work while still loading my personal dictionary for spellcheck. This would prevent me from accidentally adding work-related words to my personal dictionary.

I will be happy to work on implementing this, please let me know if you are open to accepting this contribution.

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