Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtime(stylus): include syntax and ftplugin #14656

Closed
wants to merge 21 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 1 addition & 5 deletions runtime/ftplugin/stylus.vim
Expand Up @@ -14,7 +14,6 @@ set cpo-=C
" Define some defaults in case the included ftplugins don't set them.
let s:undo_ftplugin = ""
let s:browsefilter = "All Files (*.*)\t*.*\n"
let s:match_words = ""

runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim
unlet! b:did_ftplugin
Expand All @@ -28,10 +27,7 @@ if exists("b:browsefilter")
let s:browsefilter = b:browsefilter
unlet b:browsefilter
endif
if exists("b:match_words")
let s:match_words = b:match_words
pheiduck marked this conversation as resolved.
Show resolved Hide resolved
unlet b:match_words
pheiduck marked this conversation as resolved.
Show resolved Hide resolved
endif

" Change the browse dialog on Win32 to show mainly Styl-related files
if has("gui_win32")
Expand All @@ -48,7 +44,7 @@ setlocal suffixesadd=.styl
setl iskeyword+=#,-
pheiduck marked this conversation as resolved.
Show resolved Hide resolved

" Add a Stylus command (to see if it's valid)
command! Stylus !clear; cat % | stylus
:au! Stylus !clear; cat % | stylus
pheiduck marked this conversation as resolved.
Show resolved Hide resolved

setlocal formatoptions+=r
pheiduck marked this conversation as resolved.
Show resolved Hide resolved

Expand Down
4 changes: 0 additions & 4 deletions runtime/indent/stylus.vim
Expand Up @@ -72,10 +72,6 @@ endfunction
" if pnum == 0
" return 0
" endif
"
" return indent(pnum) + s:count_braces(pnum, 1) * &sw
" \ - s:count_braces(v:lnum, 0) * &sw
" endfunction

function! GetStylusIndent()
let line = getline(v:lnum)
Expand Down
91 changes: 1 addition & 90 deletions src/testdir/test_filetype.vim
Expand Up @@ -686,6 +686,7 @@ def s:GetFilenameChecks(): dict<list<string>>
starlark: ['file.ipd', 'file.star', 'file.starlark'],
stata: ['file.ado', 'file.do', 'file.imata', 'file.mata'],
stp: ['file.stp'],
stylus: ['a.styl', 'file.stylus'],
sudoers: ['any/etc/sudoers', 'sudoers.tmp', '/etc/sudoers', 'any/etc/sudoers.d/file'],
supercollider: ['file.quark'],
surface: ['file.sface'],
Expand Down Expand Up @@ -2464,94 +2465,4 @@ func Test_uci_file()
filetype off
endfunc

" Stylus Test

" To test this file, first load the plugin by...

au BufNewFile,BufReadPost *.styl,*.stylus setf stylus

padding-overloaded = true;
padding = 2px;
primary-color = red;
$hello = world;

if padding-overloaded
padding(x,y)
margin 15px

border-radius()
-webkit-border-radius arguments // comment test
-moz-border-radius arguments //comment test
border-radius arguments
pointer-events arguments

#myid {
-moz-transform: scale(1.2);
font-family: arial;
}

.a-class
border-radius border-radius()
-moz-transform scale(1.2)

body a:hover
font 12px/1.4 "Lucida Grande", Arial, sans-serif
background black !important
text-shadow 2px 2px 2px #fff
td a:hover
font 12px
td
font 12px

[name="myprop"]
background rgba(255,255,255,0.5)

#container
user-select none
border-radius 5px
color #000
float left
display: block
background url('http://i.imgur.com/Q4RObrY.jpg')

#myid
font 12px/1.4 "Lucida Grande", Arial, sans-serif

h1 {
color: red;
}

body a:hover
font 12px/1.4 "Lucida Grande", Arial, sans-serif
background black !important
background rgb(255,255,0)
border-top 1px solid rgb(255,255,0)
text-shadow 2px 2px #000
color #ccc

#butter.gump tr
border min(2px)
min-width min(2px)
color red(10) lighten(he) border-radius() image-size()
border-radius border-radius()

&:hover
color black // Tests indent from the line above

div
display flex
justify-content center
align-items center

form input {
padding: 5px;
border: 1px solid;
border-radius: 5px;
}

vendor(prop, args)
{prop} args
-moz-{prop} args
-webkit-{prop} args

" vim: shiftwidth=2 sts=2 expandtab