epwalsh / epwalsh/obsidian.nvim

Autocompletion for [[ wiki links results in [[[link]] instead of [[link]]

Open
#862 4 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Lua
Stars
6.2k
Forks
250
PR merge metrics
No merged PRs in 30d

Description

### 🐛 Describe the bug

When using autocompletion for wiki links, the plugin incorrectly replaces only part of the existing wiki link syntax. For example, typing `ebéd @ [[Bud` and selecting "Budapest" results in: `ebéd @ [[[Budapest]]` instead of the expected: `ebéd @ [[Budapest]]`. The issue is that only the `"[Bud"` part is replaced, leaving an extra opening bracket. This is because the line contains a Unicode character.

### Config

Not relevant.

### Environment

```
NVIM v0.11.3
Build type: RelWithDebInfo
LuaJIT 2.1.1741730670
```
```
Obsidian.nvim v3.9.0 (unknown commit)
Status:
• buffer directory: nil
• working directory: /home/bmiklos/Dokumentumok/notes
Workspaces:
✓ active workspace: Workspace(name='notes', path='/home/bmiklos/Dokumentumok/notes', root='/home/bmiklos/Dokumentumok/notes')
Dependencies:
✓ plenary.nvim: b9fd5226c2f76c951fc8ed5923d85e4de065e509
✓ nvim-cmp: b5311ab3ed9c846b585c0c15b7559be131ec4be9
✓ telescope.nvim: 6312868392331c9c0f22725041f1ec2bef57c751
Integrations:
✓ picker: TelescopePicker()
✓ completion: enabled (nvim-cmp) ✗ refs, ✗ tags, ✗ new
all sources:
• nvim_lsp
• path
• buffer
Tools:
✓ rg: ripgrep 14.1.1
Environment:
• operating system: Linux
Config:
• notes_subdir: új
```

Contributor guide

Open the contributing guide

Research direction

No file or test is named; start by reproducing wiki-link completion with a Unicode character before `[[` and trace the completion entry point that replaces the prefix. Done when selecting “Budapest” from `[[Bud` yields `[[Budapest]]` rather than `[[[Budapest]]`.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua, neovim
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.