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

aspell, used to work but not now? #3546

Open
JackDinn opened this issue Nov 22, 2024 · 2 comments
Open

aspell, used to work but not now? #3546

JackDinn opened this issue Nov 22, 2024 · 2 comments

Comments

@JackDinn
Copy link

❱micro --version
Version: 2.0.15-dev
Commit hash: 04c5770
Compiled on August 28, 2024
⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼ /home/greg ⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼
❱micro -plugin list
The following plugins are currently installed:
initlua (0.0.0-unknown)
aspell (1.3.0)
autoclose (1.0.0)
comment (1.0.0)
diff (1.0.0)
ftoptions (1.0.0)
linter (1.0.0)
literate (1.0.0)
status (1.0.0)
⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼ /home/greg ⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼
❱uname -r
6.10.13-3-MANJARO

I used to use spellchecking with micro, i keep a quick note as i always forget how to set it up.
This was my note.

##############  MY ADDED SHORCUTS  #######################

.config/micro/bindings.json
{
    "Alt-/": "lua:comment.comment",
    "CtrlUnderscore": "lua:comment.comment",
    "Alt-l": "lua:initlua.toggleAspell",
    "Tab": "Autocomplete|lua:aspell.acceptsug|IndentSelection|InsertTab"
    "AltA": "lua:aspell.addpersonal"
}

##############  ASpell  #######################

you'll have to use a lua script to achieve this. In ~/.config/micro/init.lua, you can make a function:

function toggleAspell(bp)
    bp.Buf:SetOptionNative("aspell.check", not bp.Buf.Settings["aspell.check"])
end

and then in ~/.config/micro/bindings.json, (if it not already) you can bind the function above:

{
    "Alt-l": "lua:initlua.toggleAspell"
}


Personal Dictionary list ~/.aspell.en.pws

Alt+Shift+A = Add word to personal dictionary.

However, although this used to work, pressing Alt-l does not do anything now?

@JoeKar
Copy link
Collaborator

JoeKar commented Nov 23, 2024

I currently wonder why you need a extra lua script, since you could use lua:aspell.togglecheck directly or can't you?

@JackDinn
Copy link
Author

JackDinn commented Nov 23, 2024

I cant, it shows an error
micro -debug

use Ctrl+e to try: lua:aspell.togglecheck

Unknown command lua:aspell.togglecheck

❱cat log.txt
2024/11/23 17:27:22 Micro started

EDIT:
I don't know, I definitely have Lua installed. I have removed and reinstalled micro but it just wont do anything with lua

lua:print("Hello, World!")

outputs
Unknown command lua:print("Hello, World!")

❱yay -Qi lua
Name            : lua
Version         : 5.4.7-1
Description     : Powerful lightweight programming language designed for extending applications
Architecture    : x86_64
URL             : https://www.lua.org/
Licenses        : MIT
Groups          : None
Provides        : None
Depends On      : readline
Optional Deps   : None
Required By     : gpick  nmap  vlc  wireplumber
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 1517.38 KiB
Packager        : Anatol Pomozov <anatolik@archlinux.org>
Build Date      : Tue 25 Jun 2024 18:41:52 BST
Install Date    : Tue 16 Jul 2024 08:59:27 BST
Install Reason  : Installed as a dependency for another package
Install Script  : No
Validated By    : Signature

❱yay -Qi micro
Name            : micro
Version         : 2.0.14-1
Description     : Modern and intuitive terminal-based text editor
Architecture    : x86_64
URL             : https://micro-editor.github.io/
Licenses        : MIT
Groups          : None
Provides        : None
Depends On      : None
Optional Deps   : wl-clipboard: for copying/pasting text using Wayland
                  xclip: for copying/pasting text using X [installed]
Required By     : micro-manjaro
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 12.19 MiB
Packager        : Alexander F. Rødseth <xyproto@archlinux.org>
Build Date      : Wed 28 Aug 2024 12:23:13 BST
Install Date    : Sat 23 Nov 2024 17:55:39 GMT
Install Reason  : Installed as a dependency for another package
Install Script  : No
Validated By    : Signature


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