Code Monkey home page Code Monkey logo

micro-aspell-plugin's Introduction

Aspell plugin for Micro

This is a spellchecking plugin for Micro editor. For help see the help file.

micro-aspell-plugin's People

Contributors

priner avatar raphyjake avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

micro-aspell-plugin's Issues

Support for multiple simultaneous dictionaries?

This is more of a feature request than an issue, but it would be fantastic if support for multiple simultaneous dictionaries were added. I often find myself writing in more than one language in a single file, which results in lots of "misspelled" words. I know that aspell supports this through the use of the --extra-dicts option, and it would be very useful to have that implemented in this plugin. If not I'd be happy to take a look into implementing it myself, but I figured I should bring it up first. Any help would be appreciated!

This plugin does work on Windows 10

I installed MSYS2, opened MSYS2 MSYS and then:

pacman -Syu
pacman -S aspell-devel aspell6-en

Currently, aspell-devel corresponds to version 0.68, which adds support for Markdown.

In Windows I added C:\msys64\usr\bin to the user %PATH% and wrote a launcher script for micro:

@ echo off
set MICRO_TRUECOLOR=1
set LANG=en_US.UTF-8
micro.exe %1

Setting the %LANG% environment variable is crucial for the correct functioning of aspell. It took me hours to learn this.

It is also important that C:\msys64\usr\bin is searched before any other location where sh.exe is available. E.g. the GitBash installation directory. sh is the program executed by micro to launch external commands.

Thank you so much for writing this plugin!

Unable to find matching version

Why do I get this error when I ask plugins to update?

╰─➤  micro -plugin list
The following plugins are currently installed:
aspell (1.1.0)
filemanager (3.5.0)
fzf (1.1.0)
joinLines (1.1.6)
manipulator (1.4.0)
status (1.0.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)

╰─➤  micro -plugin update
Checking for plugin updates
unable to find a matching version for "aspell"

Plugin fails to start often

Hi Priner,

this is something that happens quite often, the plugin doesn't start properly most of the time. I need to open each file 2 or 3 time in order to notice underlined words.

This happens on Debian 11 (and testing) as well as on FreeBSD 11 with Micro 2.0.8 and with the 2.0.9 binary (Debian).

Thanks,

Cicorione

jarring text movement with live spell checking

micro-misspell-plugin spell-checks on save, and I can now see why. As I type using micro-aspell-plugin, my sentence gets shifted two characters to the right as >> is prefixed to indicate a misspelled (really incomplete) word and then two characters to the left as it removes ">>" once if I finish typing the word. Once I start typing the next word, the same thing happens. This is very jarring.

aspell

You could similarly spell check on save only, reserve the two left most columns for >>, or simply rely upon the underlining alone.

[HELP] Adding new words

Hi Priner,

thank you very much for this plugin is really useful.

I love using micro for writing my blog however I am not a coder and I couldn't figuring out what this means:

lua:aspell.addpersonal

Could you help me with a real example as you did to explain other features of your plugin?

Thanks in advance and sorry for dumb question!

Cicorione

toggling

Would you accept a PR that adds a function to toggle the spellchecking?

Pro: having it on all the times is annoying, I don't know how anyone can cope with aspell underlining everything when you write code

Contra: It's a hack, a real solution would be to add a command to micro that toggles buffer settings (however in this case, the spellchecker needs to re-run, so the real solution would need onBufferModified() too)

This is what I have in my local fork currently:

function togglecheck(bp, args)
	local buf = bp.Buf
	if buf.Settings["aspell.check"] == "on" then
		buf.Settings["aspell.check"] = "off"
	else
		buf.Settings["aspell.check"] = "on"
	end
	spellcheck(buf)
end

add *.txt and *.text to auto

The docs say "only XML, C++, C, HTML, Perl TeX and Markdown." I've manually included text files, but I think it should be in auto as well.

Ability to disable/enable spellchek with a command

Is there a way I can disable/enable spellcheck of an already opened file?

I can run setlocal aspell.check on/off but that seems to behave rather odd - it only starts happening when I change the buffer.

I guess adding a custom command that does the above + calls spellcheck(bp.Buf) might work. I can try submitting a PR if this would be acceptable.

Multiple languages

Hi there,

is it possible using multiple languages and dictionaries at the same time?

Thanks!

C.

accept a suggestion?

This is fantastic, thank you!

Will it be possible to support replacing a mispelled word with a suggested one?

Suggestions only given for first word in line

If I have two words underlined as mispelled and want to leave the first as is (without adding to the dictionary) the suggestions remain for the even if the cursor is in the second.
Screen Shot 2020-07-30 at 10 09 50 AM

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.