Skip to content

Commit

Permalink
chore: Readme changes
Browse files Browse the repository at this point in the history
  • Loading branch information
opa-oz committed Jun 23, 2024
1 parent c99012f commit 745e330
Show file tree
Hide file tree
Showing 31 changed files with 67 additions and 10 deletions.
40 changes: 30 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,52 +30,57 @@ An implementation of the Language Protocol Server for [Pug.js](https://pugjs.org

Project is under heavy development. Current functionality can be change in stable release.

### Freestyle

![preview](docs/preview.gif)


### Tags suggestions

Auto suggest list of HTML5 tags.

![tags-suggestions](docs/tags-suggestions.png)
![tags-suggestions](docs/tags-and-keyword-suggestions.png)

### Attributes suggestions

#### Auto suggest common attributes (such as `style`, `class`, `title`) for tags

![common-attributes](docs/common-attributes.png)
![common-attributes](docs/attributes-suggestion.png)

#### Auto suggest events (such as `onclick`, `onenter`) for tags

![events-attributes](docs/events-attributes.png)
![events-attributes](docs/events-suggestion.png)

#### Auto suggest tag-specific attributes (such as `href` for `a`)

![special-attributes](docs/special-attributes.png)
![special-attributes](docs/specific-attributes-siggestions.png)

#### `&attributes` snippet

_Yes, it's [a real feature](https://pugjs.org/language/attributes.html#attributes) of Pug_

![attributes-shortcut](docs/attributes-shortcut.png)
![attributes-shortcut](docs/and-attributes-suggestion.png)

### Mixins suggestions

Look through included files and suggest defined mixins!

![mixins](docs/mixins-suggestions.png)
![mixins](docs/mixins-suggestion.png)


### `Doctype` suggestions

PugJS has [a pre-defined list](https://pugjs.org/language/doctype.html) of possible doctypes.

![doctypes](docs/doctypes.png)
![doctypes](docs/doctype-suggestion.png)

### Keywords suggestions

#### `case .. when .. default`

Pug-LSP simply follows [Pug's implementation](https://pugjs.org/language/case.html)

![case-suggestions](/docs/case-suggestions.png)
![case-suggestions](/docs/default-snippet.png)

_Note_ [Case Fall Through](https://pugjs.org/language/case.html#case-fall-through)

Expand All @@ -90,13 +95,28 @@ If you would like to not output anything in a specific case, add an explicit unb

#### `if .. else`

![if-suggestion](docs/if-suggestions.png)
![if-suggestion](docs/if-suggest.png)


### Hover reference

See full desciption on hover!
![hover-reference](docs/hover-suggestions.png)
![hover-reference](docs/on-hover.png)

### Diagnostics

#### Include

Check if filepath is valid
![includes-diag](docs/includes-diagnostic.png)

#### Mixins

1. Check if mixin exists (_or included_)
![mixins-diag](docs/mixins-diagnostic.png)

2. Check if desired arguments passed
![mixin-arguments](docs/mixin-arguments-check.png)


## Thanks
Expand Down
Binary file added docs/and-attributes-suggestion.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/attributes-shortcut.png
Binary file not shown.
Binary file added docs/attributes-suggestion.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/break-snippet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/case-suggestions.png
Binary file not shown.
Binary file removed docs/common-attributes.png
Binary file not shown.
Binary file added docs/default-snippet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/doctype-suggestion.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/doctypes.png
Binary file not shown.
Binary file removed docs/events-attributes.png
Binary file not shown.
Binary file added docs/events-suggestion.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/hover-suggestions.png
Binary file not shown.
Binary file added docs/if-suggest.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/if-suggestions.png
Binary file not shown.
Binary file added docs/includes-diagnostic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/mixin-arguments-check.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/mixins-diagnostic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/mixins-suggestion.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/mixins-suggestions.png
Binary file not shown.
Binary file added docs/on-hover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/preview.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/special-attributes.png
Binary file not shown.
Binary file added docs/specific-attributes-siggestions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions docs/subject/includes/footer.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
footer
span Copyright © 2024
2 changes: 2 additions & 0 deletions docs/subject/includes/head.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
head
title Test subject
13 changes: 13 additions & 0 deletions docs/subject/index.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
include mixins/header
include mixins/paragraph

doctype html
html(lang="en")
include includes/head

body(onload="")
+h2("My subheader")
+paragraph
span My paragraph

include includes/footer
17 changes: 17 additions & 0 deletions docs/subject/mixins/header.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
mixin h1(title)
h1= title

mixin h2(title)
h2= title

mixin h3(title)
h3= title

mixin h4(title)
h4= title

mixin h5(title)
h5= title

mixin h6(title)
h6= title
3 changes: 3 additions & 0 deletions docs/subject/mixins/paragraph.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
mixin paragraph
p.paragraph
block
Binary file added docs/tags-and-keyword-suggestions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/tags-suggestions.png
Binary file not shown.

0 comments on commit 745e330

Please sign in to comment.