pfeiferj / tree-sitter-hurl

tree-sitter parser for the hurl file format
Apache License 2.0
20 stars 1 forks source link

problem configuring hurl lsp #7

Closed bolanosdev closed 7 months ago

bolanosdev commented 9 months ago

hi Jacob

thanks for creating this parsers. I was trying to import it into a brand new lazy vim configuration but for some reason I don't see it working.

mvim-hurl works nicely to execute hurl requests with key bindings but I can't make the lsp work, wondering if you could help. Screenshot 2024-01-31 at 1 33 12 PM

bolanosdev commented 9 months ago

I think I was able to figure out how to sett up for lazy.

Screenshot 2024-01-31 at 1 56 53 PM

in case you want to add it to the readme

return {
  {
    "nvim-treesitter/nvim-treesitter",
    opts = function(_, opts)
      vim.list_extend(opts.ensure_installed, { "hurl" })
    end,
    requires = {
      {
        "pfeiferj/nvim-hurl",
        branch = "main",
      },
    },
    config = function(_, opts)
      opts.highlight = { enable = true }
      opts.indent = { enable = true }
      require("nvim-treesitter.configs").setup(opts)
    end,
  }
}
pfeiferj commented 7 months ago

@bolanosdev You shouldn't need to use the nvim-hurl plugin anymore. The parser is available in nvim-treesitter so you should be able to just do :TSInstall hurl to get highlighting. Latest versions of neovim should also auto detect .hurl files as the hurl file format. The only other thing the nvim-hurl plugin does is help to run hurl on the current file, but there's realistically better command runners out there