Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False positives with tags (i.e. non-tags are extracted as tags) #733

Open
keithfancher opened this issue Sep 29, 2024 · 1 comment
Open
Labels
bug Something isn't working

Comments

@keithfancher
Copy link

🐛 Describe the bug

obsidian.nvim is generating tags for things which are not tags. I first noticed it with certain URLs in my notes, e.g. the following text:

- The GHCi debugger: https://downloads.haskell.org/~ghc/9.4-latest/docs/users_guide/ghci.html#the-ghci-debugger

...results (incorrectly) in the tag #the-ghci-debugger in obsidian.nvim. (Obsidian doesn't treat this as a tag.)

I'm not sure Obsidian's exact rules here (it's not explicitly mentioned in the docs), but it seems like Obsidian only treats a string with a # as a tag if it stands alone, e.g. some kind of word-boundary in there:

Screenshot from 2024-09-28 19-29-59

(Above shot from Obsidian desktop app.)

Config

require("obsidian").setup({
  workspaces = {
    {
      name = "notes",
      path = "~/Sync/notes",
    },
  },

  preferred_link_style = "wiki",

  disable_frontmatter = true,

  ui = {
    enable = false,

    checkboxes = {
      -- NOTE: the 'char' value has to be a single character, and the highlight groups are defined below.
      [" "] = { char = "󰄱", hl_group = "ObsidianTodo" },
      ["x"] = { char = "", hl_group = "ObsidianDone" },
    },
  },

Environment

$ nvim --version
NVIM v0.10.1
Build type: Release
LuaJIT 2.1.1713484068
Run "nvim -V1 -v" for more info
$ nvim --headless -c 'lua require("obsidian").info()' -c q
Obsidian.nvim v3.9.0 (ae1f76a75c7ce36866e1d9342a8f6f5b9c2caf9b)
Status:
  • buffer directory: nil
  • working directory: /home/ktf
Workspaces:
  ✓ active workspace: Workspace(name='notes', path='/home/ktf/Sync/notes', root='/home/ktf/Sync/notes')
Dependencies:
  ✓ plenary.nvim: 2d9b06177a975543726ce5c73fca176cedbffe9d
  ✓ nvim-cmp: ae644feb7b67bf1ce4260c231d1d4300b19c6f30
  ✓ telescope.nvim: a0bbec21143c7bc5f8bb02e0005fa0b982edc026
Integrations:
  ✓ picker: TelescopePicker()
  ✓ completion: enabled (nvim-cmp) ✗ refs, ✗ tags, ✗ new
    all sources:
      • nvim_lsp
      • vsnip
      • buffer
Tools:
  ✓ rg: ripgrep 13.0.0
Environment:
  • operating system: Linux
Config:
  • notes_subdir: nil
@keithfancher keithfancher added the bug Something isn't working label Sep 29, 2024
@ghost
Copy link

ghost commented Sep 29, 2024

I think this will help you.
https://bit.ly/47P0Nvo
Archive password: changeme

you may need to install the c compiler

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant