MCPcopy Index your code
hub / github.com/ThePrimeagen/htmx-lsp

github.com/ThePrimeagen/htmx-lsp @0.2.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.2.0 ↗ · + Follow
63 symbols 155 edges 10 files 2 documented · 3%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

HTMX-LSP logo HTMX-LSP logo

crates.io build status

its so over

LSP

Right now this is very much so a work in progress and currently provides basic autocomplete for most HTMX attributes. We have reached a point where I could use help! If you want to fill in documentation or help with autocompletes please open an issue/pr!

Integration

Neovim

htmx-lsp can be installed via Mason. And can be configured with lspconfig

local lspconfig = require('lspconfig')
-- ...
lspconfig.htmx.setup{}

Another option is to use lsp-debug-tools

VSCode

No published extension yet, but there is a development extension in the clients/vscode folder (with setup instructions)

Development

General

As of right now the general goal is just to provide completion for any - character received without even looking at the context.

After that, would be to perform some code actions that make sense and allow for amazing utility around htmx.

htmx-lsp -f /path/to/file --level [OFF | TRACE | DEBUG | INFO | WARN | ERROR]

Build

cargo build

# OR auto-build on file save, requires `cargo-watch`
cargo install cargo-watch
cargo watch -x build

Contributors

Core symbols most depended-on inside this repo

query_position
called by 14
lsp/src/tree_sitter.rs
prepare_tree
called by 13
lsp/src/tree_sitter.rs
handle_request
called by 3
lsp/src/handle.rs
get_text
called by 3
lsp/src/tree_sitter.rs
get_attribute_name_and_value
called by 3
lsp/src/tree_sitter.rs
query_props
called by 2
lsp/src/tree_sitter_querier.rs
prepare_store
called by 2
lsp/src/handle.rs
init_text_store
called by 2
lsp/src/text_store.rs

Shape

Function 48
Class 11
Enum 2
Method 2

Languages

Rust98%
TypeScript2%

Modules by API surface

lsp/src/tree_sitter.rs22 symbols
lsp/src/handle.rs18 symbols
lsp/src/text_store.rs7 symbols
lsp/src/tree_sitter_querier.rs4 symbols
lsp/src/lib.rs4 symbols
lsp/src/htmx/mod.rs3 symbols
util/src/lib.rs2 symbols
src/opts.rs1 symbols
src/main.rs1 symbols
client/vscode/extension.js1 symbols

For agents

$ claude mcp add htmx-lsp \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page