Comments (12)
Here is another example for more info (JADE templating vim plugin)
from indentline.
Can you give me a sample of stylus file?
from indentline.
Absolutely, here is an example pulled from my footer:
.footer
background-color by_black
color white
padding 1em
margin 1em 0
itemwidth = 110
> .menu
width (itemwidth*3+10)px
margin auto
> .item
display inline-block
width unit(itemwidth, px)
text-align center
here is what it looks like normally in vim w/out the indent plugin using the stylus plugin i urled at the top:
from indentline.
If you want these two plugin to work together, you'd better make some changes for vim-stylus.
For example,
syn match stylusProperty "^\s*\zs\s\%(\%([[:alnum:]-]\|#{[^{}]*}\)\+[ :]\|:[[:alnum:]-]\+\)"hs=s+1 contains=@stylusCssProperties,@stylusCssSelectors skipwhite nextgroup=stylusCssAttribute
syn match stylusProperty "^\s*\zs\s\%(:\=[[:alnum:]-]\+\s*=\)"hs=s+1 contains=@stylusCssProperties,@stylusCssSelectors skipwhite nextgroup=stylusCssAttribute
=>
syn match stylusProperty "\(^\s*\)\@<=\%(\%([[:alnum:]-]\|#{[^{}]*}\)\+[ :]\|:[[:alnum:]-]\+\)"hs=s+1 contains=@stylusCssProperties,@stylusCssSelectors skipwhite nextgroup=stylusCssAttribute
syn match stylusProperty "\(^\s*\)\@<=\%(:\=[[:alnum:]-]\+\s*=\)"hs=s+1 contains=@stylusCssProperties,@stylusCssSelectors skipwhite nextgroup=stylusCssAttribute
in syntax/stylus.vim line:330
from indentline.
Nice work! are you sure this is the only solution? there are a couple other syntax plugins broken IIRC after trying this out.
from indentline.
This is not the only solution, but this solution only need to change little code.
from indentline.
I think this issue can be closed.
from indentline.
well, not really a little code because I have to do this for each syntax file that it breaks, its a little change that's never ending. It still pretty much means this plugin is not compatible with a lot of syntax highlight files.
from indentline.
There are two other syntax plugins I'm using that are also now broken because of this, I think this bug is actually a pretty high priority, and should be re-opened.
from indentline.
I think it's impossible to resolve this issue through modifying indentLine only.
'help syn-priority' says:
When several syntax items may match, these rules are used: 1. When multiple Match or Region items start in the same position, the item defined last has priority. 2. A Keyword has priority over Match and Region items. 3. An item that starts in an earlier position has priority over items that start in later positions.
Some syntax plugins have 'syn match xxx /^\s*xxxxxxxx/
' which matchs the same position as indentLine, so the highlighting is overruled by indentLine(because indentLine is in the after
directory). The issue is either indentLine's highlighting is overruled by other syntax plugin or indentLine's highlighting overrules other syntax plugin. The only solution is that let 'syn match xxx /^\s*xxxxxxxx/
' matches different position, it can be achieved by using \@<=
.
from indentline.
Thank you for clarifying, I will echo this to the following repo's and hopefully get them to resolve this.
from indentline.
Just to clarify then with jade, am i right that the issue is here :
https://github.com/digitaltoad/vim-jade/blob/master/syntax/jade.vim#L32
And that I need to alter that to \@<=
?
from indentline.
Related Issues (20)
- CursorColumn doesn't highlight indentLines
- How to get a vertical line before the first tab HOT 1
- Disable IndentLine for Terminal Buffers HOT 1
- Indention guide lines get highlighted when using easymotion.
- How to have indentLine in blank line and in the first column HOT 4
- eat quotation marks? HOT 2
- error dected when vim startup HOT 10
- BUG: Does not work with a transparent background color but I think I figured out why HOT 3
- let g:indentLine_bufTypeExclude = ['help', 'terminal'] can't disable indentLine in Normal-Terminal mode.
- indentLine should not override conceallevel/concealcurson for exclusions
- how to not display indenline char if there are no 4 spaces
- add support for patch files / unified diff
- Default value for `concealcursor` documentation incorrect HOT 1
- Error when starting macvim 9.0.65 with this plugin enabled HOT 2
- neovim use HOT 2
- Neovim 0.8.0: Error detected while processing BufWinEnter Autocommands HOT 3
- IndentLine color in lua configuration
- -
- Disable Indentline for dashboard HOT 4
- Indentline does not update with shiftwidth change
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 indentline.