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

Spellcheck plugin cant find words path #40

Closed
mundusnine opened this issue May 22, 2020 · 7 comments
Closed

Spellcheck plugin cant find words path #40

mundusnine opened this issue May 22, 2020 · 7 comments

Comments

@mundusnine
Copy link
Contributor

image

I am opening the lite editor normally and it says that(i.e. normally == at the root path of the exe)

@rxi
Copy link
Owner

rxi commented May 22, 2020

As far as I know windows doesn't provide a dictionary file similar to linux, you'll have to download the dictionary file you want to use. You can then place it next to lite.exe and set the relevant config field inside your user module:

config.dictionary_file = EXEDIR .. "/dictionary_filename"

@mundusnine
Copy link
Contributor Author

Noted; Looking into available dictionary files that we could use to propose to windows users. Maybe putting a note in the readme recognizing this issue on windows would be valuable to avoid people like me to report the issue ;)

@mundusnine
Copy link
Contributor Author

My guess is we could use this: words.txt file ? I looked around the interwebs and the words file on linux just seems to be a newline-delimited list of dictionary words.

@rxi
Copy link
Owner

rxi commented May 22, 2020

Yep, any white-space-separated list of words will work

@mundusnine
Copy link
Contributor Author

Would you find it adequate to change:
config.dictionary_file = "/usr/share/dict/words"
to

if package.config:sub(1,1) == '/' then
  config.dictionary_file = "/usr/share/dict/words"
else
  config.dictionary_file = EXEDIR .. "/words.txt"
end

As this would enable windows users to just include a words.txt file and spellchecking would work ?

Btw I intend on doing a PR to change the readme to note what I said before(i.e. on windows we need to supply a words.txt) and I would add the change I just talked about if you approve.

@rxi
Copy link
Owner

rxi commented May 22, 2020

I'd be happy to merge the change with one minor modifcation: lite provides a PLATFORM global for these situations; the package.config check can be replaced with the following:

if PLATFORM == "Windows" then

@mundusnine
Copy link
Contributor Author

Will be closed by this: #42

Jipok pushed a commit to Jipok/lite-plugins that referenced this issue Dec 4, 2021
remove nagbar because it is integrated in lite-xl
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

2 participants