Comments (3)
I haven't attempted to support literate Agda at all, though it is possible it works fine or could be made to work just by making the syntax highlighting work do something reasonable for.lagda.md
files.
If there is some specific markdown plugin you have in mind, I can look at it, but if it doesn't actually load other plugins to handle code blocks, there's nothing I can do to change its behavior.
If all you care about from the markdown plugin is syntax highlighting, it might be enough to replace the agda-vim
syntax file with the markdown plugin's syntax file plus the rule
syn match agdaHole "\v(^|\s|[.(){};])@<=(\?)($|\s|[.(){};])@="
and modify ftdetect/agda.vim
to handle *.lagda.md
files. In theory, this should make all the interactive features work.
It should be relatively easy to go further and take an existing markdown syntax file and combine it with the current Agda syntax file so that you get Agda highlighting in the code blocks and markdown highlighting outside of them.
from agda-vim.
With vanilla neovim 0.3.8, and ftdetect/agda.vim
containing the following
au BufRead,BufNewFile *.agda,*.lagda,*.lagda.md setf agda
vim still thinks a lagda.md
file to be a markdown file instead of agda (echo &ft
gives markdown
). I also tried cp ftplugin/agda.vim ftplugin/markdown.vim
and it works like a charm for lagda.md
file. But it complains for normal markdown files as agda complains the extension does not contain .lagda
before .md
.
Any ideas?
from agda-vim.
For the former, the problem is presumably that both autocmds are run and the Markdown one is run afterwards. One solution to this that doesn't require changing any of the original files is to simply specify the filetype in a vim modeline.
In the latter case, you are simply replacing the Markdown plugin's code with the agda-vim's which isn't going to work for Markdown files that aren't Agda files as you found out.
Any "nice" integration between these is either going to require a sophisticated Markdown plugin that can load third-party plugins for code blocks, or it will require non-trivial changes to one or both of the Markdown plugin and this one. The cheapest integration you could get is to modify the agda-vim syntax files to source the Markdown syntax files (or just inline the syntax highlighting code) instead of running the Agda syntax code (for .lagda.md
files) except including the line I mentioned in the previous comment and use a modeline to set the filetype. This will give you markdown highlighting but cost you Agda highlighting. You could probably recover that by duplicating the Agda syntax code only making it nested in whatever syntax group is used for code blocks by the markdown syntax highlighting.
from agda-vim.
Related Issues (20)
- Support Agda 2.6.0 HOT 4
- Make Agda usage (or at least Agsy usage) asynchronous HOT 1
- Python being parsed as Vimscript HOT 6
- Ability to disable the insert-mode \ unicode entry HOT 11
- (Seemingly) fail to handle multiple responses from Agsy HOT 5
- Python 3 Support HOT 1
- As of Agda 2.5.3-alpha1, agda-vim doesn't work HOT 3
- Normalize broken for Agda 2.5.3 HOT 1
- Extend the utf-8 file HOT 1
- Error: First load the file. HOT 2
- agda stdlib permission errors HOT 5
- Add support for "Go to definition of identifier under point" HOT 4
- warns when edit from other directories HOT 2
- Hangs on Windows when opening agda file HOT 1
- Normalize doesn't seem to do anything (Agda 2.6.0.1) HOT 3
- Load times slower than emacs mode HOT 1
- Filename not matching module name leads to obscure errors HOT 1
- Unknown function: AgdaMakeCase HOT 2
- Commands not loaded (neovim) HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from agda-vim.