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

Spin out the agda-input part into it's own plugin? #142

Open
silky opened this issue Feb 22, 2024 · 5 comments
Open

Spin out the agda-input part into it's own plugin? #142

silky opened this issue Feb 22, 2024 · 5 comments

Comments

@silky
Copy link
Contributor

silky commented Feb 22, 2024

Personally, I think it might be useful to have the agda-input.vim functionality as it's own plugin, so it can be enabled in other settings, not necessarily agda.

For example, I may want to:

  • Just have fun typing unicode symbols with ease in various documents,
  • Annoy my collaborators by using unicode Haskell syntax,
  • ???

In any case, I think I'd use it.

If there's interest, I'd be happy to try and lift it out myself, but I can't promise any particular deadline :)

@isovector
Copy link
Owner

I'm open to this! I often setf agda just to bring those bindings into scope :) I likely won't do any work here, but I'd be happy for a PR.

@googleson78
Copy link
Contributor

https://github.com/chrisbra/unicode.vim might also just have/be a superset of this functionality, but I haven't tried it personally

@silky
Copy link
Contributor Author

silky commented Feb 22, 2024

https://github.com/chrisbra/unicode.vim might also just have/be a superset of this functionality, but I haven't tried it personally

It's not quite, because for example with the present setup here you can define multi-character replacements; for example I made one like so:

call cornelis#bind_input("st", "≡⟨⟩")

I suppose another difference is that here there are many ways of typing the same character, which is kind of handy.

@crumbtoo
Copy link

crumbtoo commented Apr 7, 2024

I'm quite interested! I was going to hack something together using unicodeit, but I would much prefer this :3

@phijor
Copy link
Contributor

phijor commented Apr 15, 2024

I suppose another difference is that here there are many ways of typing the same character, which is kind of handy.

👍 from me!

Some other advantages I see:

  1. We could have a machine-readable source of truth for all substitutions, i.e. generate agda-input.vim from some other file, say a JSON file. This could allow other tools to use the same mappings. Currently, every Agda integration invents its own input mappings.(And I recently found myself in a situation where I really needed agda-input in a web project)
  2. We could split substitutions by category, and let the user decide which subset to use. I tend to mistype some abbreviations, and end up with unwanted substitutions. I'd like to disable some of the presets that I know I won't use.

If 1. sounds useful, one could perhaps ask upstream if they are interested in keeping the emacs input in sync from a shared source.

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

5 participants