davisdude / vim-love-docs Goto Github PK
View Code? Open in Web Editor NEWVim plugin for LÖVE syntax highlighting and help file
Home Page: http://www.vim.org/scripts/script.php?script_id=5298
License: MIT License
Vim plugin for LÖVE syntax highlighting and help file
Home Page: http://www.vim.org/scripts/script.php?script_id=5298
License: MIT License
I.e. File system: write mode, etc
Add 2 tags to be able to search: love-FileMode
, love-filesystem-FileMode
Also love-filesysyem-enums
e.g. something.getLength2 -- highlights "getLength" when it shouldn't
With the current syntax group for love.conf
, the following declaration does not highlight love.conf
or any of its flags.
love.conf = function
...
This is (most likely) because Lua's function group (luaFunctionBlock
) is overriding it.
See love.thread
See love-Object
See types and enums
> ./gen.sh
Cloning into 'love-api'...
remote: Enumerating objects: 5121, done.
remote: Counting objects: 100% (331/331), done.
remote: Compressing objects: 100% (185/185), done.
remote: Total 5121 (delta 191), reused 250 (delta 140), pack-reused 4790
Receiving objects: 100% (5121/5121), 5.60 MiB | 3.16 MiB/s, done.
Resolving deltas: 100% (3212/3212), done.
lua: main.lua:42: table index is nil
stack traceback:
main.lua:42: in local 'getLoveTypes'
main.lua:603: in main chunk
[C]: in ?
It looks like t.name
is not always set to a value.
vim-love-docs/src/doc/main.lua
Line 42 in 227e35b
Highlight shader code
In Linux (Kubuntu 17.10 in my case), needs #!/bin/bash on top of gen.sh files in order for pushd and popd to work.
I'll update the code and PR
i.e. in _vimrc
let g:love_docs_color = #ff60e2
Hello, I'm having difficulties with this plugin, the installation is fine, the plugin is installed, but nothing works:
the syntax is not highlighted and :help love.txt
produces an error.
Any idea? Honestly I don't think it's related to vim-plug, maybe is it because I'm using neovim instead of vim?
While launching vim on Ubuntu Linux, I get the following error:
Error detected while processing (...)/lua.vim:
line 13:
E121: Undefined variable: g:lovedocs_colors
line 14:
E121: Undefined variable: g:lovedocs_colors
line 15:
E121: Undefined variable: g:lovedocs_colors
line 16:
E121: Undefined variable: g:lovedocs_colors
Subsequently no commands are highlighted and the help file doesn't load.
If I comment those lines, the auto complete doesn't work, but the help file works fine.
Vim 8.1
*ref* *ref-2*
name description blah blah blah
blah blah
Arguments blah blah blah
Return values blah blah
blah
Currently generates docs that look like:
`align`: <AlignMode>
The alignment.
AlignMode is defined elsewhere but pressing K on it says "Sorry, no help for ". If you replace all <> with || (%sm/\v: \<(.*)\>$/: |\1|
), then AlignMode becomes jumpable.
If lua types were prefixed with lrv- then they would be jumpable with luarefvim.
Put enums and types under modules.
i.e.
1. love |love-love|
1.1. graphics |love.graphics|
1.1.1. modules |love.graphics-modules|
1.1.1.1. draw |love.graphics.draw|
1.1.2. enums |love.graphics-enums|
1.1.2.1. fillMode |love.graphics-fillMode| |love-fillMode|
1.1.3. types |love.graphics-types|
1.1.3.1. Canvas |love.graphics-Canvas| |love-Canvas|
To do this, indent size would have to be decreased in order to not cut off names
Pros:
Cons:
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.