Skip to content

nvim: Detect structured file types when editing pass entries - #144

Merged
Unique-Divine merged 1 commit into
mainfrom
nvim/pass-filetypes
Nov 16, 2026
Merged

Unique-Divine merged 1 commit into
mainfrom
nvim/pass-filetypes

Conversation

@Unique-Divine

Copy link
Copy Markdown
Owner

Detect Structured File Types When Editing pass Entries

Neovim detects the original format of filenames such as config.json.txt, so structured secrets opened through pass edit get the expected language support.

Rationale

Pass appends .txt to its decrypted temporary filename even when the entry is named config.json or credentials.toml. Neovim therefore detects plain text. Delegating detection to Neovim after removing the final suffix reuses its built-in and custom mappings while preserving the actual filename that pass reads back for encryption.

Key Changes

  1. Add a file-type rule for double-extension filenames ending in .txt, with normal detection for unknown formats and ordinary text files.
  2. Document the pass naming convention, its temporary-file behavior, and the fact that LSP attachment still depends on server and workspace configuration.

@Unique-Divine
Unique-Divine merged commit 43313e4 into main Nov 16, 2026
1 check passed
@Unique-Divine
Unique-Divine deleted the nvim/pass-filetypes branch November 16, 2026 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant