Comments (11)
I implemented neovim support a while back actually in #19.
Since the neovim command set actually removes quite a few commands still existing in vim-space, enabling neovim support is a toggle rather than being built in (because it would conflict with the existing vim command set).
You can enable neovim support by passing true as the 2nd parameter to vimlparser#test(input, ...); or use the --neovim command line parameter for the js/python command line tools.
from vim-vimlparser.
Thanks, yeah it works alright with --neovim
from vim-vimlparser.
@RianFuro I were able to test it by adding but --neovim
in line 11 of node_modules/vimlint/lib/vimlint.js
(adding it to the arguments it calls the .sh
file with)vimlint --neovim <somepath>
outputs this:
error: unknown option `--neovim'
Any idea about this?
from vim-vimlparser.
I guess the npm package is not related to this repo. Right?
from vim-vimlparser.
@sassanh well, I guess both the vimlint and the node-vimlint projects are using this codebase here as a dependency to destruct vim code into an AST. Since neovim support should be already provided by my pr (though it could certainly do better, like proposed in #22), it's on the respective projects using the vimlparser to utilize this.
I suppose we could talk about the activation mechanism for neovim support if it's not sufficient... but since @ynkdir seems awfully inactive the last months, I doubt anything will come from it.
from vim-vimlparser.
Also, to answer your first question: Since you only outlined your attempt I can only guess, but since you want to use it via the executable, you'd also have to adapt their argument parser to make vimlint recognize the --neovim option and then correctly pass it over to the call to the vimlparser.
from vim-vimlparser.
@RianFuro thanks for info. vimlint (the npm package) uses vimlint.sh
from vim-vimlint
which uses vim-vimlparser
internally. So I ended up changing line 1943 of autoload/vimlint.vim
to
let p = s:vlp.VimLParser.new(1)
I hope I can manage my time so that I can create a PR for it (not by above method ofc, as it's just a dirty hack.) We can consider using has('nvim')
instead of passing an argument too.
from vim-vimlparser.
For the native implementation that would do. The transpiled js and python scripts don't have that option though :/
from vim-vimlparser.
I wonder can we add less strict mode which just focus on parsing Vim script and skip checking correctness of the script.
This problem is not only related with neovim-only commands, but also with newly added commands to Vim itself.
from vim-vimlparser.
To add to what @haya14busa said, vim now also has tmap
, tnoremap
etc. and these are currently flagged as errors
from vim-vimlparser.
maybe #67 fixed this?
from vim-vimlparser.
Related Issues (20)
- E492: Not an editor command: redrawtabline HOT 4
- Consider using CC0 Public Domain declaration
- Literal carriage returns break parser under Python 3.x HOT 9
- Handle default arguments with functions HOT 3
- "pos" is different (not a dict) with literal dicts
- 変換候補の削除プロンプトが壊れている HOT 1
- Parsing error with dict with variable key and no space before colon HOT 1
- s:VimLParser.builtin_{commands,functions} should be in separated JSON files HOT 1
- Failed to parse :syntax arguments HOT 1
- Support :function {'<lambda>42'} ? HOT 1
- Cannot use `is`, `isnot` for variable name HOT 1
- How can a python project depend on vimlparser? HOT 2
- Check vim/vim source files to generate built-in Ex commands / functions
- Support . (dot) as end marker for heredoc
- Support expr-.. (double dot) for string concatenation HOT 1
- error trying to parse map() with a lambda
- Support `:let=<<` with leading spaces before EOF HOT 2
- Bug with space in `syn region` regex
- vim9 script support? HOT 3
- Support for falsy operator?
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 vim-vimlparser.