Author Topic: Spellchecker, SFML and linux  (Read 718 times)

Offline Gryf

  • Multiple posting newcomer
  • *
  • Posts: 12
Spellchecker, SFML and linux
« on: June 26, 2018, 06:51:35 am »
Hello,
I'have a problem with the spellchecker of codeblocks he had not the dictionnary (.dic and .aff) into his files, I had to download these files and copy them into the spellchecker folder.
But when I configured my project for use SFML I realized that the spellchecker don't work for the SFML.
I'm using archlinux, I think there is a rapport but I preferred post my message on this forum
Please I need help, it's very awkward to program without spellchecker.

PS : Excuse me for the mistakes in my text, I don't speak english very well

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10904
    • Travis build status
Re: Spellchecker, SFML and linux
« Reply #1 on: June 26, 2018, 08:48:37 am »
I hope, you know that the spell checker works only in comments and string literals.
Generally you don't have to copy files, just install the myspell packages with pacman and then point the spell checker to the correct folder.
On my machine it is /usr/share/myspell.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline BlueHazzard

  • Lives here!
  • ****
  • Posts: 1883
Re: Spellchecker, SFML and linux
« Reply #2 on: June 26, 2018, 03:40:47 pm »
Does it work on other porjects? Did it ever worked? Only for this project? What language?

Offline Gryf

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Spellchecker, SFML and linux
« Reply #3 on: June 26, 2018, 03:46:42 pm »
Sorry but what it the myspell package (disctionnary, thesaurus or both) ?
If it's the dictionnary I didn't found package in pacman, I musted download it.

I did not test on other projects but on windows that work. I use C++ for my project

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10904
    • Travis build status
Re: Spellchecker, SFML and linux
« Reply #4 on: June 26, 2018, 04:37:00 pm »
I guess aspell could work, too.
On my gentoo I use myspell and on centos 6 I use aspell.

On both the paths are set to /usr/share/myspell. I have all paths set to point to myspell.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Gryf

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Spellchecker, SFML and linux
« Reply #5 on: June 26, 2018, 04:47:44 pm »
That's the problem, I don't have any folder here, I have all my paths set to point to /usr/share/codeblocks/SpellChecker
How can I use aspell in codeblocks ?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10904
    • Travis build status
Re: Spellchecker, SFML and linux
« Reply #6 on: June 26, 2018, 07:50:25 pm »
Do you have it installed? Do you have any dictionaries installed?
Use pacman to find where are the dictionaries the use the correct paths.
I don't have arch to check where is everything placed.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Gryf

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Spellchecker, SFML and linux
« Reply #7 on: June 26, 2018, 10:22:18 pm »
yes I have aspell installed and I already have install a dictionnary but codeblocks don't use it for SFML :(

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10904
    • Travis build status
Re: Spellchecker, SFML and linux
« Reply #8 on: June 26, 2018, 10:42:42 pm »
What is the path where the dictionary is located?
What path have you entered in settings?
Do you see a flag in the status bar with your language?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Gryf

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Spellchecker, SFML and linux
« Reply #9 on: June 26, 2018, 11:19:27 pm »
the dictionanry is located here :/usr/share/codeblocks/SpellChecker and that's the folder that I entered in setting
Yes I see an american flag in the status bar

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10904
    • Travis build status
Re: Spellchecker, SFML and linux
« Reply #10 on: June 27, 2018, 01:19:25 am »
Screenshot?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6253
    • My Best Post
Re: Spellchecker, SFML and linux
« Reply #11 on: June 27, 2018, 04:18:19 am »
Did you install "hunspell" or another spell check library on Linux? If yes, which one did you install?
https://www.archlinux.org/packages/extra/x86_64/hunspell/

Edit https://www.archlinux.org/packages/extra/any/hunspell-en/

Tim S.
« Last Edit: June 27, 2018, 04:20:02 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Testing, compiling CB Trunk against wxWidgets 3.0.2.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Gryf

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Spellchecker, SFML and linux
« Reply #12 on: June 27, 2018, 06:45:56 pm »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10904
    • Travis build status
Re: Spellchecker, SFML and linux
« Reply #13 on: June 27, 2018, 07:19:23 pm »
Can I see a screenshot of the editor you expect to be spell checked?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Gryf

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Spellchecker, SFML and linux
« Reply #14 on: June 27, 2018, 08:13:34 pm »
Sorry but I don't understand what screenshot I need to send.
There is no correction for all I write wich use SFML
« Last Edit: June 27, 2018, 08:15:34 pm by Gryf »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10904
    • Travis build status
Re: Spellchecker, SFML and linux
« Reply #15 on: June 27, 2018, 09:16:30 pm »
Ok, so you've missed my comment about when spell checker works, haven't you?
Type something like:
Code: [Select]
// blabla test alabsdfa
callfunc("blabla this will be spell check, but the code won't");
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Gryf

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Spellchecker, SFML and linux
« Reply #16 on: June 27, 2018, 11:36:19 pm »
Update:

I'm so sorry but I didn't realize that the spellchecker doesn't work for all in C++;
I can use it for autocomplete name of variables but he don't correct me when I write a function name with a mistake

In a code like that :
Code: [Select]
std::string variableName = "abcdtestghikj";
variableName.find("test");
It will propose me the variableName at line 2 but don't tell me anything for the contains function or for the "string" at line 1
« Last Edit: June 27, 2018, 11:41:25 pm by Gryf »

Offline sodev

  • Almost regular
  • **
  • Posts: 157
Re: Spellchecker, SFML and linux
« Reply #17 on: June 28, 2018, 12:24:42 am »
Uhm, this is not spellchecking, this is code completion you are talking about.

Spellchecking checks the spelling of "natural" language and not a programming language, it especially skips every C++ "grammar".

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10904
    • Travis build status
Re: Spellchecker, SFML and linux
« Reply #18 on: June 28, 2018, 12:34:08 am »
Also C::B at this moment doesn't have inline error messages.
So if you want to see if your code is correct you'll have to compile it.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Gryf

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Spellchecker, SFML and linux
« Reply #19 on: June 28, 2018, 04:15:29 am »
Ok I see. sorry for the confusion

but oBFusCATed if I do that I lost the adventage of using C::B, I can also use vim
« Last Edit: June 28, 2018, 05:15:20 am by Gryf »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10904
    • Travis build status
Re: Spellchecker, SFML and linux
« Reply #20 on: June 28, 2018, 09:32:52 am »
Patches welcome.
The advantage of C::B over vim is alt-g.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Gryf

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Spellchecker, SFML and linux
« Reply #21 on: June 28, 2018, 04:04:04 pm »
I want to patch it but that I ask how can I do it ?
« Last Edit: June 28, 2018, 04:22:43 pm by Gryf »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6253
    • My Best Post
Re: Spellchecker, SFML and linux
« Reply #22 on: June 28, 2018, 05:05:46 pm »
I want to patch it but that I ask how can I do it ?

Step 1: Be able to build Code::Blocks core from Source http://wiki.codeblocks.org/index.php/Developer_documentation
Edit: http://wiki.codeblocks.org/index.php/Installing_Code::Blocks
Step 2: If needed be able to build an [contrib] C::B Plugin (if you need to edit an contrib Plugin)
Step 3: Do the code changes to fix or add feature
Step 4: Submit an Subversion(SVN) patch file to sourceforge.net (sf.net) http://wiki.codeblocks.org/index.php/Creating_a_patch_to_submit_(Patch_Tracker)

Edit2: I am guessing you would need to edit the Code Completion (CC) Plugin; but, this is a big guess on my part.
Edit3: You might want to look at the Clang CC Plugin that another person is working on and see if it works for you.
http://forums.codeblocks.org/index.php?topic=20623.225

Tim S.
« Last Edit: June 28, 2018, 05:19:23 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Testing, compiling CB Trunk against wxWidgets 3.0.2.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Gryf

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Spellchecker, SFML and linux
« Reply #23 on: June 28, 2018, 05:30:08 pm »
That's not what I meant. I want to fix it but I don't want to edit any plugin. I just ask you which package exactly I need to install or what I need to change in the settings.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10904
    • Travis build status
Re: Spellchecker, SFML and linux
« Reply #24 on: June 28, 2018, 05:33:24 pm »
The only plugin which has this feature at the moment is https://github.com/yvesdm3000/ClangLib I think, but I have not tried it.
Hopefully in the not so distant future we would have a language server plugin, which will also support this.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Gryf

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Spellchecker, SFML and linux
« Reply #25 on: June 28, 2018, 07:46:12 pm »
I did not found a compilable version or a version for archlinux.
I will search plugin for the autocompletion.
Thank's very much for your help ;D

Offline BlueHazzard

  • Lives here!
  • ****
  • Posts: 1883
Re: Spellchecker, SFML and linux
« Reply #26 on: June 29, 2018, 12:09:14 am »
Yes the clang plugin has jit error detection and a lot other things. On unix it should be easy to compile....

Offline BlueHazzard

  • Lives here!
  • ****
  • Posts: 1883
Re: Spellchecker, SFML and linux
« Reply #27 on: June 29, 2018, 12:11:26 am »
Hopefully in the not so distant future we would have a language server plugin, which will also support this.
Are you working on it? Do you have some code to show?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10904
    • Travis build status
Re: Spellchecker, SFML and linux
« Reply #28 on: June 29, 2018, 08:10:14 am »
Yes, I'm (paused now, but I'll get back to it at some moment this year).
It is too crude and useless at the moment. And doesn't do diagnostics. Also clangd is too early in its development.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]