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

Breaks vim.lsp.buf.hover for all other LSP clients #53

Open
catgoose opened this issue Feb 20, 2025 · 0 comments
Open

Breaks vim.lsp.buf.hover for all other LSP clients #53

catgoose opened this issue Feb 20, 2025 · 0 comments

Comments

@catgoose
Copy link

Reproduction repo:

https://github.com/catgoose/templ_issue_repro/tree/bug/lsp_hover_and_codeaction

run:

nvim --clean -u templ.lua views/index.templ

To reproduce:

Do K over htmx attributes:

Image

Now do K over html or templ symbols, observe that no hover occurs

Disable htmx lsp in templ.lua:

  local templ_opts = {
    cmd = {
      "templ",
      "lsp",
      "-http=localhost:7474",
      string.format("-log=%s/templ.log", vim.fn.expand("~")),
    },
    filetypes = filetypes,
    root_dir = lspconfig.util.root_pattern("go.mod", ".git"),
    settings = {},
  }
  lspconfig.html.setup({
    filetypes = filetypes,
  })
  lspconfig.templ.setup(templ_opts)
  -- lspconfig.htmx.setup({
  --   filetypes = filetypes,
  -- })

Now do K over HTML and Templ symbols:

Image

Image

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

No branches or pull requests

1 participant