nixvim icon indicating copy to clipboard operation
nixvim copied to clipboard

[BUG] Treesitter error when running rest plugin

Open mrityunjaygr8 opened this issue 10 months ago • 1 comments

Field Description
Plugin rest
Nixpkgs unstable
Home Manager ``

  • [x] I have read the FAQ and my bug is not listed there.

Description

I have enabled the rest.nvim plugin, and when i try to send a request using :Rest run I am getting an error saying that Error executing Lua callback: ...0.9.5/share/nvim/runtime/lua/vim/treesitter/language.lua:93: no parser for 'conf' language, see :help treesitter-parsers

Please see the attached screenshot image

Let me know what other information is required from my side to help fix this issue

Minimal, Reproducible Example (MRE)

programs.nixvim = {
  plugins.rest.enable = true;
  plugins.treesitter.enable = true;
  plugins.treesitter.ensureInstalled = ["lua" "xml" "http" "json" "graphql"];
}

mrityunjaygr8 avatar Apr 26 '24 12:04 mrityunjaygr8

Maybe you need "conf" in ensureInstalled ?

traxys avatar May 03 '24 09:05 traxys

It looks like there's no conf treesitter parser and your neovim configuration has associated the .http file with that filetype. From what I can see, you need to setup a filetype associate for the .http files to http to use the tree-sitter-http parser. I was able to get it working by making that filetype association so the Rest run works properly.

programs.nixvim = {
  plugins.rest.enable = true;
  plugins.treesitter.enable = true;
  
  filetype = {
     extension = {
      "http" = "http";
     };
  };
}

khaneliman avatar Sep 09 '24 02:09 khaneliman