-
Notifications
You must be signed in to change notification settings - Fork 0
Completion
lex edited this page Jul 23, 2026
·
1 revision
Poste HTTP provides context-aware completion for .http files via blink.cmp (primary) with nvim-cmp fallback.
The completion engine detects what you're typing based on cursor position and context:
| Context | When | Suggestions |
|---|---|---|
method |
Empty line at start of request | HTTP methods (GET, POST, PUT...) |
method_or_header |
Single word at start of line | Methods + known header names |
header_value |
After HeaderName:
|
Context-appropriate values (e.g., Content-Type values) |
variable |
Inside {{...}}
|
All defined variables + namespace resolution |
variable_namespace |
After Name. or Name.response.
|
Dotted path completions |
prompt_mapping |
Inside ` | {name: ...}` |
pre_script |
Inside < {% ... %}
|
Script API keywords + Lua completions |
post_script |
Inside > {% ... %}
|
Assertion API + Lua completions |
status_code |
After response.status =
|
HTTP status code suggestions |
import_path |
After import
|
File path suggestions |
import_alias |
After import path
|
as keyword |
run_target |
After run
|
# + file paths |
run_target_hash |
After run #
|
All known request names |
run_target_alias |
After run #alias.
|
Aliased request names |
file_directive |
File-level area |
import, @, << keywords |
When typing {{, the completion popup shows:
- File-level
@vardefinitions - Block-level
@vardefinitions - Environment variables from
env.json - Magic variables (
$timestamp,$uuid,$date,$randomInt) - Cross-request namespaces (after
{{Name.)
After typing {{Name., you get:
Name.response.body.
Name.response.headers.
Name.request.body.
Name.request.headers.
Each further expansion shows available fields.
Inside < {% or > {% blocks, completion provides:
-
request.methods -
client.methods -
response.properties (assertions only) -
md5.functions -
env(),variables() - Standard Lua globals
Completion data is defined in lua/poste/http/data.lua:
- HTTP methods
- Request headers with expected values
- MIME types
- HTTP status codes
- Script API documentation
- Lua built-in members
:PosteCmpStatus " Check if completion source is registered
:PosteCmpProfile " Profile completion performance
:PosteInfo " Show binary/version/completion info