Closed BerkeleyTrue closed 9 years ago
I am willing to do it. But I don't use fold function on Vim. So I will need some one help me to see is the logic good for people.
I'd love to have fold support on {
if nothing else.
@shadowhand You can have a look at my fork. It supports TypeScript, a superset of JavaScript. So you can fork yats and modify it into a valid js syntax, with fold . https://github.com/HerringtonDarkholme/yats.vim
As a temporary solution to anyone who wants it, I broke out the indenting from pangloss/vim-javascript (which I think is one of the better indenting detection libraries for javascript) and it is available here.
@rschmukler I like your idea, but cannot get your plugin to work. Is there more setup required than just loading the plugin?
I'm asking you here instead of on your repo because it (probably) has to do with using it in conjunction with yajs.vim
. Thanks!
Edit: Nevermind, I was thinking it was for adding folding support for some reason.
I am using pangloss's indent file too :)
Yeah I was going to say, the indention in yajs.vim
actually works perfectly as-is. That's why I thought the OP was talking about supporting code folding.
Since I don't use fold.
I am not sure which part people want to fold.
There is one vote for fold at {
, }
But no other opinions~
I think we can close this, as the title is "Indent support", and as far as I am aware there are not actually any issues or holes with the indent support in this plugin.
I opened #49 with the fold support.
@rosshadden did you do anything to get indentation support (I really mean indentation, not fold)? I'm seeing this with only the othree/yajs
plugin enabled:
Using pangloss/vim-javascript
instead fixes the indentation issue.
I just tried @rschmukler solution:
Plugin 'othree/yajs.vim'
Plugin 'rschmukler/pangloss-vim-indent'
and indentation seems to work again.
I use these relevant plugins:
Plug 'othree/yajs.vim', { 'for': 'javascript' }
Plug 'othree/javascript-libraries-syntax.vim', { 'for': 'javascript' }
Plug 'othree/es.next.syntax.vim', { 'for': 'javascript' }
My behavior is the same as yours in your screenshot, but as far as I am concerned there is no problem. You are missing a semicolon. With the semicolon in place it works as expected, which is why I never noticed any issues.
No semicolon is a coding style 😅 ref: http://standardjs.com/
Yes, I'm in the no semicolons camp :)
Wondering if indent support might be in the future for this project?