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

Incorrect "not found" diagnostic #161

Closed
2 tasks done
Rolv-Apneseth opened this issue Feb 24, 2024 · 4 comments · Fixed by zk-org/zk#399
Closed
2 tasks done

Incorrect "not found" diagnostic #161

Rolv-Apneseth opened this issue Feb 24, 2024 · 4 comments · Fixed by zk-org/zk#399
Assignees
Labels
bug Something isn't working

Comments

@Rolv-Apneseth
Copy link

Check if applicable

  • I have searched the existing issues (required)
  • I'm willing to help fix the problem and contribute a pull request

Describe the bug

In a note, I have a code extract from a Cargo.toml, which is giving a diagnostic message: not found. This is because it uses the same syntax as linking to a note I guess, but I would prefer if anything within a code block would be ignored by zk-nvim

How to reproduce?

Use code block, diagnostic is on the line with [[bench]]:

```toml
[dev-dependencies]
criterion = { version = "0.5.1", features = ["html_reports"] }

[[bench]]
name = "main"
path = "benches/bench.rs"
harness = false
```

zk configuration

[lsp.diagnostics]
wiki-title = "hint"
dead-link = "error"

Neovim configuration

zk-nvim opts:


{
        picker = "telescope",
        lsp = {
            config = {
                cmd = { "zk", "lsp" },
                name = "zk",
            },
            auto_attach = {
                enabled = true,
                filetypes = { "markdown" },
            },
        },
    }


### Environment

```bash
zk 0.14.0
system: Linux 6.7.5-arch1-1 x86_64 GNU/Linux
NVIM v0.9.5
Build type: Release
LuaJIT 2.1.1702233742

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"
@tjex
Copy link
Member

tjex commented Mar 22, 2024

Hey, thanks for the report. Yep, this is a known bug. It's been reported, albeit in the zk repo. We'll be working on it shortly 👍

@tjex tjex added the bug Something isn't working label Mar 22, 2024
@Rolv-Apneseth
Copy link
Author

Perfect, thank you for continuing to maintain this

@Rahlir
Copy link

Rahlir commented Mar 31, 2024

@tjex I have an almost working fix for this that I am planning to submit this week. So, if you haven't started working on this, I will get this done.

@tjex
Copy link
Member

tjex commented Mar 31, 2024

@Rahlir I'd be greatly appreciative if you submit. Thanks so much!
And feel free to make a draft PR if you'd like some input / help with anything 👍

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

Successfully merging a pull request may close this issue.

3 participants