Commit Graph

5 Commits

Author SHA1 Message Date
bbdc1aa849 feat: add visual mode transform with <leader>ctt keymap
New keymaps for inline /@ @/ tag transformation:
- <leader>ctt (visual): Transform tags within selection
- <leader>ctt (normal): Transform tag at cursor
- <leader>ctT (normal): Transform ALL tags in file

New command:
- :CoderTransformVisual - Transform tags in visual selection

Usage:
1. Select lines containing /@ @/ tags
2. Press <leader>ctt
3. Selected tags are replaced with generated code
2026-01-11 15:41:42 -05:00
d11a99ee61 feat: add :CoderTransform command for inline tag replacement
New feature: Transform /@ @/ tags directly in any file, not just
.coder.* files. The tags are replaced inline with LLM-generated code.

New commands:
- :CoderTransform - Transform ALL /@ @/ tags in current file
- :CoderTransformCursor - Transform only the tag at cursor position
- :Coder transform - Same as :CoderTransform
- :Coder transform-cursor - Same as :CoderTransformCursor

How it works:
1. Write /@ your prompt @/ anywhere in your code
2. Run :CoderTransform
3. The tag is replaced with generated code matching your file's style

Example:
  /@ create a function to validate email @/

  Becomes:
  function validateEmail(email) {
    return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email);
  }
2026-01-11 15:38:41 -05:00
8130a78ed5 fix: make prompts language-agnostic, support all file types
The plugin now properly detects and uses the file's language based on
its extension, rather than focusing on TypeScript.

Changes:
- Updated all system prompts to use {{language}} placeholder
- Removed hardcoded TypeScript references
- Expanded language mappings to support 50+ file extensions:
  - JavaScript/TypeScript (js, ts, jsx, tsx, mjs, cjs)
  - Python (py, pyw, pyx)
  - Systems (c, cpp, rs, go, zig, nim)
  - JVM (java, kt, scala, clj)
  - Web (html, css, scss, vue, svelte)
  - Scripting (lua, rb, php, sh, bash)
  - .NET (cs, fs, vb)
  - Data (json, yaml, toml, sql, graphql)
  - And many more...
2026-01-11 15:33:28 -05:00
fe04e624db fix: ensure LLM outputs only code, not plain text
Improved prompts and code extraction to ensure generated code:
- Matches the file type and existing code structure
- Contains NO markdown code blocks (```)
- Contains NO explanations or comments about what was done
- Is ready to be directly inserted into the target file

Changes:
- Enhanced system prompts with stricter "ABSOLUTE RULES"
- Added explicit instructions about no markdown in user prompts
- Improved extract_code() to strip markdown and explanations
- Added processing notification with prompt preview
2026-01-11 15:31:23 -05:00
bba0647b47 feat: initial release of codetyper.nvim v0.2.0
AI-powered coding partner for Neovim with LLM integration.

Features:
- Split view for coder files (*.coder.*) and target files
- Tag-based prompts with /@ and @/ syntax
- Claude API and Ollama (local) LLM support
- Smart prompt detection (refactor, add, document, explain)
- Automatic code injection into target files
- Project tree logging (.coder/tree.log)
- Auto .gitignore management

Ask Panel (chat interface):
- Fixed at 1/4 screen width
- File attachment with @ key
- Ctrl+n for new chat
- Ctrl+Enter to submit
- Proper window close behavior
- Navigation with Ctrl+h/j/k/l

Commands: Coder, CoderOpen, CoderClose, CoderToggle,
CoderProcess, CoderAsk, CoderTree, CoderTreeView
2026-01-11 15:24:06 -05:00