mirror of
https://github.com/wuelnerdotexe/vim-astro.git
synced 2025-12-06 09:14:26 +08:00
feat(*): a new config var and an example img are added
This commit is contained in:
@@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [1.1.0] - 2022-08-06
|
||||
|
||||
### Added
|
||||
|
||||
- A new variable is added to enable stylus support.
|
||||
- Demonstration images are added.
|
||||
|
||||
## [1.0.1] - 2022-08-05
|
||||
|
||||
### Fixed
|
||||
|
||||
15
README.md
15
README.md
@@ -4,6 +4,11 @@
|
||||
|
||||
Provides syntax highlighting and indentation (beta) support for `.astro` files.
|
||||
|
||||
<div align="center">
|
||||
<img src="https://raw.githubusercontent.com/wuelnerdotexe/vim-astro/main/assets/astro.png">
|
||||
<strong>Theme:</strong> <a href="https://wuelnerdotexe.github.io/enfocado">Enfocado</a> Dark Neon.
|
||||
</div>
|
||||
|
||||
## Features
|
||||
|
||||
- Syntax highlighting for embedded languages:
|
||||
@@ -37,6 +42,16 @@ Enables TypeScript and TSX for `.astro` files.
|
||||
|
||||
Default Value: 'disable'
|
||||
|
||||
```vim
|
||||
let g:astro_stylus = 'enable'
|
||||
```
|
||||
|
||||
Enables Stylus for `.astro` files.
|
||||
|
||||
Default Value: 'disable'
|
||||
|
||||
NOTE: Vim does not provide Stylus support by default, but you can install [vim-stylus](https://github.com/wavded/vim-stylus) to support it.
|
||||
|
||||
## Maintainer
|
||||
|
||||
> Hi 👋, I'm **[Wuelner](https://linktr.ee/wuelnerdotexe)**, a **software developer from Guatemala**, passionate about creating minimalist solutions using solid fundamentals focused on **"how things should be"**.
|
||||
|
||||
BIN
assets/astro.png
Normal file
BIN
assets/astro.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.7 MiB |
@@ -13,5 +13,12 @@ Enables TypeScript and TSX for `.astro` files.
|
||||
|
||||
Default Value: 'disable'
|
||||
|
||||
`let g:astro_stylus = 'enable'`
|
||||
|
||||
Enables Stylus for `.astro` files.
|
||||
|
||||
Default Value: 'disable'
|
||||
|
||||
NOTE: You need install a external plugin for support stylus in astro files.
|
||||
==============================================================================
|
||||
vim:textwidth=78:tabstop=8:filetype=help:
|
||||
|
||||
@@ -20,6 +20,7 @@ endif
|
||||
|
||||
" Astro syntax variables are initialized.
|
||||
let g:astro_typescript = get(g:, 'astro_typescript', 'disable')
|
||||
let g:astro_stylus = get(g:, 'astro_stylus', 'disable')
|
||||
|
||||
let s:cpoptions_save = &cpoptions
|
||||
set cpoptions&vim
|
||||
@@ -141,6 +142,8 @@ unlet b:current_syntax
|
||||
" Embedded Stylus syntax.
|
||||
" NOTE: Vim does not provide stylus support by default, but you can install
|
||||
" this plugin to support it: https://github.com/wavded/vim-stylus
|
||||
if g:astro_stylus == 'enable'
|
||||
try
|
||||
syntax include @astroStylus syntax/stylus.vim
|
||||
|
||||
" stylusStyle: add Stylus style tags support in Astro.
|
||||
@@ -160,6 +163,10 @@ syntax region astroSurroundingTag
|
||||
\ contains=htmlTagError,htmlTagN,htmlArg,htmlValue,htmlEvent,htmlString
|
||||
\ contained
|
||||
\ fold
|
||||
catch
|
||||
echomsg "you need install a external plugin for support stylus in astro files"
|
||||
endtry
|
||||
endif
|
||||
|
||||
" Define the default highlighting.
|
||||
" Only used when an item doesn't have highlighting yet.
|
||||
|
||||
Reference in New Issue
Block a user