Skip to content

Commit

Permalink
Better LSP support for standard elements
Browse files Browse the repository at this point in the history
  • Loading branch information
joeldrapper committed Oct 2, 2024
1 parent 2293d12 commit 8bc3aec
Showing 1 changed file with 28 additions and 12 deletions.
40 changes: 28 additions & 12 deletions lib/phlex/html/standard_elements.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ module Phlex::HTML::StandardElements

# Outputs an `<audio>` tag.
# See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio
def audio(
register_element def audio(
autoplay: nil,
class: nil,
controls: nil,
Expand All @@ -71,37 +71,53 @@ def audio(
**attributes,
&content
) = nil
register_element :audio

# Outputs a `<b>` tag.
# See https://developer.mozilla.org/docs/Web/HTML/Element/b
def b(
register_element def b(
class: nil,
id: nil,
**attributes,
&content
) = nil
register_element :b

# Outputs a `<bdi>` tag.
# See https://developer.mozilla.org/docs/Web/HTML/Element/bdi
def bdi(id: nil, class: nil, **attributes, &content) = nil
register_element :bdi
register_element def bdi(
class: nil,
id: nil,
**attributes,
&content
) = nil

# Outputs a `<bdo>` tag.
# See https://developer.mozilla.org/docs/Web/HTML/Element/bdo
def bdo(id: nil, class: nil, dir: nil, **attributes, &content) = nil
register_element :bdo
register_element def bdo(
class: nil,
dir: nil,
id: nil,
**attributes,
&content
) = nil

# Outputs a `<blockquote>` tag.
# See https://developer.mozilla.org/docs/Web/HTML/Element/blockquote
def blockquote(id: nil, class: nil, cite: nil, **attributes, &content) = nil
register_element :blockquote
register_element def blockquote(
cite: nil,
class: nil,
id: nil,
**attributes,
&content
) = nil

# Outputs a `<body>` tag.
# See https://developer.mozilla.org/docs/Web/HTML/Element/body
def body(id: nil, class: nil, **attributes, &content) = nil
register_element :body
register_element def body(
class: nil,
id: nil,
**attributes,
&content
) = nil

# Outputs a `<button>` tag.
# The `<button>` element is an interactive element activated by a user with a mouse, keyboard, finger, voice command, or other assistive technology to perform an action, such as submitting a form or opening a dialog.
Expand Down

0 comments on commit 8bc3aec

Please sign in to comment.