ashinkarov / nvim-agda Goto Github PK
View Code? Open in Web Editor NEWAgda interaction pluging for neovim
Agda interaction pluging for neovim
nvim-agda is great! However sometimes when doing equational reasoning, I'd like to get it to fill in the current state of the equality. In emacs I'd call agda2-solveOne
, but this functionality doesn't appear to be implemented in nvim-agda.
I get this error when I launch neovim on an agda file:
Erreur détectée en traitant Autocommandes BufNewFile pour "*.agda"..Autocommandes FileType pour "*"..function <SNR>1_LoadFTPlugin[17]..script /home/****/.local/share/nvim/site/pack/packer/start/nvim-agda/ftplugin/agda.vim :
ligne 9 :
E5108: Error executing lua .../nvim/site/pack/packer/start/nvim-agda/lua/agda/init.lua:2: module 'lua-utf8' not found:
no field package.preload['lua-utf8']
no file './lua-utf8.lua'
no file '/usr/share/luajit-2.1.0-beta3/lua-utf8.lua'
no file '/usr/local/share/lua/5.1/lua-utf8.lua'
no file '/usr/local/share/lua/5.1/lua-utf8/init.lua'
no file '/usr/share/lua/5.1/lua-utf8.lua'
no file '/usr/share/lua/5.1/lua-utf8/init.lua'
no file '/home/gryf/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/lua-utf8.lua'
no file '/home/gryf/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/lua-utf8/init.lua'
no file '/home/gryf/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/lua-utf8.lua'
no file '/home/gryf/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/lua-utf8/init.lua'
no file './lua-utf8.so'
no file '/usr/local/lib/lua/5.1/lua-utf8.so'
no file '/usr/lib/lua/5.1/lua-utf8.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
no file '/home/gryf/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/lua-utf8.so'
stack traceback:
[C]: in function 'require'
.../nvim/site/pack/packer/start/nvim-agda/lua/agda/init.lua:2: in main chunk
[C]: in function 'require'
[string "luaeval()"]:1: in main chunk
ligne 26 :
E718: Référence de fonction (Funcref) requise
It looks like the error starwing/luautf8#37 but I have already installed luautf8 (I have tried through luarocks and the AUR) and it works on a simple lua file like the exemple given in the readme
So I don't know where the problem is coming from.
I am using Astrovim v2.10 and Packer as plugin manager.
I added nvim-agda with this code:
local astro_plugins = {
["ashinkarov/nvim-agda"] = {}
}
===
OS : ArchLinux
Lua version : 5.4.4
I'm probably doing something wrong, but I just installed nvim-agda
(using vim-plug) as well as lua-utf8
for lua 5.1, but loading (<localleader>l
) a file containing an error produces the error message in the title.
Terminal session recording here: https://asciinema.org/a/0iRhEVSdTfPNj4KZEbPdwbthb
OS: Arch Linux
nvim: v0.8.3
Hi there! I'm loving nvim-agda, but notice it only reliably works on the first agda buffer I open. Attempting to load agda files in other buffers does nothing, but does corrupt the syntax highlighting of the first buffer.
More and more Neovim users are converging on the lazy.nvim package manager by folke. I feel it would help others get onboard with this plugin if there a known good configuration of nvim-agda using lazy.nvim was added to the readme. Is one of the maintainers open for this? I'd love to use Neovim as I work through @isovector's Certainty by Construction and would really appreciate the help getting nvim-agda set up!
Hi!
Plugins like https://github.com/tpope/vim-commentary check the commentstring
to get the formatting required to comment out lines. The other plugin I used had it https://github.com/derekelkins/agda-vim/blob/master/ftplugin/agda.vim#L64 and it seems like this is a simple enough change.
Maybe it's worth adding it?
Hi @ashinkarov!
I am trying out nvim-agda with agda from nix with standard-library. When I compile my code, it generates a MAlonzo/ directory with some additional libraries that are only found there, e.g. import Relation.Binary.PropositionalEquality as Eq
which is used in PLFA. nvim-agda
can't find it:
Failed to find source of module
Relation.Binary.PropositionalEquality in any of the following
locations:
~/code/plfa/Relation/Binary/PropositionalEquality.agda
~/code/plfa/Relation/Binary/PropositionalEquality.lagda
/nix/store/ydhsl48is3whm5kglpw8gslk266rc8sh-Agda-2.6.1.3-data/share/ghc-8.10.4/x86_64-linux-ghc-8.10.4/Agda-2.6.1.3/lib/prim/Relation/Binary/PropositionalEquality.agda
/nix/store/ydhsl48is3whm5kglpw8gslk266rc8sh-Agda-2.6.1.3-data/share/ghc-8.10.4/x86_64-linux-ghc-8.10.4/Agda-2.6.1.3/lib/prim/Relation/Binary/PropositionalEquality.lagda
when scope checking the declaration
It is in MAlonzo/
however,
% find MAlonzo | grep 'Prop.*Eq'
MAlonzo/Code/Relation/Binary/PropositionalEquality.hs
MAlonzo/Code/Relation/Binary/PropositionalEquality.o
...
If you have any clue, I would be delighted to fix this issue, because I think I am nearing the limits of what I can do without "intelligent support" from the editor. 😁
Sveiks Artem!
Are there any instructions available for managing this for neovim installed with nix?
I saw you have contributions somewhere in nix repos regarding neovim, so perhaps you can offer some minimal config? I have a working neovim nix derivation already, but just adding nvim-agda to the packages list didn't seem to do what's necessary. I might've installed it together with https://github.com/derekelkins/agda-vim — could that be an issue? Are they mutually exclusive?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.